From cb9b676937e217474ffe2c040e03c76208cb0895 Mon Sep 17 00:00:00 2001 From: malik masis Date: Mon, 12 Sep 2022 16:40:40 +0300 Subject: [PATCH 01/29] Init CmskitService --- EShopOnAbp.sln | 9 +- .../EShopOnAbp.CmskitService.abpmdl.json | 58 ++++++++++ services/cmskit/EShopOnAbp.CmskitService.sln | 100 +++++++++++++++++ ...CmskitServiceApplicationContractsModule.cs | 15 +++ .../CmskitServiceRemoteServiceConsts.cs | 6 + ...tService.Application.Contracts.abppkg.json | 3 + ...CmskitService.Application.Contracts.csproj | 16 +++ ...skitServicePermissionDefinitionProvider.cs | 21 ++++ .../Permissions/CmskitServicePermissions.cs | 13 +++ .../Samples/ISampleAppService.cs | 11 ++ .../Samples/SampleDto.cs | 6 + .../CmskitServiceAppService.cs | 13 +++ ...skitServiceApplicationAutoMapperProfile.cs | 13 +++ .../CmskitServiceApplicationModule.cs | 24 ++++ ...nAbp.CmskitService.Application.abppkg.json | 3 + ...ShopOnAbp.CmskitService.Application.csproj | 17 +++ .../Samples/SampleAppService.cs | 28 +++++ .../CmskitServiceDomainSharedModule.cs | 41 +++++++ .../CmskitServiceErrorCodes.cs | 6 + ...mskitServiceModuleExtensionConfigurator.cs | 63 +++++++++++ ...bp.CmskitService.Domain.Shared.abppkg.json | 3 + ...opOnAbp.CmskitService.Domain.Shared.csproj | 24 ++++ .../Localization/CmskitService/en.json | 5 + .../Localization/CmskitServiceResource.cs | 9 ++ .../CmskitServiceDbProperties.cs | 10 ++ .../CmskitServiceDomainModule.cs | 12 ++ ...ShopOnAbp.CmskitService.Domain.abppkg.json | 3 + .../EShopOnAbp.CmskitService.Domain.csproj | 15 +++ .../CmskitServiceSettingDefinitionProvider.cs | 13 +++ .../Settings/CmskitServiceSettings.cs | 10 ++ ...kitService.EntityFrameworkCore.abppkg.json | 3 + ...p.CmskitService.EntityFrameworkCore.csproj | 24 ++++ .../CmskitServiceDbContext.cs | 22 ++++ .../CmskitServiceDbContextFactory.cs | 41 +++++++ ...ServiceDbContextModelCreatingExtensions.cs | 21 ++++ ...kitServiceEfCoreEntityExtensionMappings.cs | 38 +++++++ .../CmskitServiceEntityFrameworkCoreModule.cs | 42 +++++++ .../ICmskitServiceDbContext.cs | 11 ++ .../CmskitServiceHttpApiClientModule.cs | 23 ++++ ...p.CmskitService.HttpApi.Client.abppkg.json | 3 + ...pOnAbp.CmskitService.HttpApi.Client.csproj | 20 ++++ .../CmskitServiceHttpApiHostModule.cs | 104 ++++++++++++++++++ .../Controllers/HomeController.cs | 12 ++ .../CmskitServiceDatabaseMigrationChecker.cs | 30 +++++ ...Abp.CmskitService.HttpApi.Host.abppkg.json | 1 + ...hopOnAbp.CmskitService.HttpApi.Host.csproj | 35 ++++++ .../Program.cs | 39 +++++++ .../Properties/launchSettings.json | 28 +++++ .../appsettings.json | 44 ++++++++ .../appsettings.secrets.json | 3 + .../CmskitServiceController.cs | 12 ++ .../CmskitServiceHttpApiModule.cs | 32 ++++++ ...hopOnAbp.CmskitService.HttpApi.abppkg.json | 3 + .../EShopOnAbp.CmskitService.HttpApi.csproj | 15 +++ .../Samples/SampleController.cs | 34 ++++++ .../CmskitServiceApplicationTestBase.cs | 9 ++ .../CmskitServiceApplicationTestModule.cs | 12 ++ ...mskitService.Application.Tests.abppkg.json | 3 + ...Abp.CmskitService.Application.Tests.csproj | 17 +++ .../Samples/SampleAppService_Tests.cs | 17 +++ .../CmskitServiceDomainTestBase.cs | 9 ++ .../CmskitServiceDomainTestModule.cs | 16 +++ ...Abp.CmskitService.Domain.Tests.abppkg.json | 3 + ...hopOnAbp.CmskitService.Domain.Tests.csproj | 16 +++ .../Samples/SampleManager_Tests.cs | 17 +++ ...vice.EntityFrameworkCore.Tests.abppkg.json | 3 + ...itService.EntityFrameworkCore.Tests.csproj | 19 ++++ ...mskitServiceEntityFrameworkCoreTestBase.cs | 9 ++ ...kitServiceEntityFrameworkCoreTestModule.cs | 42 +++++++ .../CmskitServiceDataSeedContributor.cs | 15 +++ .../CmskitServiceTestBase.cs | 59 ++++++++++ .../CmskitServiceTestBaseModule.cs | 41 +++++++ ...opOnAbp.CmskitService.TestBase.abppkg.json | 1 + .../EShopOnAbp.CmskitService.TestBase.csproj | 24 ++++ .../Security/FakeCurrentPrincipalAccessor.cs | 45 ++++++++ 75 files changed, 1586 insertions(+), 1 deletion(-) create mode 100644 services/cmskit/EShopOnAbp.CmskitService.abpmdl.json create mode 100644 services/cmskit/EShopOnAbp.CmskitService.sln create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceApplicationContractsModule.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceRemoteServiceConsts.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/EShopOnAbp.CmskitService.Application.Contracts.abppkg.json create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/EShopOnAbp.CmskitService.Application.Contracts.csproj create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Permissions/CmskitServicePermissionDefinitionProvider.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Permissions/CmskitServicePermissions.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Samples/ISampleAppService.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Samples/SampleDto.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceAppService.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceApplicationAutoMapperProfile.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceApplicationModule.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Application/EShopOnAbp.CmskitService.Application.abppkg.json create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Application/EShopOnAbp.CmskitService.Application.csproj create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Application/Samples/SampleAppService.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceDomainSharedModule.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceErrorCodes.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceModuleExtensionConfigurator.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/EShopOnAbp.CmskitService.Domain.Shared.abppkg.json create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/EShopOnAbp.CmskitService.Domain.Shared.csproj create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/Localization/CmskitService/en.json create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/Localization/CmskitServiceResource.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Domain/CmskitServiceDbProperties.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Domain/CmskitServiceDomainModule.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Domain/EShopOnAbp.CmskitService.Domain.abppkg.json create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Domain/EShopOnAbp.CmskitService.Domain.csproj create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Domain/Settings/CmskitServiceSettingDefinitionProvider.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Domain/Settings/CmskitServiceSettings.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EShopOnAbp.CmskitService.EntityFrameworkCore.abppkg.json create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EShopOnAbp.CmskitService.EntityFrameworkCore.csproj create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContext.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContextFactory.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContextModelCreatingExtensions.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEfCoreEntityExtensionMappings.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreModule.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/ICmskitServiceDbContext.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/CmskitServiceHttpApiClientModule.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/EShopOnAbp.CmskitService.HttpApi.Client.abppkg.json create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/EShopOnAbp.CmskitService.HttpApi.Client.csproj create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Controllers/HomeController.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/DbMigrations/CmskitServiceDatabaseMigrationChecker.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.abppkg.json create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Program.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Properties/launchSettings.json create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.secrets.json create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceController.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/EShopOnAbp.CmskitService.HttpApi.abppkg.json create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/EShopOnAbp.CmskitService.HttpApi.csproj create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/Samples/SampleController.cs create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/CmskitServiceApplicationTestBase.cs create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/CmskitServiceApplicationTestModule.cs create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/EShopOnAbp.CmskitService.Application.Tests.abppkg.json create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/EShopOnAbp.CmskitService.Application.Tests.csproj create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/Samples/SampleAppService_Tests.cs create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/CmskitServiceDomainTestBase.cs create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/CmskitServiceDomainTestModule.cs create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/EShopOnAbp.CmskitService.Domain.Tests.abppkg.json create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/EShopOnAbp.CmskitService.Domain.Tests.csproj create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/Samples/SampleManager_Tests.cs create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests.abppkg.json create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests.csproj create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreTestBase.cs create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreTestModule.cs create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.TestBase/CmskitServiceDataSeedContributor.cs create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.TestBase/CmskitServiceTestBase.cs create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.TestBase/CmskitServiceTestBaseModule.cs create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.TestBase/EShopOnAbp.CmskitService.TestBase.abppkg.json create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.TestBase/EShopOnAbp.CmskitService.TestBase.csproj create mode 100644 services/cmskit/test/EShopOnAbp.CmskitService.TestBase/Security/FakeCurrentPrincipalAccessor.cs diff --git a/EShopOnAbp.sln b/EShopOnAbp.sln index 7c9f39d2..e7a4264d 100644 --- a/EShopOnAbp.sln +++ b/EShopOnAbp.sln @@ -39,7 +39,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.OrderingService. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.PaymentService.HttpApi.Host", "services\payment\src\EShopOnAbp.PaymentService.HttpApi.Host\EShopOnAbp.PaymentService.HttpApi.Host.csproj", "{7AE4C613-780E-4DA5-9B57-76F0D40D5146}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.BasketService", "services\basket\src\EShopOnAbp.BasketService\EShopOnAbp.BasketService.csproj", "{E373DD66-3247-4D95-B325-064BBBC337B1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.BasketService", "services\basket\src\EShopOnAbp.BasketService\EShopOnAbp.BasketService.csproj", "{E373DD66-3247-4D95-B325-064BBBC337B1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.CmskitService.HttpApi.Host", "services\cmskit\src\EShopOnAbp.CmskitService.HttpApi.Host\EShopOnAbp.CmskitService.HttpApi.Host.csproj", "{D5B9D5A5-44AA-42F8-867C-95B54780C9DC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -107,6 +109,10 @@ Global {E373DD66-3247-4D95-B325-064BBBC337B1}.Debug|Any CPU.Build.0 = Debug|Any CPU {E373DD66-3247-4D95-B325-064BBBC337B1}.Release|Any CPU.ActiveCfg = Release|Any CPU {E373DD66-3247-4D95-B325-064BBBC337B1}.Release|Any CPU.Build.0 = Release|Any CPU + {D5B9D5A5-44AA-42F8-867C-95B54780C9DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D5B9D5A5-44AA-42F8-867C-95B54780C9DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5B9D5A5-44AA-42F8-867C-95B54780C9DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D5B9D5A5-44AA-42F8-867C-95B54780C9DC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -127,6 +133,7 @@ Global {CE23F65B-BCDD-40D5-8AB5-80D9F52D3FA1} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3} {7AE4C613-780E-4DA5-9B57-76F0D40D5146} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3} {E373DD66-3247-4D95-B325-064BBBC337B1} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3} + {D5B9D5A5-44AA-42F8-867C-95B54780C9DC} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {26F82565-C6A4-439D-93A4-3251E3E7D5B0} diff --git a/services/cmskit/EShopOnAbp.CmskitService.abpmdl.json b/services/cmskit/EShopOnAbp.CmskitService.abpmdl.json new file mode 100644 index 00000000..259d646c --- /dev/null +++ b/services/cmskit/EShopOnAbp.CmskitService.abpmdl.json @@ -0,0 +1,58 @@ +{ + "folders": { + "items": { + "src": {}, + "test": {} + } + }, + "packages": { + "EShopOnAbp.CmskitService.Domain.Shared": { + "path": "src/EShopOnAbp.CmskitService.Domain.Shared/EShopOnAbp.CmskitService.Domain.Shared.abppkg.json", + "folder": "src" + }, + "EShopOnAbp.CmskitService.Application.Contracts": { + "path": "src/EShopOnAbp.CmskitService.Application.Contracts/EShopOnAbp.CmskitService.Application.Contracts.abppkg.json", + "folder": "src" + }, + "EShopOnAbp.CmskitService.Domain": { + "path": "src/EShopOnAbp.CmskitService.Domain/EShopOnAbp.CmskitService.Domain.abppkg.json", + "folder": "src" + }, + "EShopOnAbp.CmskitService.Application": { + "path": "src/EShopOnAbp.CmskitService.Application/EShopOnAbp.CmskitService.Application.abppkg.json", + "folder": "src" + }, + "EShopOnAbp.CmskitService.EntityFrameworkCore": { + "path": "src/EShopOnAbp.CmskitService.EntityFrameworkCore/EShopOnAbp.CmskitService.EntityFrameworkCore.abppkg.json", + "folder": "src" + }, + "EShopOnAbp.CmskitService.HttpApi": { + "path": "src/EShopOnAbp.CmskitService.HttpApi/EShopOnAbp.CmskitService.HttpApi.abppkg.json", + "folder": "src" + }, + "EShopOnAbp.CmskitService.HttpApi.Client": { + "path": "src/EShopOnAbp.CmskitService.HttpApi.Client/EShopOnAbp.CmskitService.HttpApi.Client.abppkg.json", + "folder": "src" + }, + "EShopOnAbp.CmskitService.HttpApi.Host": { + "path": "src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.abppkg.json", + "folder": "src" + }, + "EShopOnAbp.CmskitService.Domain.Tests": { + "path": "test/EShopOnAbp.CmskitService.Domain.Tests/EShopOnAbp.CmskitService.Domain.Tests.abppkg.json", + "folder": "test" + }, + "EShopOnAbp.CmskitService.EntityFrameworkCore.Tests": { + "path": "test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests.abppkg.json", + "folder": "test" + }, + "EShopOnAbp.CmskitService.TestBase": { + "path": "test/EShopOnAbp.CmskitService.TestBase/EShopOnAbp.CmskitService.TestBase.abppkg.json", + "folder": "test" + }, + "EShopOnAbp.CmskitService.Application.Tests": { + "path": "test/EShopOnAbp.CmskitService.Application.Tests/EShopOnAbp.CmskitService.Application.Tests.abppkg.json", + "folder": "test" + } + } +} \ No newline at end of file diff --git a/services/cmskit/EShopOnAbp.CmskitService.sln b/services/cmskit/EShopOnAbp.CmskitService.sln new file mode 100644 index 00000000..3d34045d --- /dev/null +++ b/services/cmskit/EShopOnAbp.CmskitService.sln @@ -0,0 +1,100 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{332BD7AE-41B2-4F61-B743-69CC7F70C5CD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{8CD8083E-F0CE-4233-8754-A0D25B720CA1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.CmskitService.Domain.Shared", "src\EShopOnAbp.CmskitService.Domain.Shared\EShopOnAbp.CmskitService.Domain.Shared.csproj", "{E023F5E2-CD70-45B2-99B9-F927442EB5D3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.CmskitService.Application.Contracts", "src\EShopOnAbp.CmskitService.Application.Contracts\EShopOnAbp.CmskitService.Application.Contracts.csproj", "{5F3A3379-5419-426B-B926-689DC7640C15}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.CmskitService.Domain", "src\EShopOnAbp.CmskitService.Domain\EShopOnAbp.CmskitService.Domain.csproj", "{2B9F3B2D-4059-4EEC-B2E1-3843331CE7B2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.CmskitService.Application", "src\EShopOnAbp.CmskitService.Application\EShopOnAbp.CmskitService.Application.csproj", "{5A74B4E1-83A7-4176-88B2-BA4C8C900AC3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.CmskitService.EntityFrameworkCore", "src\EShopOnAbp.CmskitService.EntityFrameworkCore\EShopOnAbp.CmskitService.EntityFrameworkCore.csproj", "{6112E2A3-2D9A-41A4-8811-8BCF538A05DC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.CmskitService.HttpApi", "src\EShopOnAbp.CmskitService.HttpApi\EShopOnAbp.CmskitService.HttpApi.csproj", "{B9211D3C-2D7A-450C-8C61-A9672F7A08A7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.CmskitService.HttpApi.Client", "src\EShopOnAbp.CmskitService.HttpApi.Client\EShopOnAbp.CmskitService.HttpApi.Client.csproj", "{41BAD034-57FF-4CE8-B0F8-54E22F3581EC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.CmskitService.HttpApi.Host", "src\EShopOnAbp.CmskitService.HttpApi.Host\EShopOnAbp.CmskitService.HttpApi.Host.csproj", "{8F265B71-B45C-4437-8A46-A9055BB94CD0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.CmskitService.Domain.Tests", "test\EShopOnAbp.CmskitService.Domain.Tests\EShopOnAbp.CmskitService.Domain.Tests.csproj", "{3E5C3A79-72DB-4EF3-A0CA-9EE9AA7E9656}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.CmskitService.EntityFrameworkCore.Tests", "test\EShopOnAbp.CmskitService.EntityFrameworkCore.Tests\EShopOnAbp.CmskitService.EntityFrameworkCore.Tests.csproj", "{1D87CC42-B8E3-42AC-B421-35DB8011B333}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.CmskitService.TestBase", "test\EShopOnAbp.CmskitService.TestBase\EShopOnAbp.CmskitService.TestBase.csproj", "{7CDD07F9-B638-4653-A54F-55A494FB4702}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.CmskitService.Application.Tests", "test\EShopOnAbp.CmskitService.Application.Tests\EShopOnAbp.CmskitService.Application.Tests.csproj", "{B1A27493-3B89-4482-84D9-C3335DC70BFF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {E023F5E2-CD70-45B2-99B9-F927442EB5D3} = {332BD7AE-41B2-4F61-B743-69CC7F70C5CD} + {5F3A3379-5419-426B-B926-689DC7640C15} = {332BD7AE-41B2-4F61-B743-69CC7F70C5CD} + {2B9F3B2D-4059-4EEC-B2E1-3843331CE7B2} = {332BD7AE-41B2-4F61-B743-69CC7F70C5CD} + {5A74B4E1-83A7-4176-88B2-BA4C8C900AC3} = {332BD7AE-41B2-4F61-B743-69CC7F70C5CD} + {6112E2A3-2D9A-41A4-8811-8BCF538A05DC} = {332BD7AE-41B2-4F61-B743-69CC7F70C5CD} + {B9211D3C-2D7A-450C-8C61-A9672F7A08A7} = {332BD7AE-41B2-4F61-B743-69CC7F70C5CD} + {41BAD034-57FF-4CE8-B0F8-54E22F3581EC} = {332BD7AE-41B2-4F61-B743-69CC7F70C5CD} + {8F265B71-B45C-4437-8A46-A9055BB94CD0} = {332BD7AE-41B2-4F61-B743-69CC7F70C5CD} + {3E5C3A79-72DB-4EF3-A0CA-9EE9AA7E9656} = {8CD8083E-F0CE-4233-8754-A0D25B720CA1} + {1D87CC42-B8E3-42AC-B421-35DB8011B333} = {8CD8083E-F0CE-4233-8754-A0D25B720CA1} + {7CDD07F9-B638-4653-A54F-55A494FB4702} = {8CD8083E-F0CE-4233-8754-A0D25B720CA1} + {B1A27493-3B89-4482-84D9-C3335DC70BFF} = {8CD8083E-F0CE-4233-8754-A0D25B720CA1} + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E023F5E2-CD70-45B2-99B9-F927442EB5D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E023F5E2-CD70-45B2-99B9-F927442EB5D3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E023F5E2-CD70-45B2-99B9-F927442EB5D3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E023F5E2-CD70-45B2-99B9-F927442EB5D3}.Release|Any CPU.Build.0 = Release|Any CPU + {5F3A3379-5419-426B-B926-689DC7640C15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5F3A3379-5419-426B-B926-689DC7640C15}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5F3A3379-5419-426B-B926-689DC7640C15}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5F3A3379-5419-426B-B926-689DC7640C15}.Release|Any CPU.Build.0 = Release|Any CPU + {2B9F3B2D-4059-4EEC-B2E1-3843331CE7B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2B9F3B2D-4059-4EEC-B2E1-3843331CE7B2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2B9F3B2D-4059-4EEC-B2E1-3843331CE7B2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2B9F3B2D-4059-4EEC-B2E1-3843331CE7B2}.Release|Any CPU.Build.0 = Release|Any CPU + {5A74B4E1-83A7-4176-88B2-BA4C8C900AC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5A74B4E1-83A7-4176-88B2-BA4C8C900AC3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5A74B4E1-83A7-4176-88B2-BA4C8C900AC3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5A74B4E1-83A7-4176-88B2-BA4C8C900AC3}.Release|Any CPU.Build.0 = Release|Any CPU + {6112E2A3-2D9A-41A4-8811-8BCF538A05DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6112E2A3-2D9A-41A4-8811-8BCF538A05DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6112E2A3-2D9A-41A4-8811-8BCF538A05DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6112E2A3-2D9A-41A4-8811-8BCF538A05DC}.Release|Any CPU.Build.0 = Release|Any CPU + {B9211D3C-2D7A-450C-8C61-A9672F7A08A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9211D3C-2D7A-450C-8C61-A9672F7A08A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9211D3C-2D7A-450C-8C61-A9672F7A08A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9211D3C-2D7A-450C-8C61-A9672F7A08A7}.Release|Any CPU.Build.0 = Release|Any CPU + {41BAD034-57FF-4CE8-B0F8-54E22F3581EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {41BAD034-57FF-4CE8-B0F8-54E22F3581EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {41BAD034-57FF-4CE8-B0F8-54E22F3581EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {41BAD034-57FF-4CE8-B0F8-54E22F3581EC}.Release|Any CPU.Build.0 = Release|Any CPU + {8F265B71-B45C-4437-8A46-A9055BB94CD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8F265B71-B45C-4437-8A46-A9055BB94CD0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8F265B71-B45C-4437-8A46-A9055BB94CD0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8F265B71-B45C-4437-8A46-A9055BB94CD0}.Release|Any CPU.Build.0 = Release|Any CPU + {3E5C3A79-72DB-4EF3-A0CA-9EE9AA7E9656}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E5C3A79-72DB-4EF3-A0CA-9EE9AA7E9656}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E5C3A79-72DB-4EF3-A0CA-9EE9AA7E9656}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E5C3A79-72DB-4EF3-A0CA-9EE9AA7E9656}.Release|Any CPU.Build.0 = Release|Any CPU + {1D87CC42-B8E3-42AC-B421-35DB8011B333}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D87CC42-B8E3-42AC-B421-35DB8011B333}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D87CC42-B8E3-42AC-B421-35DB8011B333}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D87CC42-B8E3-42AC-B421-35DB8011B333}.Release|Any CPU.Build.0 = Release|Any CPU + {7CDD07F9-B638-4653-A54F-55A494FB4702}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7CDD07F9-B638-4653-A54F-55A494FB4702}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7CDD07F9-B638-4653-A54F-55A494FB4702}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7CDD07F9-B638-4653-A54F-55A494FB4702}.Release|Any CPU.Build.0 = Release|Any CPU + {B1A27493-3B89-4482-84D9-C3335DC70BFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B1A27493-3B89-4482-84D9-C3335DC70BFF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B1A27493-3B89-4482-84D9-C3335DC70BFF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B1A27493-3B89-4482-84D9-C3335DC70BFF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceApplicationContractsModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceApplicationContractsModule.cs new file mode 100644 index 00000000..31b2d13f --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceApplicationContractsModule.cs @@ -0,0 +1,15 @@ +using Volo.Abp.Application; +using Volo.Abp.Authorization; +using Volo.Abp.Modularity; + +namespace EShopOnAbp.CmskitService; + +[DependsOn( + typeof(CmskitServiceDomainSharedModule), + typeof(AbpDddApplicationContractsModule), + typeof(AbpAuthorizationModule) + )] +public class CmskitServiceApplicationContractsModule : AbpModule +{ + +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceRemoteServiceConsts.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceRemoteServiceConsts.cs new file mode 100644 index 00000000..0de5a6b9 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceRemoteServiceConsts.cs @@ -0,0 +1,6 @@ +namespace EShopOnAbp.CmskitService; + +public static class CmskitServiceRemoteServiceConsts +{ + public const string RemoteServiceName = "CmskitService"; +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/EShopOnAbp.CmskitService.Application.Contracts.abppkg.json b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/EShopOnAbp.CmskitService.Application.Contracts.abppkg.json new file mode 100644 index 00000000..49032794 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/EShopOnAbp.CmskitService.Application.Contracts.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.application-contracts" +} \ No newline at end of file diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/EShopOnAbp.CmskitService.Application.Contracts.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/EShopOnAbp.CmskitService.Application.Contracts.csproj new file mode 100644 index 00000000..1f130a67 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/EShopOnAbp.CmskitService.Application.Contracts.csproj @@ -0,0 +1,16 @@ + + + + + + netstandard2.0 + EShopOnAbp.CmskitService + + + + + + + + + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Permissions/CmskitServicePermissionDefinitionProvider.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Permissions/CmskitServicePermissionDefinitionProvider.cs new file mode 100644 index 00000000..c0123b23 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Permissions/CmskitServicePermissionDefinitionProvider.cs @@ -0,0 +1,21 @@ +using EShopOnAbp.CmskitService.Localization; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Localization; + +namespace EShopOnAbp.CmskitService.Permissions; + +public class CmskitServicePermissionDefinitionProvider : PermissionDefinitionProvider +{ + public override void Define(IPermissionDefinitionContext context) + { + var myGroup = context.AddGroup(CmskitServicePermissions.GroupName, L("Permission:CmskitService")); + + //Define your own permissions here. Example: + //myGroup.AddPermission(BookStorePermissions.MyPermission1, L("Permission:MyPermission1")); + } + + private static LocalizableString L(string name) + { + return LocalizableString.Create(name); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Permissions/CmskitServicePermissions.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Permissions/CmskitServicePermissions.cs new file mode 100644 index 00000000..463e4170 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Permissions/CmskitServicePermissions.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Reflection; + +namespace EShopOnAbp.CmskitService.Permissions; + +public class CmskitServicePermissions +{ + public const string GroupName = "CmskitService"; + + public static string[] GetAll() + { + return ReflectionHelper.GetPublicConstantsRecursively(typeof(CmskitServicePermissions)); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Samples/ISampleAppService.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Samples/ISampleAppService.cs new file mode 100644 index 00000000..e64971f4 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Samples/ISampleAppService.cs @@ -0,0 +1,11 @@ +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace EShopOnAbp.CmskitService.Samples; + +public interface ISampleAppService : IApplicationService +{ + Task GetAsync(); + + Task GetAuthorizedAsync(); +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Samples/SampleDto.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Samples/SampleDto.cs new file mode 100644 index 00000000..af778a8e --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/Samples/SampleDto.cs @@ -0,0 +1,6 @@ +namespace EShopOnAbp.CmskitService.Samples; + +public class SampleDto +{ + public int Value { get; set; } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceAppService.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceAppService.cs new file mode 100644 index 00000000..c279c0e6 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceAppService.cs @@ -0,0 +1,13 @@ +using EShopOnAbp.CmskitService.Localization; +using Volo.Abp.Application.Services; + +namespace EShopOnAbp.CmskitService; + +public abstract class CmskitServiceAppService : ApplicationService +{ + protected CmskitServiceAppService() + { + LocalizationResource = typeof(CmskitServiceResource); + ObjectMapperContext = typeof(CmskitServiceApplicationModule); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceApplicationAutoMapperProfile.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceApplicationAutoMapperProfile.cs new file mode 100644 index 00000000..73310820 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceApplicationAutoMapperProfile.cs @@ -0,0 +1,13 @@ +using AutoMapper; + +namespace EShopOnAbp.CmskitService; + +public class CmskitServiceApplicationAutoMapperProfile : Profile +{ + public CmskitServiceApplicationAutoMapperProfile() + { + /* You can configure your AutoMapper mapping configuration here. + * Alternatively, you can split your mapping configurations + * into multiple profile classes for a better organization. */ + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceApplicationModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceApplicationModule.cs new file mode 100644 index 00000000..d34e0226 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceApplicationModule.cs @@ -0,0 +1,24 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Application; +using Volo.Abp.AutoMapper; +using Volo.Abp.Modularity; + +namespace EShopOnAbp.CmskitService; + +[DependsOn( + typeof(CmskitServiceDomainModule), + typeof(CmskitServiceApplicationContractsModule), + typeof(AbpDddApplicationModule), + typeof(AbpAutoMapperModule) + )] +public class CmskitServiceApplicationModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAutoMapperObjectMapper(); + Configure(options => + { + options.AddMaps(validate: true); + }); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application/EShopOnAbp.CmskitService.Application.abppkg.json b/services/cmskit/src/EShopOnAbp.CmskitService.Application/EShopOnAbp.CmskitService.Application.abppkg.json new file mode 100644 index 00000000..412567ac --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application/EShopOnAbp.CmskitService.Application.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.application" +} \ No newline at end of file diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application/EShopOnAbp.CmskitService.Application.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.Application/EShopOnAbp.CmskitService.Application.csproj new file mode 100644 index 00000000..ff538e41 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application/EShopOnAbp.CmskitService.Application.csproj @@ -0,0 +1,17 @@ + + + + + + netstandard2.0 + EShopOnAbp.CmskitService + + + + + + + + + + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application/Samples/SampleAppService.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Application/Samples/SampleAppService.cs new file mode 100644 index 00000000..5259c22e --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application/Samples/SampleAppService.cs @@ -0,0 +1,28 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; + +namespace EShopOnAbp.CmskitService.Samples; + +public class SampleAppService : CmskitServiceAppService, ISampleAppService +{ + public Task GetAsync() + { + return Task.FromResult( + new SampleDto + { + Value = 42 + } + ); + } + + [Authorize] + public Task GetAuthorizedAsync() + { + return Task.FromResult( + new SampleDto + { + Value = 42 + } + ); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceDomainSharedModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceDomainSharedModule.cs new file mode 100644 index 00000000..eeaa7c3a --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceDomainSharedModule.cs @@ -0,0 +1,41 @@ +using EShopOnAbp.CmskitService.Localization; +using Volo.Abp.Localization; +using Volo.Abp.Localization.ExceptionHandling; +using Volo.Abp.Modularity; +using Volo.Abp.Validation; +using Volo.Abp.Validation.Localization; +using Volo.Abp.VirtualFileSystem; + +namespace EShopOnAbp.CmskitService; + +[DependsOn( + typeof(AbpValidationModule) +)] +public class CmskitServiceDomainSharedModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + CmskitServiceModuleExtensionConfigurator.Configure(); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + Configure(options => + { + options.Resources + .Add("en") + .AddBaseTypes(typeof(AbpValidationResource)) + .AddVirtualJson("/Localization/CmskitService"); + }); + + Configure(options => + { + options.MapCodeNamespace("CmskitService", typeof(CmskitServiceResource)); + }); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceErrorCodes.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceErrorCodes.cs new file mode 100644 index 00000000..fb4565ae --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceErrorCodes.cs @@ -0,0 +1,6 @@ +namespace EShopOnAbp.CmskitService; + +public static class CmskitServiceErrorCodes +{ + //Add your business exception error codes here... +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceModuleExtensionConfigurator.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceModuleExtensionConfigurator.cs new file mode 100644 index 00000000..9af63f99 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceModuleExtensionConfigurator.cs @@ -0,0 +1,63 @@ +using Volo.Abp.Threading; + +namespace EShopOnAbp.CmskitService; + +public static class CmskitServiceModuleExtensionConfigurator +{ + private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); + + public static void Configure() + { + OneTimeRunner.Run(() => + { + ConfigureExistingProperties(); + ConfigureExtraProperties(); + }); + } + + private static void ConfigureExistingProperties() + { + /* You can change max lengths for properties of the + * entities defined in the modules used by your application. + * + * Example: Change user and role name max lengths + IdentityUserConsts.MaxNameLength = 99; + IdentityRoleConsts.MaxNameLength = 99; + * Notice: It is not suggested to change property lengths + * unless you really need it. Go with the standard values wherever possible. + * + * If you are using EF Core, you will need to run the add-migration command after your changes. + */ + } + + private static void ConfigureExtraProperties() + { + /* You can configure extra properties for the + * entities defined in the modules used by your application. + * + * This class can be used to define these extra properties + * with a high level, easy to use API. + * + * Example: Add a new property to the user entity of the identity module + ObjectExtensionManager.Instance.Modules() + .ConfigureIdentity(identity => + { + identity.ConfigureUser(user => + { + user.AddOrUpdateProperty( //property type: string + "SocialSecurityNumber", //property name + property => + { + //validation rules + property.Attributes.Add(new RequiredAttribute()); + property.Attributes.Add(new StringLengthAttribute(64) {MinimumLength = 4}); + //...other configurations for this property + } + ); + }); + }); + * See the documentation for more: + * https://docs.abp.io/en/abp/latest/Module-Entity-Extensions + */ + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/EShopOnAbp.CmskitService.Domain.Shared.abppkg.json b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/EShopOnAbp.CmskitService.Domain.Shared.abppkg.json new file mode 100644 index 00000000..8b3de05f --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/EShopOnAbp.CmskitService.Domain.Shared.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.domain-shared" +} \ No newline at end of file diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/EShopOnAbp.CmskitService.Domain.Shared.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/EShopOnAbp.CmskitService.Domain.Shared.csproj new file mode 100644 index 00000000..b9b23370 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/EShopOnAbp.CmskitService.Domain.Shared.csproj @@ -0,0 +1,24 @@ + + + + + + netstandard2.0 + EShopOnAbp.CmskitService + true + + + + + + + + + + + + + + + + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/Localization/CmskitService/en.json b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/Localization/CmskitService/en.json new file mode 100644 index 00000000..da21a212 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/Localization/CmskitService/en.json @@ -0,0 +1,5 @@ +{ + "culture": "en", + "texts": { + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/Localization/CmskitServiceResource.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/Localization/CmskitServiceResource.cs new file mode 100644 index 00000000..fa1eda07 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/Localization/CmskitServiceResource.cs @@ -0,0 +1,9 @@ +using Volo.Abp.Localization; + +namespace EShopOnAbp.CmskitService.Localization; + +[LocalizationResourceName("CmskitService")] +public class CmskitServiceResource +{ + +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain/CmskitServiceDbProperties.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/CmskitServiceDbProperties.cs new file mode 100644 index 00000000..a927d223 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/CmskitServiceDbProperties.cs @@ -0,0 +1,10 @@ +namespace EShopOnAbp.CmskitService; + +public static class CmskitServiceDbProperties +{ + public static string DbTablePrefix { get; set; } = ""; + + public static string DbSchema { get; set; } = null; + + public const string ConnectionStringName = "CmskitService"; +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain/CmskitServiceDomainModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/CmskitServiceDomainModule.cs new file mode 100644 index 00000000..5766104e --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/CmskitServiceDomainModule.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Domain; +using Volo.Abp.Modularity; + +namespace EShopOnAbp.CmskitService; + +[DependsOn( + typeof(AbpDddDomainModule), + typeof(CmskitServiceDomainSharedModule) +)] +public class CmskitServiceDomainModule : AbpModule +{ +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain/EShopOnAbp.CmskitService.Domain.abppkg.json b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/EShopOnAbp.CmskitService.Domain.abppkg.json new file mode 100644 index 00000000..1d574efe --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/EShopOnAbp.CmskitService.Domain.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.domain" +} \ No newline at end of file diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain/EShopOnAbp.CmskitService.Domain.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/EShopOnAbp.CmskitService.Domain.csproj new file mode 100644 index 00000000..3e273657 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/EShopOnAbp.CmskitService.Domain.csproj @@ -0,0 +1,15 @@ + + + + + + netstandard2.0 + EShopOnAbp.CmskitService + + + + + + + + \ No newline at end of file diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain/Settings/CmskitServiceSettingDefinitionProvider.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/Settings/CmskitServiceSettingDefinitionProvider.cs new file mode 100644 index 00000000..e0856c55 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/Settings/CmskitServiceSettingDefinitionProvider.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Settings; + +namespace EShopOnAbp.CmskitService.Settings; + +public class CmskitServiceServiceSettingDefinitionProvider : SettingDefinitionProvider +{ + public override void Define(ISettingDefinitionContext context) + { + /* Define module settings here. + * Use names from CmskitServiceSettings class. + */ + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain/Settings/CmskitServiceSettings.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/Settings/CmskitServiceSettings.cs new file mode 100644 index 00000000..5abc2ee2 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/Settings/CmskitServiceSettings.cs @@ -0,0 +1,10 @@ +namespace EShopOnAbp.CmskitService.Settings; + +public static class CmskitServiceSettings +{ + public const string GroupName = "CmskitService"; + + /* Add constants for setting names. Example: + * public const string MySettingName = GroupName + ".MySettingName"; + */ +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EShopOnAbp.CmskitService.EntityFrameworkCore.abppkg.json b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EShopOnAbp.CmskitService.EntityFrameworkCore.abppkg.json new file mode 100644 index 00000000..e1c64f01 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EShopOnAbp.CmskitService.EntityFrameworkCore.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.ef" +} \ No newline at end of file diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EShopOnAbp.CmskitService.EntityFrameworkCore.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EShopOnAbp.CmskitService.EntityFrameworkCore.csproj new file mode 100644 index 00000000..c88c2a4f --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EShopOnAbp.CmskitService.EntityFrameworkCore.csproj @@ -0,0 +1,24 @@ + + + + + + net6.0 + EShopOnAbp.CmskitService + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContext.cs b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContext.cs new file mode 100644 index 00000000..bb4f8053 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContext.cs @@ -0,0 +1,22 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace EShopOnAbp.CmskitService.EntityFrameworkCore; + +[ConnectionStringName(CmskitServiceDbProperties.ConnectionStringName)] +public class CmskitServiceDbContext : AbpDbContext, ICmskitServiceDbContext +{ + public CmskitServiceDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.ConfigureCmskitService(); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContextFactory.cs b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContextFactory.cs new file mode 100644 index 00000000..345f89c2 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContextFactory.cs @@ -0,0 +1,41 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; +using Microsoft.Extensions.Configuration; +using System; +using System.IO; + +namespace EShopOnAbp.CmskitService.EntityFrameworkCore; + + /* This class is needed for EF Core console commands + * (like Add-Migration and Update-Database commands) */ +public class CmskitServiceDbContextFactory : IDesignTimeDbContextFactory +{ + public CmskitServiceDbContext CreateDbContext(string[] args) + { + CmskitServiceEfCoreEntityExtensionMappings.Configure(); + + var configuration = BuildConfiguration(); + + var builder = new DbContextOptionsBuilder() + .UseNpgsql( + configuration.GetConnectionString(CmskitServiceDbProperties.ConnectionStringName), + b => + { + b.MigrationsHistoryTable("__OrderingService_Migrations"); + }); + + // https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); + + return new CmskitServiceDbContext(builder.Options); + } + + private static IConfigurationRoot BuildConfiguration() + { + var builder = new ConfigurationBuilder() + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../EShopOnAbp.OrderingService.HttpApi.Host/")) + .AddJsonFile("appsettings.json", optional: false); + + return builder.Build(); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContextModelCreatingExtensions.cs b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContextModelCreatingExtensions.cs new file mode 100644 index 00000000..5172280a --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContextModelCreatingExtensions.cs @@ -0,0 +1,21 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp; + +namespace EShopOnAbp.CmskitService.EntityFrameworkCore; + +public static class CmskitServiceDbContextModelCreatingExtensions +{ + public static void ConfigureCmskitService(this ModelBuilder builder) + { + Check.NotNull(builder, nameof(builder)); + + /* Configure your own tables/entities inside here */ + + //builder.Entity(b => + //{ + // b.ToTable(CmskitServiceConsts.DbTablePrefix + "YourEntities", CmskitServiceConsts.DbSchema); + // b.ConfigureByConvention(); //auto configure for the base class props + // //... + //}); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEfCoreEntityExtensionMappings.cs b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEfCoreEntityExtensionMappings.cs new file mode 100644 index 00000000..df89888f --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEfCoreEntityExtensionMappings.cs @@ -0,0 +1,38 @@ +using Volo.Abp.Threading; + +namespace EShopOnAbp.CmskitService.EntityFrameworkCore; + +public static class CmskitServiceEfCoreEntityExtensionMappings +{ + private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); + + public static void Configure() + { + CmskitServiceModuleExtensionConfigurator.Configure(); + + OneTimeRunner.Run(() => + { + /* You can configure extra properties for the + * entities defined in the modules used by your application. + * + * This class can be used to map these extra properties to table fields in the database. + * + * USE THIS CLASS ONLY TO CONFIGURE EF CORE RELATED MAPPING. + * USE EShopOnAbpModuleExtensionConfigurator CLASS (in the Domain.Shared project) + * FOR A HIGH LEVEL API TO DEFINE EXTRA PROPERTIES TO ENTITIES OF THE USED MODULES + * + * Example: Map a property to a table field: + ObjectExtensionManager.Instance + .MapEfCoreProperty( + "SocialSecurityNumber", + (entityBuilder, propertyBuilder) => + { + propertyBuilder.HasMaxLength(128); + } + ); + * See the documentation for more: + * https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities + */ + }); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreModule.cs new file mode 100644 index 00000000..2979576c --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreModule.cs @@ -0,0 +1,42 @@ +using Microsoft.Extensions.DependencyInjection; +using System; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.PostgreSql; +using Volo.Abp.Modularity; + +namespace EShopOnAbp.CmskitService.EntityFrameworkCore; + +[DependsOn( + typeof(AbpEntityFrameworkCorePostgreSqlModule), + typeof(CmskitServiceDomainModule) +)] +public class CmskitServiceEntityFrameworkCoreModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + CmskitServiceEfCoreEntityExtensionMappings.Configure(); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(options => + { + /* Remove "includeAllEntities: true" to create + * default repositories only for aggregate roots */ + options.AddDefaultRepositories(includeAllEntities: true); + }); + + // https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); + + Configure(options => + { + /* The main point to change your DBMS. + * See also OrderingServiceMigrationsDbContextFactory for EF Core tooling. */ + options.UseNpgsql(b => + { + b.MigrationsHistoryTable("__CmskitService_Migrations"); + }); + }); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/ICmskitServiceDbContext.cs b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/ICmskitServiceDbContext.cs new file mode 100644 index 00000000..2cfed3b3 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/ICmskitServiceDbContext.cs @@ -0,0 +1,11 @@ +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace EShopOnAbp.CmskitService.EntityFrameworkCore +{ + [ConnectionStringName(CmskitServiceDbProperties.ConnectionStringName)] + public interface ICmskitServiceDbContext : IEfCoreDbContext + { + //DbSet Model { get; } + } +} \ No newline at end of file diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/CmskitServiceHttpApiClientModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/CmskitServiceHttpApiClientModule.cs new file mode 100644 index 00000000..90e77789 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/CmskitServiceHttpApiClientModule.cs @@ -0,0 +1,23 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Http.Client; +using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; + +namespace EShopOnAbp.CmskitService; + +[DependsOn( + typeof(CmskitServiceApplicationContractsModule), + typeof(AbpHttpClientModule))] +public class CmskitServiceHttpApiClientModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddHttpClientProxies(typeof(CmskitServiceApplicationContractsModule).Assembly, + CmskitServiceRemoteServiceConsts.RemoteServiceName); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/EShopOnAbp.CmskitService.HttpApi.Client.abppkg.json b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/EShopOnAbp.CmskitService.HttpApi.Client.abppkg.json new file mode 100644 index 00000000..7deef5e3 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/EShopOnAbp.CmskitService.HttpApi.Client.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.http-api-client" +} \ No newline at end of file diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/EShopOnAbp.CmskitService.HttpApi.Client.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/EShopOnAbp.CmskitService.HttpApi.Client.csproj new file mode 100644 index 00000000..90e5e358 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/EShopOnAbp.CmskitService.HttpApi.Client.csproj @@ -0,0 +1,20 @@ + + + + + + netstandard2.0 + EShopOnAbp.CmskitService + + + + + + + + + + + + + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs new file mode 100644 index 00000000..415c298a --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs @@ -0,0 +1,104 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.Extensions.Hosting; +using EShopOnAbp.CmskitService.EntityFrameworkCore; +using EShopOnAbp.Shared.Hosting.Microservices; +using Volo.Abp; +using Volo.Abp.Modularity; +using EShopOnAbp.Shared.Hosting.AspNetCore; +using System.Collections.Generic; +using Microsoft.Extensions.DependencyInjection; +using System; +using Volo.Abp.AspNetCore.Mvc; +using System.Linq; +using Microsoft.AspNetCore.Cors; +using Microsoft.Extensions.Configuration; + +namespace EShopOnAbp.CmskitService; +[DependsOn( + typeof(EShopOnAbpSharedHostingMicroservicesModule), + typeof(CmskitServiceApplicationModule), + typeof(CmskitServiceHttpApiModule), + typeof(CmskitServiceEntityFrameworkCoreModule) + )] +public class CmskitServiceHttpApiHostModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + // var hostingEnvironment = context.Services.GetHostingEnvironment(); + + JwtBearerConfigurationHelper.Configure(context, "CmskitService"); + + SwaggerConfigurationHelper.ConfigureWithAuth( + context: context, + authority: configuration["AuthServer:Authority"], + scopes: new + Dictionary /* Requested scopes for authorization code request and descriptions for swagger UI only */ + { + { "CmskitService", "CmskitService Service API" } + }, + apiTitle: "CmskitService Service API" + ); + + context.Services.AddCors(options => + { + options.AddDefaultPolicy(builder => + { + builder + .WithOrigins( + configuration["App:CorsOrigins"] + .Split(",", StringSplitOptions.RemoveEmptyEntries) + .Select(o => o.Trim().RemovePostFix("/")) + .ToArray() + ) + .WithAbpExposedHeaders() + .SetIsOriginAllowedToAllowWildcardSubdomains() + .AllowAnyHeader() + .AllowAnyMethod() + .AllowCredentials(); + }); + }); + + // TODO: Create controller instead of auto-controller configuration + Configure(options => + { + options.ConventionalControllers.Create(typeof(CmskitServiceApplicationModule).Assembly, opts => + { + opts.RootPath = "cmskit"; + opts.RemoteServiceName = "Cmskit"; + }); + }); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + var app = context.GetApplicationBuilder(); + var env = context.GetEnvironment(); + + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.UseCorrelationId(); + app.UseAbpRequestLocalization(); + app.UseStaticFiles(); + app.UseRouting(); + app.UseAuthentication(); + app.UseAbpClaimsMap(); + app.UseMultiTenancy(); + app.UseAuthorization(); + app.UseSwagger(); + app.UseSwaggerUI(options => + { + var configuration = context.ServiceProvider.GetRequiredService(); + options.SwaggerEndpoint("/swagger/v1/swagger.json", "Cmskit Service API"); + options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); + options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]); + }); + app.UseAbpSerilogEnrichers(); + app.UseAuditing(); + app.UseUnitOfWork(); + app.UseConfiguredEndpoints(); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Controllers/HomeController.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Controllers/HomeController.cs new file mode 100644 index 00000000..b8197c75 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Controllers/HomeController.cs @@ -0,0 +1,12 @@ +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; + +namespace EShopOnAbp.CmskitService.Controllers; + +public class HomeController : AbpController +{ + public ActionResult Index() + { + return Redirect("/swagger"); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/DbMigrations/CmskitServiceDatabaseMigrationChecker.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/DbMigrations/CmskitServiceDatabaseMigrationChecker.cs new file mode 100644 index 00000000..a121009b --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/DbMigrations/CmskitServiceDatabaseMigrationChecker.cs @@ -0,0 +1,30 @@ +using EShopOnAbp.CmskitService.EntityFrameworkCore; +using EShopOnAbp.Shared.Hosting.Microservices.DbMigrations.EfCore; +using System; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace EShopOnAbp.CmskitService.DbMigrations; + +public class CmskitServiceDatabaseMigrationChecker + : PendingEfCoreMigrationsChecker +{ + public CmskitServiceDatabaseMigrationChecker( + IUnitOfWorkManager unitOfWorkManager, + IServiceProvider serviceProvider, + ICurrentTenant currentTenant, + IDistributedEventBus distributedEventBus, + IAbpDistributedLock abpDistributedLock) + : base( + unitOfWorkManager, + serviceProvider, + currentTenant, + distributedEventBus, + abpDistributedLock, + CmskitServiceDbProperties.ConnectionStringName) + { + + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.abppkg.json b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.abppkg.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.abppkg.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj new file mode 100644 index 00000000..6ba90705 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj @@ -0,0 +1,35 @@ + + + + + + net6.0 + EShopOnAbp.CmskitService + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + + + + + + + + + + + + + + + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Program.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Program.cs new file mode 100644 index 00000000..4d1bcedf --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Program.cs @@ -0,0 +1,39 @@ +using EShopOnAbp.Shared.Hosting.AspNetCore; +using Microsoft.AspNetCore.Builder; +using Serilog; +using System; +using System.Threading.Tasks; + +namespace EShopOnAbp.CmskitService; + +public class Program +{ + public async static Task Main(string[] args) + { + var assemblyName = typeof(Program).Assembly.GetName().Name; + + SerilogConfigurationHelper.Configure(assemblyName); + + try + { + Log.Information($"Starting {assemblyName}."); + + Log.Information($"Starting {assemblyName}."); + var app = await ApplicationBuilderHelper + .BuildApplicationAsync(args); + await app.InitializeApplicationAsync(); + await app.RunAsync(); + + return 0; + } + catch (Exception ex) + { + Log.Fatal(ex, $"{assemblyName} terminated unexpectedly!"); + return 1; + } + finally + { + Log.CloseAndFlush(); + } + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Properties/launchSettings.json b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Properties/launchSettings.json new file mode 100644 index 00000000..8b708b98 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Properties/launchSettings.json @@ -0,0 +1,28 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "https://localhost:44711", + "sslPort": 44711 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "EShopOnAbp.CmskitService.HttpApi.Host": { + "commandName": "Project", + "dotnetRunMessages": "true", + "launchBrowser": true, + "applicationUrl": "https://localhost:44711", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json new file mode 100644 index 00000000..7a1a7d9a --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json @@ -0,0 +1,44 @@ +{ + "App": { + "SelfUrl": "https://localhost:44711", + "CorsOrigins": "http://localhost:4200" //https://localhost:44372,https://localhost:44373, + }, + "AuthServer": { + "Authority": "https://localhost:44322", + "RequireHttpsMetadata": "true", + "SwaggerClientId": "WebGateway_Swagger", + "SwaggerClientSecret": "1q2w3e*" + }, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*", + "ConnectionStrings": { + "CmskitService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Cmskit;Pooling=false", + "AdministrationService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;" + }, + "StringEncryption": { + "DefaultPassPhrase": "gsKnGZ041HLL4IM8" + }, + "Redis": { + "Configuration": "localhost:6379" + }, + "RabbitMQ": { + "Connections": { + "Default": { + "HostName": "localhost" + } + }, + "EventBus": { + "ClientName": "EShopOnAbp_CmskitService", + "ExchangeName": "EShopOnAbp" + } + }, + "ElasticSearch": { + "Url": "http://localhost:9200" + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.secrets.json b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.secrets.json new file mode 100644 index 00000000..aeef8045 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.secrets.json @@ -0,0 +1,3 @@ +{ + "AbpLicenseCode": "PABMAGkAYwBlAG4AcwBlAD4ACgAgACAAPABJAGQAPgA2ADQAYQA1AGEAZQBmADUALQBhADcAMQA5AC0AYwAxADYAMAAtADYAYQAwAGEALQAzADkAZQBmADEANgAzADYAZgAxAGEAZAA8AC8ASQBkAD4ACgAgACAAPABMAGkAYwBlAG4AcwBlAEEAdAB0AHIAaQBiAHUAdABlAHMAPgAKACAAIAAgACAAPABBAHQAdAByAGkAYgB1AHQAZQAgAG4AYQBtAGUAPQAiAE8AcgBnAGEAbgBpAHoAYQB0AGkAbwBuAEkAZAAiAD4ANgA0AGEANQBhAGUAZgA1AC0AYQA3ADEAOQAtAGMAMQA2ADAALQA2AGEAMABhAC0AMwA5AGUAZgAxADYAMwA2AGYAMQBhAGQAPAAvAEEAdAB0AHIAaQBiAHUAdABlAD4ACgAgACAAIAAgADwAQQB0AHQAcgBpAGIAdQB0AGUAIABuAGEAbQBlAD0AIgBPAHIAZwBhAG4AaQB6AGEAdABpAG8AbgBOAGEAbQBlACIAPgBWAG8AbABvAHMAbwBmAHQAPAAvAEEAdAB0AHIAaQBiAHUAdABlAD4ACgAgACAAIAAgADwAQQB0AHQAcgBpAGIAdQB0AGUAIABuAGEAbQBlAD0AIgBDAHIAZQBhAHQAaQBvAG4AVABpAG0AZQAiAD4AMgAwADIAMgAtADAAOQAtADEAMgAgADEAMQA6ADQAMQA6ADEAMwA8AC8AQQB0AHQAcgBpAGIAdQB0AGUAPgAKACAAIAA8AC8ATABpAGMAZQBuAHMAZQBBAHQAdAByAGkAYgB1AHQAZQBzAD4ACgAgACAAPABTAGkAZwBuAGEAdAB1AHIAZQA+AE0ARQBVAEMASQBCAFQAQQB3AFUARwBKAFEANAB1AEsAagBVAEgAZgBsADcAMQBjAHUASwBpAHYAYQAvAGUAOAA3AE0AegBEADkAegB4AEUAKwA2AG8AbABQAGQANQBaAEEAaQBFAEEAagA2AGoAWAAyADMAdgBqAEcAQwBoAEkAMgBGAGgARwB6AGwASABzAEYARwBiAEMAZgBRAE0AeQBYAHAAcABDAEsAMwAzAFAAMABCAFkATAA2AEkAWQA9ADwALwBTAGkAZwBuAGEAdAB1AHIAZQA+AAoAPAAvAEwAaQBjAGUAbgBzAGUAPgBNAEYAawB3AEUAdwBZAEgASwBvAFoASQB6AGoAMABDAEEAUQBZAEkASwBvAFoASQB6AGoAMABEAEEAUQBjAEQAUQBnAEEARQByAEkAZwB4ADUARgBvAEsAWABhADgAWQBJAFEAYgBLAGcAOQBMAFEARQBMAFQAeQBoADEAZgAzAEgAUQBPAGEANwBrAEIATQBrAGQARwBLAE0ATwBjADkARAB4AHYAWABZAE0ASAB3AGgASAB4AHIALwB5AGIAdABRAG0AMQBnAG0ASABYAFEAMQB0AFYARgBMAGIAVQBQAHkATABFAGEANQBNAEYAUQBCAEEAPQA9AF8AMQAyADQA" +} \ No newline at end of file diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceController.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceController.cs new file mode 100644 index 00000000..d9514acd --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceController.cs @@ -0,0 +1,12 @@ +using EShopOnAbp.CmskitService.Localization; +using Volo.Abp.AspNetCore.Mvc; + +namespace EShopOnAbp.CmskitService; + +public abstract class CmskitServiceController : AbpControllerBase +{ + protected CmskitServiceController() + { + LocalizationResource = typeof(CmskitServiceResource); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs new file mode 100644 index 00000000..d4ce36ec --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs @@ -0,0 +1,32 @@ +using Localization.Resources.AbpUi; +using Microsoft.Extensions.DependencyInjection; +using EShopOnAbp.CmskitService.Localization; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Localization; +using Volo.Abp.Modularity; + +namespace EShopOnAbp.CmskitService; + +[DependsOn( + typeof(CmskitServiceApplicationContractsModule), + typeof(AbpAspNetCoreMvcModule))] +public class CmskitServiceHttpApiModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(CmskitServiceHttpApiModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.Resources + .Get() + .AddBaseTypes(typeof(AbpUiResource)); + }); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/EShopOnAbp.CmskitService.HttpApi.abppkg.json b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/EShopOnAbp.CmskitService.HttpApi.abppkg.json new file mode 100644 index 00000000..515bfe64 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/EShopOnAbp.CmskitService.HttpApi.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.http-api" +} \ No newline at end of file diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/EShopOnAbp.CmskitService.HttpApi.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/EShopOnAbp.CmskitService.HttpApi.csproj new file mode 100644 index 00000000..e74364be --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/EShopOnAbp.CmskitService.HttpApi.csproj @@ -0,0 +1,15 @@ + + + + + + net6.0 + EShopOnAbp.CmskitService + + + + + + + + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/Samples/SampleController.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/Samples/SampleController.cs new file mode 100644 index 00000000..f332db58 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/Samples/SampleController.cs @@ -0,0 +1,34 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; + +namespace EShopOnAbp.CmskitService.Samples; + +[RemoteService(Name = CmskitServiceRemoteServiceConsts.RemoteServiceName)] +[Area("CmskitService")] +[ControllerName("CmskitService")] +[Route("api/CmskitService/sample")] +public class SampleController : CmskitServiceController, ISampleAppService +{ + private readonly ISampleAppService _sampleAppService; + + public SampleController(ISampleAppService sampleAppService) + { + _sampleAppService = sampleAppService; + } + + [HttpGet] + public async Task GetAsync() + { + return await _sampleAppService.GetAsync(); + } + + [HttpGet] + [Route("authorized")] + [Authorize] + public async Task GetAuthorizedAsync() + { + return await _sampleAppService.GetAsync(); + } +} diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/CmskitServiceApplicationTestBase.cs b/services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/CmskitServiceApplicationTestBase.cs new file mode 100644 index 00000000..7d625ee1 --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/CmskitServiceApplicationTestBase.cs @@ -0,0 +1,9 @@ +namespace EShopOnAbp.CmskitService; + +/* Inherit from this class for your application layer tests. + * See SampleAppService_Tests for example. + */ +public abstract class CmskitServiceApplicationTestBase : CmskitServiceTestBase +{ + +} diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/CmskitServiceApplicationTestModule.cs b/services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/CmskitServiceApplicationTestModule.cs new file mode 100644 index 00000000..c96cd8fd --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/CmskitServiceApplicationTestModule.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Modularity; + +namespace EShopOnAbp.CmskitService; + +[DependsOn( + typeof(CmskitServiceApplicationModule), + typeof(CmskitServiceDomainTestModule) + )] +public class CmskitServiceApplicationTestModule : AbpModule +{ + +} diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/EShopOnAbp.CmskitService.Application.Tests.abppkg.json b/services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/EShopOnAbp.CmskitService.Application.Tests.abppkg.json new file mode 100644 index 00000000..a686451f --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/EShopOnAbp.CmskitService.Application.Tests.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.test" +} \ No newline at end of file diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/EShopOnAbp.CmskitService.Application.Tests.csproj b/services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/EShopOnAbp.CmskitService.Application.Tests.csproj new file mode 100644 index 00000000..eb54740f --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/EShopOnAbp.CmskitService.Application.Tests.csproj @@ -0,0 +1,17 @@ + + + + net6.0 + EShopOnAbp.CmskitService + + + + + + + + + + + + diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/Samples/SampleAppService_Tests.cs b/services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/Samples/SampleAppService_Tests.cs new file mode 100644 index 00000000..8db24de9 --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.Application.Tests/Samples/SampleAppService_Tests.cs @@ -0,0 +1,17 @@ +namespace EShopOnAbp.CmskitService.Samples; + +public class SampleAppService_Tests : CmskitServiceApplicationTestBase +{ + //private readonly ISampleAppService _sampleAppService; + + public SampleAppService_Tests() + { + //_sampleAppService = GetRequiredService(); + } + + // [Fact] + // public async Task Method1Async() + // { + // + // } +} diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/CmskitServiceDomainTestBase.cs b/services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/CmskitServiceDomainTestBase.cs new file mode 100644 index 00000000..6509454a --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/CmskitServiceDomainTestBase.cs @@ -0,0 +1,9 @@ +namespace EShopOnAbp.CmskitService; + +/* Inherit from this class for your domain layer tests. + * See SampleManager_Tests for example. + */ +public abstract class CmskitServiceDomainTestBase : CmskitServiceTestBase +{ + +} diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/CmskitServiceDomainTestModule.cs b/services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/CmskitServiceDomainTestModule.cs new file mode 100644 index 00000000..8c69dcd3 --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/CmskitServiceDomainTestModule.cs @@ -0,0 +1,16 @@ +using EShopOnAbp.CmskitService.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace EShopOnAbp.CmskitService; + +/* Domain tests are configured to use the EF Core provider. + * You can switch to MongoDB, however your domain tests should be + * database independent anyway. + */ +[DependsOn( + typeof(CmskitServiceEntityFrameworkCoreTestModule) + )] +public class CmskitServiceDomainTestModule : AbpModule +{ + +} diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/EShopOnAbp.CmskitService.Domain.Tests.abppkg.json b/services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/EShopOnAbp.CmskitService.Domain.Tests.abppkg.json new file mode 100644 index 00000000..a686451f --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/EShopOnAbp.CmskitService.Domain.Tests.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.test" +} \ No newline at end of file diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/EShopOnAbp.CmskitService.Domain.Tests.csproj b/services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/EShopOnAbp.CmskitService.Domain.Tests.csproj new file mode 100644 index 00000000..08442ad6 --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/EShopOnAbp.CmskitService.Domain.Tests.csproj @@ -0,0 +1,16 @@ + + + + net6.0 + EShopOnAbp.CmskitService + + + + + + + + + + + diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/Samples/SampleManager_Tests.cs b/services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/Samples/SampleManager_Tests.cs new file mode 100644 index 00000000..1bd6fd53 --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.Domain.Tests/Samples/SampleManager_Tests.cs @@ -0,0 +1,17 @@ +namespace EShopOnAbp.CmskitService.Samples; + +public class SampleManager_Tests : CmskitServiceDomainTestBase +{ + //private readonly SampleManager _sampleManager; + + public SampleManager_Tests() + { + //_sampleManager = GetRequiredService(); + } + + // [Fact] + // public async Task Method1Async() + // { + // + // } +} diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests.abppkg.json b/services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests.abppkg.json new file mode 100644 index 00000000..a686451f --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests.abppkg.json @@ -0,0 +1,3 @@ +{ + "role": "lib.test" +} \ No newline at end of file diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests.csproj b/services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests.csproj new file mode 100644 index 00000000..35a6c7c3 --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests.csproj @@ -0,0 +1,19 @@ + + + + net6.0 + EShopOnAbp.CmskitService + + + + + + + + + + + + + + diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreTestBase.cs b/services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreTestBase.cs new file mode 100644 index 00000000..9282648f --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreTestBase.cs @@ -0,0 +1,9 @@ +namespace EShopOnAbp.CmskitService.EntityFrameworkCore; + +/* This class can be used as a base class for EF Core integration tests, + * while SampleRepository_Tests uses a different approach. + */ +public abstract class CmskitServiceEntityFrameworkCoreTestBase : CmskitServiceTestBase +{ + +} diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreTestModule.cs b/services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreTestModule.cs new file mode 100644 index 00000000..bc5b1a4a --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.EntityFrameworkCore.Tests/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreTestModule.cs @@ -0,0 +1,42 @@ +using Microsoft.Data.Sqlite; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Sqlite; +using Volo.Abp.Modularity; + +namespace EShopOnAbp.CmskitService.EntityFrameworkCore; + +[DependsOn( + typeof(CmskitServiceTestBaseModule), + typeof(CmskitServiceEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreSqliteModule) +)] +public class CmskitServiceEntityFrameworkCoreTestModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + var sqliteConnection = CreateDatabaseAndGetConnection(); + + Configure(options => + { + options.Configure(abpDbContextConfigurationContext => + { + abpDbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection); + }); + }); + } + + private static SqliteConnection CreateDatabaseAndGetConnection() + { + var connection = new SqliteConnection("Data Source=:memory:"); + connection.Open(); + + new CmskitServiceDbContext( + new DbContextOptionsBuilder().UseSqlite(connection).Options + ).GetService().CreateTables(); + + return connection; + } +} diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/CmskitServiceDataSeedContributor.cs b/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/CmskitServiceDataSeedContributor.cs new file mode 100644 index 00000000..17d67cc4 --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/CmskitServiceDataSeedContributor.cs @@ -0,0 +1,15 @@ +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; + +namespace EShopOnAbp.CmskitService; + +public class CmskitServiceDataSeedContributor : IDataSeedContributor, ITransientDependency +{ + public Task SeedAsync(DataSeedContext context) + { + /* Seed additional test data... */ + + return Task.CompletedTask; + } +} diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/CmskitServiceTestBase.cs b/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/CmskitServiceTestBase.cs new file mode 100644 index 00000000..ac0ed7f9 --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/CmskitServiceTestBase.cs @@ -0,0 +1,59 @@ +using System; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; +using Volo.Abp.Modularity; +using Volo.Abp.Testing; +using Volo.Abp.Uow; + +namespace EShopOnAbp.CmskitService; + +/* All test classes are derived from this class, directly or indirectly. */ +public abstract class CmskitServiceTestBase : AbpIntegratedTest + where TStartupModule : IAbpModule +{ + protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) + { + options.UseAutofac(); + } + + protected virtual Task WithUnitOfWorkAsync(Func func) + { + return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); + } + + protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func action) + { + using (var scope = ServiceProvider.CreateScope()) + { + var uowManager = scope.ServiceProvider.GetRequiredService(); + + using (var uow = uowManager.Begin(options)) + { + await action(); + + await uow.CompleteAsync(); + } + } + } + + protected virtual Task WithUnitOfWorkAsync(Func> func) + { + return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); + } + + protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func> func) + { + using (var scope = ServiceProvider.CreateScope()) + { + var uowManager = scope.ServiceProvider.GetRequiredService(); + + using (var uow = uowManager.Begin(options)) + { + var result = await func(); + await uow.CompleteAsync(); + return result; + } + } + } +} diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/CmskitServiceTestBaseModule.cs b/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/CmskitServiceTestBaseModule.cs new file mode 100644 index 00000000..03727a1c --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/CmskitServiceTestBaseModule.cs @@ -0,0 +1,41 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; +using Volo.Abp.Authorization; +using Volo.Abp.Autofac; +using Volo.Abp.Data; +using Volo.Abp.Modularity; +using Volo.Abp.Threading; + +namespace EShopOnAbp.CmskitService; + +[DependsOn( + typeof(AbpAutofacModule), + typeof(AbpTestBaseModule), + typeof(AbpAuthorizationModule), + typeof(CmskitServiceDomainModule) +)] +public class CmskitServiceTestBaseModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAlwaysAllowAuthorization(); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + SeedTestData(context); + } + + private static void SeedTestData(ApplicationInitializationContext context) + { + AsyncHelper.RunSync(async () => + { + using (var scope = context.ServiceProvider.CreateScope()) + { + await scope.ServiceProvider + .GetRequiredService() + .SeedAsync(); + } + }); + } +} diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/EShopOnAbp.CmskitService.TestBase.abppkg.json b/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/EShopOnAbp.CmskitService.TestBase.abppkg.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/EShopOnAbp.CmskitService.TestBase.abppkg.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/EShopOnAbp.CmskitService.TestBase.csproj b/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/EShopOnAbp.CmskitService.TestBase.csproj new file mode 100644 index 00000000..25390da0 --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/EShopOnAbp.CmskitService.TestBase.csproj @@ -0,0 +1,24 @@ + + + + net6.0 + EShopOnAbp.CmskitService + + + + + + + + + + + + + + + + + + + diff --git a/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/Security/FakeCurrentPrincipalAccessor.cs b/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/Security/FakeCurrentPrincipalAccessor.cs new file mode 100644 index 00000000..e3cc9729 --- /dev/null +++ b/services/cmskit/test/EShopOnAbp.CmskitService.TestBase/Security/FakeCurrentPrincipalAccessor.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Security.Claims; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Security.Claims; + +namespace EShopOnAbp.CmskitService.Security; + +[Dependency(ReplaceServices = true)] +public class FakeCurrentPrincipalAccessor : ICurrentPrincipalAccessor, ISingletonDependency +{ + public ClaimsPrincipal Principal => GetPrincipal(); + private ClaimsPrincipal _principal; + + private ClaimsPrincipal GetPrincipal() + { + if (_principal == null) + { + lock (this) + { + if (_principal == null) + { + _principal = new ClaimsPrincipal( + new ClaimsIdentity( + new List + { + new Claim(AbpClaimTypes.UserId,"2e701e62-0953-4dd3-910b-dc6cc93ccb0d"), + new Claim(AbpClaimTypes.UserName,"admin"), + new Claim(AbpClaimTypes.Email,"admin@abp.io") + } + ) + ); + } + } + } + + return _principal; + } + + public IDisposable Change(ClaimsPrincipal principal) + { + _principal = principal; + return null; + } +} From ce52a67a9feac136bc3b2ae727762885a319b40c Mon Sep 17 00:00:00 2001 From: malik masis Date: Tue, 13 Sep 2022 14:12:31 +0300 Subject: [PATCH 02/29] Configured the port as 44358 for cmskit --- apps/angular/src/environments/environment.ts | 4 ++++ .../src/EShopOnAbp.AuthServer/appsettings.json | 2 +- .../src/EShopOnAbp.WebPublicGateway/yarp.json | 7 +++++++ gateways/web/src/EShopOnAbp.WebGateway/yarp.json | 7 +++++++ .../Properties/launchSettings.json | 6 +++--- .../appsettings.json | 6 +++--- .../appsettings.Docker.json | 3 +++ .../appsettings.json | 3 +++ tye.yaml | 11 +++++++++++ 9 files changed, 42 insertions(+), 7 deletions(-) diff --git a/apps/angular/src/environments/environment.ts b/apps/angular/src/environments/environment.ts index a5f81a2f..9c3c768d 100644 --- a/apps/angular/src/environments/environment.ts +++ b/apps/angular/src/environments/environment.ts @@ -28,6 +28,10 @@ export const environment = { Ordering: { url: "https://localhost:44356", rootNamespace: 'EShopOnAbp.OrderingService', + }, + Cmskit: { + url: "https://localhost:44358", + rootNamespace: 'EShopOnAbp.CmskitService', } }, mediaServerUrl:'https://localhost:44335' diff --git a/apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json b/apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json index 2f998642..7d637ec1 100644 --- a/apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json +++ b/apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json @@ -1,7 +1,7 @@ { "App": { "SelfUrl": "https://localhost:44330", - "CorsOrigins": "http://localhost:4200,https://localhost:44351,https://localhost:44353,https://localhost:44354,https://localhost:44355,https://localhost:44356,https://localhost:44357,https://localhost:44372,https://localhost:44373", + "CorsOrigins": "http://localhost:4200,https://localhost:44351,https://localhost:44353,https://localhost:44354,https://localhost:44355,https://localhost:44356,https://localhost:44357,https://localhost:44358,https://localhost:44372,https://localhost:44373", "RedirectAllowedUrls": "http://localhost:4200" }, "Logging": { diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json index ffbfd570..235c049b 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json @@ -88,6 +88,13 @@ } } }, + "cmskitCluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44358" + } + } + }, "productPictureCluster": { "Destinations": { "destination1": { diff --git a/gateways/web/src/EShopOnAbp.WebGateway/yarp.json b/gateways/web/src/EShopOnAbp.WebGateway/yarp.json index d14ce8ee..595ca639 100644 --- a/gateways/web/src/EShopOnAbp.WebGateway/yarp.json +++ b/gateways/web/src/EShopOnAbp.WebGateway/yarp.json @@ -106,6 +106,13 @@ "Address": "https://localhost:44356" } } + }, + "cmskitCluster": { + "Destinations": { + "destination1": { + "Address": "https://localhost:44358" + } + } } } } diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Properties/launchSettings.json b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Properties/launchSettings.json index 8b708b98..78cec03e 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Properties/launchSettings.json +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Properties/launchSettings.json @@ -3,8 +3,8 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "https://localhost:44711", - "sslPort": 44711 + "applicationUrl": "https://localhost:44358", + "sslPort": 44358 } }, "profiles": { @@ -19,7 +19,7 @@ "commandName": "Project", "dotnetRunMessages": "true", "launchBrowser": true, - "applicationUrl": "https://localhost:44711", + "applicationUrl": "https://localhost:44358", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json index 7a1a7d9a..4788a2cc 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json @@ -1,10 +1,10 @@ { "App": { - "SelfUrl": "https://localhost:44711", - "CorsOrigins": "http://localhost:4200" //https://localhost:44372,https://localhost:44373, + "SelfUrl": "https://localhost:44358", + "CorsOrigins": "https://localhost:44372,https://localhost:44373,http://localhost:4200" }, "AuthServer": { - "Authority": "https://localhost:44322", + "Authority": "https://localhost:44330", "RequireHttpsMetadata": "true", "SwaggerClientId": "WebGateway_Swagger", "SwaggerClientSecret": "1q2w3e*" diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.Docker.json b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.Docker.json index 0f625175..9888347c 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.Docker.json +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.Docker.json @@ -60,6 +60,9 @@ }, "PaymentService": { "RootUrl": "https://localhost:44357" + }, + "CmskitService": { + "RootUrl": "https://localhost:44358" } } } diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json index 8f53f8ad..b218bdf1 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json @@ -74,6 +74,9 @@ }, "PaymentService": { "RootUrl": "https://localhost:44357" + }, + "CmskitService": { + "RootUrl": "https://localhost:44358" } } } diff --git a/tye.yaml b/tye.yaml index efcd5f22..dfdd4447 100644 --- a/tye.yaml +++ b/tye.yaml @@ -64,6 +64,17 @@ services: - Kestrel__Certificates__Default__Password=8b6039b6-c67a-448b-977b-0ce6d3fcfd49 env_file: - ./.env + +- name: cmskit-service + project: services/payment/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj + bindings: + - protocol: https + port: 44358 + env: + - Kestrel__Certificates__Default__Path=../../../../etc/dev-cert/localhost.pfx + - Kestrel__Certificates__Default__Password=8b6039b6-c67a-448b-977b-0ce6d3fcfd49 + env_file: + - ./.env - name: web-gateway project: gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj From c9f0f565bf74a909cb94663a6bebb6fcb02bbc57 Mon Sep 17 00:00:00 2001 From: malik masis Date: Tue, 13 Sep 2022 15:41:43 +0300 Subject: [PATCH 03/29] Updated Administration ms --- .../AdministrationServiceApplicationContractsModule.cs | 4 +++- ...opOnAbp.AdministrationService.Application.Contracts.csproj | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/services/administration/src/EShopOnAbp.AdministrationService.Application.Contracts/AdministrationServiceApplicationContractsModule.cs b/services/administration/src/EShopOnAbp.AdministrationService.Application.Contracts/AdministrationServiceApplicationContractsModule.cs index bba3badb..9c5af167 100644 --- a/services/administration/src/EShopOnAbp.AdministrationService.Application.Contracts/AdministrationServiceApplicationContractsModule.cs +++ b/services/administration/src/EShopOnAbp.AdministrationService.Application.Contracts/AdministrationServiceApplicationContractsModule.cs @@ -3,6 +3,7 @@ using Volo.Abp.PermissionManagement; using Volo.Abp.SettingManagement; using EShopOnAbp.CatalogService; using EShopOnAbp.OrderingService; +using EShopOnAbp.CmskitService; namespace EShopOnAbp.AdministrationService { @@ -11,7 +12,8 @@ namespace EShopOnAbp.AdministrationService typeof(AdministrationServiceDomainSharedModule), typeof(AbpPermissionManagementApplicationContractsModule), typeof(AbpSettingManagementApplicationContractsModule), - typeof(OrderingServiceApplicationContractsModule) + typeof(OrderingServiceApplicationContractsModule), + typeof(CmskitServiceApplicationContractsModule) )] public class AdministrationServiceApplicationContractsModule : AbpModule { diff --git a/services/administration/src/EShopOnAbp.AdministrationService.Application.Contracts/EShopOnAbp.AdministrationService.Application.Contracts.csproj b/services/administration/src/EShopOnAbp.AdministrationService.Application.Contracts/EShopOnAbp.AdministrationService.Application.Contracts.csproj index 68c19a35..f1e6d195 100644 --- a/services/administration/src/EShopOnAbp.AdministrationService.Application.Contracts/EShopOnAbp.AdministrationService.Application.Contracts.csproj +++ b/services/administration/src/EShopOnAbp.AdministrationService.Application.Contracts/EShopOnAbp.AdministrationService.Application.Contracts.csproj @@ -9,6 +9,7 @@ + From 2d5c5e7a6df3f472fbbb7c2f7a9532b690ecf90d Mon Sep 17 00:00:00 2001 From: malik masis Date: Tue, 13 Sep 2022 15:41:51 +0300 Subject: [PATCH 04/29] IdentityServer Configuration --- .../DbMigrations/IdentityServerDataSeeder.cs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs index 8d3a833d..37160541 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs @@ -90,6 +90,7 @@ public class IdentityServerDataSeeder : IDataSeedContributor, ITransientDependen await CreateApiResourceAsync("BasketService", commonApiUserClaims); await CreateApiResourceAsync("OrderingService", commonApiUserClaims); await CreateApiResourceAsync("PaymentService", commonApiUserClaims); + await CreateApiResourceAsync("CmskitService", commonApiUserClaims); } private async Task CreateApiScopesAsync() @@ -101,6 +102,7 @@ public class IdentityServerDataSeeder : IDataSeedContributor, ITransientDependen await CreateApiScopeAsync("BasketService"); await CreateApiScopeAsync("OrderingService"); await CreateApiScopeAsync("PaymentService"); + await CreateApiScopeAsync("CmskitService"); } private async Task CreateSwaggerClientsAsync() @@ -114,7 +116,8 @@ public class IdentityServerDataSeeder : IDataSeedContributor, ITransientDependen "CatalogService", "BasketService", "PaymentService", - "OrderingService" + "OrderingService", + "CmskitService" }); } @@ -144,6 +147,7 @@ public class IdentityServerDataSeeder : IDataSeedContributor, ITransientDependen var basketServiceRootUrl = _configuration[$"IdentityServerClients:BasketService:RootUrl"].TrimEnd('/'); var orderingServiceRootUrl = _configuration[$"IdentityServerClients:OrderingService:RootUrl"].TrimEnd('/'); var paymentServiceRootUrl = _configuration[$"IdentityServerClients:PaymentService:RootUrl"].TrimEnd('/'); + var cmskitServiceRootUrl = _configuration[$"IdentityServerClients:CmskitService:RootUrl"].TrimEnd('/'); await CreateClientAsync( name: swaggerClientId, @@ -161,7 +165,8 @@ public class IdentityServerDataSeeder : IDataSeedContributor, ITransientDependen $"{catalogServiceRootUrl}/swagger/oauth2-redirect.html", // CatalogService redirect uri $"{basketServiceRootUrl}/swagger/oauth2-redirect.html", // BasketService redirect uri $"{orderingServiceRootUrl}/swagger/oauth2-redirect.html", // OrderingService redirect uri - $"{paymentServiceRootUrl}/swagger/oauth2-redirect.html" // PaymentService redirect uri + $"{paymentServiceRootUrl}/swagger/oauth2-redirect.html", // PaymentService redirect uri + $"{cmskitServiceRootUrl}/swagger/oauth2-redirect.html" // CmskitService redirect uri }, corsOrigins: new[] { @@ -173,7 +178,8 @@ public class IdentityServerDataSeeder : IDataSeedContributor, ITransientDependen catalogServiceRootUrl.RemovePostFix("/"), basketServiceRootUrl.RemovePostFix("/"), orderingServiceRootUrl.RemovePostFix("/"), - paymentServiceRootUrl.RemovePostFix("/") + paymentServiceRootUrl.RemovePostFix("/"), + cmskitServiceRootUrl.RemovePostFix("/") } ); } @@ -247,7 +253,8 @@ public class IdentityServerDataSeeder : IDataSeedContributor, ITransientDependen "CatalogService", "BasketService", "PaymentService", - "OrderingService" + "OrderingService", + "CmskitService" }), grantTypes: new[] { "hybrid" }, secret: "1q2w3e*".Sha256(), @@ -268,7 +275,8 @@ public class IdentityServerDataSeeder : IDataSeedContributor, ITransientDependen "IdentityService", "AdministrationService", "CatalogService", - "OrderingService" + "OrderingService", + "CmskitService" }), grantTypes: new[] { "authorization_code", "LinkLogin", "password" }, secret: "1q2w3e*".Sha256(), From ac2d8406f55c63457facd2679f72ba898e557fb6 Mon Sep 17 00:00:00 2001 From: malik masis Date: Tue, 13 Sep 2022 15:54:54 +0300 Subject: [PATCH 05/29] Configured WebGateway --- gateways/web/src/EShopOnAbp.WebGateway/Dockerfile | 1 + .../EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs | 8 ++++---- gateways/web/src/EShopOnAbp.WebGateway/yarp.json | 6 ++++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gateways/web/src/EShopOnAbp.WebGateway/Dockerfile b/gateways/web/src/EShopOnAbp.WebGateway/Dockerfile index 04608834..846a3d6f 100644 --- a/gateways/web/src/EShopOnAbp.WebGateway/Dockerfile +++ b/gateways/web/src/EShopOnAbp.WebGateway/Dockerfile @@ -28,6 +28,7 @@ COPY "services/basket/src/EShopOnAbp.BasketService/EShopOnAbp.BasketService.cspr COPY "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" COPY "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" COPY "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" +COPY "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" # Gateways COPY "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" diff --git a/gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs b/gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs index d92c0572..221d2295 100644 --- a/gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs +++ b/gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs @@ -1,16 +1,15 @@ -using EShopOnAbp.Shared.Hosting.Gateways; +using EShopOnAbp.Shared.Hosting.AspNetCore; +using EShopOnAbp.Shared.Hosting.Gateways; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Cors; -using Microsoft.Extensions.Configuration; +using Microsoft.AspNetCore.Rewrite; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using System; using System.Collections.Generic; using System.Linq; -using EShopOnAbp.Shared.Hosting.AspNetCore; using Volo.Abp; using Volo.Abp.Modularity; -using Microsoft.AspNetCore.Rewrite; namespace EShopOnAbp.WebGateway; @@ -37,6 +36,7 @@ public class EShopOnAbpWebGatewayModule : AbpModule {"BasketService", "Basket Service API"}, {"PaymentService", "Payment Service API"}, {"OrderingService", "Ordering Service API"}, + {"CmskitService", "Cmskit Service API"}, }, apiTitle: "Web Gateway" ); diff --git a/gateways/web/src/EShopOnAbp.WebGateway/yarp.json b/gateways/web/src/EShopOnAbp.WebGateway/yarp.json index 595ca639..14e6e5a8 100644 --- a/gateways/web/src/EShopOnAbp.WebGateway/yarp.json +++ b/gateways/web/src/EShopOnAbp.WebGateway/yarp.json @@ -48,6 +48,12 @@ "Match": { "Path": "/api/ordering/{**everything}" } + }, + "Cmskit Service": { + "ClusterId": "cmskitCluster", + "Match": { + "Path": "/api/cmskit/{**everything}" + } } }, "Clusters": { From 5875a6a62e59cd23360e2a51cc729f1c96d30161 Mon Sep 17 00:00:00 2001 From: malik masis Date: Tue, 13 Sep 2022 16:06:52 +0300 Subject: [PATCH 06/29] Configured WebPublicGateway --- .../src/EShopOnAbp.WebPublicGateway/Dockerfile | 1 + .../EShopOnAbpWebPublicGatewayModule.cs | 13 +++++++------ .../appsettings.Docker.json | 17 +++++++++++++++-- .../appsettings.Staging.json | 17 +++++++++++++++-- 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Dockerfile b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Dockerfile index f998efe9..49ea9b3f 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Dockerfile +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Dockerfile @@ -28,6 +28,7 @@ COPY "services/basket/src/EShopOnAbp.BasketService/EShopOnAbp.BasketService.cspr COPY "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" COPY "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" COPY "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" +COPY "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" # Gateways COPY "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs index d99b84ab..91b26fba 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs @@ -1,13 +1,13 @@ -using EShopOnAbp.Shared.Hosting.Gateways; +using EShopOnAbp.Shared.Hosting.AspNetCore; +using EShopOnAbp.Shared.Hosting.Gateways; using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Rewrite; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using System.Collections.Generic; -using EShopOnAbp.Shared.Hosting.AspNetCore; -using Microsoft.AspNetCore.Http; using Volo.Abp; using Volo.Abp.Modularity; -using Microsoft.AspNetCore.Rewrite; namespace EShopOnAbp.WebPublicGateway; @@ -33,6 +33,7 @@ public class EShopOnAbpWebPublicGatewayModule : AbpModule { "BasketService", "Basket Service API" }, { "PaymentService", "Payment Service API" }, { "OrderingService", "Ordering Service API" }, + { "CmskitService", "Cmskit Service API" }, }, apiTitle: "WebPublic Gateway" ); @@ -54,11 +55,11 @@ public class EShopOnAbpWebPublicGatewayModule : AbpModule app.UseCorrelationId(); app.UseAbpSerilogEnrichers(); app.UseSwaggerUIWithYarp(context); - + app.UseRewriter(new RewriteOptions() // Regex for "", "/" and "" (whitespace) .AddRedirect("^(|\\|\\s+)$", "/swagger")); - + app.UseRouting(); app.UseEndpoints(endpoints => { diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Docker.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Docker.json index 6e3ee56f..6c082207 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Docker.json +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Docker.json @@ -37,11 +37,17 @@ "Path": "/api/payment/{**everything}" } }, + "Cmskit Service": { + "ClusterId": "cmskitCluster", + "Match": { + "Path": "/api/cmskit/{**everything}" + } + }, "product-picture-route": { "ClusterId": "productPictureCluster", "Match": { "Path": "/product-images/{**everything}", - "Methods" : [ "GET" ] + "Methods": [ "GET" ] } } }, @@ -73,7 +79,7 @@ "Address": "http://basket-service" } } - }, + }, "orderingCluster": { "Destinations": { "destination1": { @@ -88,6 +94,13 @@ } } }, + "cmskitCluster": { + "Destinations": { + "destination1": { + "Address": "http://cmskit-service" + } + } + }, "productPictureCluster": { "Destinations": { "destination1": { diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Staging.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Staging.json index c4e04d13..4aa66c8b 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Staging.json +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.Staging.json @@ -37,11 +37,17 @@ "Path": "/api/payment/{**everything}" } }, + "Cmskit Service": { + "ClusterId": "cmskitCluster", + "Match": { + "Path": "/api/cmskit/{**everything}" + } + }, "product-picture-route": { "ClusterId": "productPictureCluster", "Match": { "Path": "/product-images/{**everything}", - "Methods" : [ "GET" ] + "Methods": [ "GET" ] } } }, @@ -73,7 +79,7 @@ "Address": "http://eshop-st-basket" } } - }, + }, "orderingCluster": { "Destinations": { "destination1": { @@ -88,6 +94,13 @@ } } }, + "cmskitCluster": { + "Destinations": { + "destination1": { + "Address": "http://eshop-st-cmskit" + } + } + }, "productPictureCluster": { "Destinations": { "destination1": { From e51bf5d2ce7a707adab893bf6b5ec8298d9c5b9d Mon Sep 17 00:00:00 2001 From: malik masis Date: Tue, 13 Sep 2022 16:17:17 +0300 Subject: [PATCH 07/29] Configured PublicWeb --- apps/public-web/src/EShopOnAbp.PublicWeb/Dockerfile | 1 + .../EShopOnAbp.PublicWeb.csproj | 3 ++- .../EShopOnAbpPublicWebModule.cs | 13 ++++++++----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Dockerfile b/apps/public-web/src/EShopOnAbp.PublicWeb/Dockerfile index 66cf0344..1f6a8c8a 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/Dockerfile +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Dockerfile @@ -28,6 +28,7 @@ COPY "services/basket/src/EShopOnAbp.BasketService/EShopOnAbp.BasketService.cspr COPY "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" COPY "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" COPY "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" +COPY "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" # Gateways COPY "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj index 342de04c..6f7cc765 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj @@ -28,7 +28,8 @@ - + + diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs index 765579ff..37690f25 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs @@ -1,5 +1,6 @@ using EShopOnAbp.BasketService; using EShopOnAbp.CatalogService; +using EShopOnAbp.CmskitService; using EShopOnAbp.Localization; using EShopOnAbp.OrderingService; using EShopOnAbp.PaymentService; @@ -10,18 +11,18 @@ using EShopOnAbp.PublicWeb.Menus; using EShopOnAbp.PublicWeb.PaymentMethods; using EShopOnAbp.Shared.Hosting.AspNetCore; using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Authentication.OpenIdConnect; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.DataProtection; +using Microsoft.AspNetCore.HttpOverrides; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.IdentityModel.Protocols.OpenIdConnect; +using Polly; using StackExchange.Redis; using System; using System.Net.Http.Headers; -using Microsoft.AspNetCore.Authentication.OpenIdConnect; -using Microsoft.AspNetCore.HttpOverrides; -using Polly; using Volo.Abp; using Volo.Abp.Account; using Volo.Abp.AspNetCore.Authentication.OpenIdConnect; @@ -61,6 +62,7 @@ namespace EShopOnAbp.PublicWeb; typeof(CatalogServiceHttpApiClientModule), typeof(BasketServiceContractsModule), typeof(OrderingServiceHttpApiClientModule), + typeof(CmskitServiceHttpApiClientModule), typeof(AbpAspNetCoreSignalRModule), typeof(PaymentServiceHttpApiClientModule), typeof(AbpAutoMapperModule) @@ -76,7 +78,7 @@ public class EShopOnAbpPublicWebModule : AbpModule typeof(EShopOnAbpPublicWebModule).Assembly ); }); - + PreConfigure(options => { options.ProxyClientBuildActions.Add((remoteServiceName, clientBuilder) => @@ -150,6 +152,7 @@ public class EShopOnAbpPublicWebModule : AbpModule options.Scope.Add("CatalogService"); options.Scope.Add("PaymentService"); options.Scope.Add("OrderingService"); + options.Scope.Add("CmskitService"); }); if (Convert.ToBoolean(configuration["AuthServer:IsOnProd"])) { @@ -263,7 +266,7 @@ public class EShopOnAbpPublicWebModule : AbpModule { app.UseErrorPage(); } - + app.UseForwardedHeaders(new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto From 825eb9a01edd4aa35d77a64d4a771459b57b6310 Mon Sep 17 00:00:00 2001 From: malik masis Date: Tue, 13 Sep 2022 18:36:23 +0300 Subject: [PATCH 08/29] Dockerfile configuration --- apps/auth-server/src/EShopOnAbp.AuthServer/Dockerfile | 1 + .../src/EShopOnAbp.AdministrationService.HttpApi.Host/Dockerfile | 1 + services/basket/src/EShopOnAbp.BasketService/Dockerfile | 1 + .../src/EShopOnAbp.CatalogService.HttpApi.Host/Dockerfile | 1 + .../src/EShopOnAbp.IdentityService.HttpApi.Host/Dockerfile | 1 + .../src/EShopOnAbp.OrderingService.HttpApi.Host/Dockerfile | 1 + .../src/EShopOnAbp.PaymentService.HttpApi.Host/Dockerfile | 1 + 7 files changed, 7 insertions(+) diff --git a/apps/auth-server/src/EShopOnAbp.AuthServer/Dockerfile b/apps/auth-server/src/EShopOnAbp.AuthServer/Dockerfile index 39638bea..ef2200a0 100644 --- a/apps/auth-server/src/EShopOnAbp.AuthServer/Dockerfile +++ b/apps/auth-server/src/EShopOnAbp.AuthServer/Dockerfile @@ -28,6 +28,7 @@ COPY "services/basket/src/EShopOnAbp.BasketService/EShopOnAbp.BasketService.cspr COPY "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" COPY "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" COPY "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" +COPY "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" # Gateways COPY "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" diff --git a/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/Dockerfile b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/Dockerfile index 4616da93..66344c47 100644 --- a/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/Dockerfile +++ b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/Dockerfile @@ -28,6 +28,7 @@ COPY "services/basket/src/EShopOnAbp.BasketService/EShopOnAbp.BasketService.cspr COPY "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" COPY "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" COPY "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" +COPY "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" # Gateways COPY "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" diff --git a/services/basket/src/EShopOnAbp.BasketService/Dockerfile b/services/basket/src/EShopOnAbp.BasketService/Dockerfile index bd9e7d96..fef45355 100644 --- a/services/basket/src/EShopOnAbp.BasketService/Dockerfile +++ b/services/basket/src/EShopOnAbp.BasketService/Dockerfile @@ -28,6 +28,7 @@ COPY "services/basket/src/EShopOnAbp.BasketService/EShopOnAbp.BasketService.cspr COPY "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" COPY "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" COPY "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" +COPY "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" # Gateways COPY "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" diff --git a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/Dockerfile b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/Dockerfile index ebafdf5a..245a8e3f 100644 --- a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/Dockerfile +++ b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/Dockerfile @@ -28,6 +28,7 @@ COPY "services/basket/src/EShopOnAbp.BasketService/EShopOnAbp.BasketService.cspr COPY "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" COPY "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" COPY "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" +COPY "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" # Gateways COPY "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/Dockerfile b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/Dockerfile index ab54ccc2..316f73e1 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/Dockerfile +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/Dockerfile @@ -28,6 +28,7 @@ COPY "services/basket/src/EShopOnAbp.BasketService/EShopOnAbp.BasketService.cspr COPY "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" COPY "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" COPY "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" +COPY "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" # Gateways COPY "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" diff --git a/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/Dockerfile b/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/Dockerfile index a9cdee4d..24d9aae4 100644 --- a/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/Dockerfile +++ b/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/Dockerfile @@ -28,6 +28,7 @@ COPY "services/basket/src/EShopOnAbp.BasketService/EShopOnAbp.BasketService.cspr COPY "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" COPY "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" COPY "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" +COPY "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" # Gateways COPY "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" diff --git a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/Dockerfile b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/Dockerfile index 2f82fa40..baaf72d6 100644 --- a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/Dockerfile +++ b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/Dockerfile @@ -28,6 +28,7 @@ COPY "services/basket/src/EShopOnAbp.BasketService/EShopOnAbp.BasketService.cspr COPY "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" COPY "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" COPY "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" +COPY "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj" # Gateways COPY "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" From f3b68ca2a5d1ee630947090dfb488b9a9e9a8b81 Mon Sep 17 00:00:00 2001 From: malik masis Date: Tue, 13 Sep 2022 18:39:12 +0300 Subject: [PATCH 09/29] ps1 configuration --- build/build-images-locally.ps1 | 7 +++++++ build/build-images.ps1 | 6 ++++++ build/publish-locally.ps1 | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/build/build-images-locally.ps1 b/build/build-images-locally.ps1 index 82fde285..f8774c66 100644 --- a/build/build-images-locally.ps1 +++ b/build/build-images-locally.ps1 @@ -16,6 +16,7 @@ $basketServiceFolder = Join-Path $slnFolder "services/basket/src/EShopOnAbp.Bask $catalogServiceFolder = Join-Path $slnFolder "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host" $paymentServiceFolder = Join-Path $slnFolder "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host" $orderingServiceFolder = Join-Path $slnFolder "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host" +$cmskitServiceFolder = Join-Path $slnFolder "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host" $total = 11 @@ -87,6 +88,12 @@ Set-Location $orderingServiceFolder dotnet publish -c Release docker build -f Dockerfile.local -t eshoponabp/service-ordering:$version . +### CMSKIT-SERVICE +Write-Host "**************** BUILDING CMSKIT-SERVICE 12/$total ****************" -ForegroundColor Green +Set-Location $cmskitServiceFolder +dotnet publish -c Release +docker build -f Dockerfile.local -t eshoponabp/service-cmskit:$version . + ### ALL COMPLETED Write-Host "ALL COMPLETED" -ForegroundColor Green Set-Location $currentFolder \ No newline at end of file diff --git a/build/build-images.ps1 b/build/build-images.ps1 index eef11c86..e74620f7 100644 --- a/build/build-images.ps1 +++ b/build/build-images.ps1 @@ -16,6 +16,7 @@ $basketServiceFolder = Join-Path $slnFolder "services/basket/src/EShopOnAbp.Bask $catalogServiceFolder = Join-Path $slnFolder "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host" $paymentServiceFolder = Join-Path $slnFolder "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host" $orderingServiceFolder = Join-Path $slnFolder "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host" +$cmskitServiceFolder = Join-Path $slnFolder "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host" $total = 11 @@ -80,6 +81,11 @@ Write-Host "**************** BUILDING ORDERING-SERVICE 11/$total *************** Set-Location $slnFolder docker build -f "$orderingServiceFolder/Dockerfile" -t eshoponabp/service-ordering:$version . +### CMSKIT-SERVICE +Write-Host "**************** BUILDING CMSKIT-SERVICE 12/$total ****************" -ForegroundColor Green +Set-Location $slnFolder +docker build -f "$cmskitServiceFolder/Dockerfile" -t eshoponabp/service-cmskit:$version . + ### ALL COMPLETED Write-Host "ALL COMPLETED" -ForegroundColor Green Set-Location $currentFolder \ No newline at end of file diff --git a/build/publish-locally.ps1 b/build/publish-locally.ps1 index ab7641ea..24046a65 100644 --- a/build/publish-locally.ps1 +++ b/build/publish-locally.ps1 @@ -16,6 +16,7 @@ $basketServiceFolder = Join-Path $slnFolder "services/basket/src/EShopOnAbp.Bask $catalogServiceFolder = Join-Path $slnFolder "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host" $paymentServiceFolder = Join-Path $slnFolder "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host" $orderingServiceFolder = Join-Path $slnFolder "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host" +$cmskitServiceFolder = Join-Path $slnFolder "services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host" $total = 11 @@ -85,6 +86,11 @@ Write-Host "**************** BUILDING ORDERING-SERVICE 11/$total *************** Set-Location $orderingServiceFolder dotnet publish -c Release +### CMSKIT-SERVICE +Write-Host "**************** BUILDING CMSKIT-SERVICE 12/$total ****************" -ForegroundColor Green +Set-Location $cmskitServiceFolder +dotnet publish -c Release + ### ALL COMPLETED Write-Host "ALL COMPLETED" -ForegroundColor Green From cf6f2a4857842f2311ead8c9874ffeefbdf10e04 Mon Sep 17 00:00:00 2001 From: malik masis Date: Wed, 14 Sep 2022 10:45:52 +0300 Subject: [PATCH 10/29] Fixed typo issue --- .../EShopOnAbp.PublicWeb.csproj | 112 +++++++++--------- ...hopOnAbp.CmskitService.HttpApi.Host.csproj | 1 - tye.yaml | 2 +- 3 files changed, 57 insertions(+), 58 deletions(-) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj index 6f7cc765..44587bdc 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj @@ -1,60 +1,60 @@  - - net6.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Always - - - Always - - - - - - - - - - - - - - - - - <_ContentIncludedByDefault Remove="ClientProxies\app-generate-proxy.json" /> - + + net6.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Always + + + Always + + + + + + + + + + + + + + + + + <_ContentIncludedByDefault Remove="ClientProxies\app-generate-proxy.json" /> + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj index 6ba90705..9932ca2b 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj @@ -19,7 +19,6 @@ - diff --git a/tye.yaml b/tye.yaml index dfdd4447..0edccd81 100644 --- a/tye.yaml +++ b/tye.yaml @@ -66,7 +66,7 @@ services: - ./.env - name: cmskit-service - project: services/payment/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj + project: services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/EShopOnAbp.CmskitService.HttpApi.Host.csproj bindings: - protocol: https port: 44358 From 9ea903f8dd74b20f093a00d4042fdcbb9792e617 Mon Sep 17 00:00:00 2001 From: malik masis Date: Wed, 14 Sep 2022 10:59:11 +0300 Subject: [PATCH 11/29] Edited RemoveServiceName --- .../CmskitServiceRemoteServiceConsts.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceRemoteServiceConsts.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceRemoteServiceConsts.cs index 0de5a6b9..5f2b48e0 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceRemoteServiceConsts.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceRemoteServiceConsts.cs @@ -2,5 +2,5 @@ public static class CmskitServiceRemoteServiceConsts { - public const string RemoteServiceName = "CmskitService"; + public const string RemoteServiceName = "Cmskit"; } From 960afe37bf130ce330bec98855c0589ce53117fc Mon Sep 17 00:00:00 2001 From: malik masis Date: Thu, 15 Sep 2022 12:24:43 +0300 Subject: [PATCH 12/29] Added cmskit module --- .../CmskitServiceApplicationContractsModule.cs | 6 ++++-- .../EShopOnAbp.CmskitService.Application.Contracts.csproj | 1 + .../CmskitServiceApplicationModule.cs | 6 ++++-- .../EShopOnAbp.CmskitService.Application.csproj | 1 + .../CmskitServiceDomainSharedModule.cs | 6 ++++-- .../EShopOnAbp.CmskitService.Domain.Shared.csproj | 1 + .../CmskitServiceDomainModule.cs | 6 ++++-- .../EShopOnAbp.CmskitService.Domain.csproj | 1 + .../EShopOnAbp.CmskitService.EntityFrameworkCore.csproj | 1 + .../CmskitServiceEntityFrameworkCoreModule.cs | 4 +++- .../CmskitServiceHttpApiClientModule.cs | 6 ++++-- .../EShopOnAbp.CmskitService.HttpApi.Client.csproj | 1 + .../CmskitServiceHttpApiModule.cs | 6 ++++-- .../EShopOnAbp.CmskitService.HttpApi.csproj | 1 + 14 files changed, 34 insertions(+), 13 deletions(-) diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceApplicationContractsModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceApplicationContractsModule.cs index 31b2d13f..29bea23a 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceApplicationContractsModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceApplicationContractsModule.cs @@ -1,6 +1,7 @@ -using Volo.Abp.Application; +using Volo.Abp.Application; using Volo.Abp.Authorization; using Volo.Abp.Modularity; +using Volo.CmsKit; namespace EShopOnAbp.CmskitService; @@ -9,7 +10,8 @@ namespace EShopOnAbp.CmskitService; typeof(AbpDddApplicationContractsModule), typeof(AbpAuthorizationModule) )] -public class CmskitServiceApplicationContractsModule : AbpModule +[DependsOn(typeof(CmsKitApplicationContractsModule))] + public class CmskitServiceApplicationContractsModule : AbpModule { } diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/EShopOnAbp.CmskitService.Application.Contracts.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/EShopOnAbp.CmskitService.Application.Contracts.csproj index 1f130a67..66ffb6b6 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/EShopOnAbp.CmskitService.Application.Contracts.csproj +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/EShopOnAbp.CmskitService.Application.Contracts.csproj @@ -10,6 +10,7 @@ + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceApplicationModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceApplicationModule.cs index d34e0226..e8b4f224 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceApplicationModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application/CmskitServiceApplicationModule.cs @@ -1,7 +1,8 @@ -using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Application; using Volo.Abp.AutoMapper; using Volo.Abp.Modularity; +using Volo.CmsKit; namespace EShopOnAbp.CmskitService; @@ -11,7 +12,8 @@ namespace EShopOnAbp.CmskitService; typeof(AbpDddApplicationModule), typeof(AbpAutoMapperModule) )] -public class CmskitServiceApplicationModule : AbpModule +[DependsOn(typeof(CmsKitApplicationModule))] + public class CmskitServiceApplicationModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application/EShopOnAbp.CmskitService.Application.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.Application/EShopOnAbp.CmskitService.Application.csproj index ff538e41..a2510675 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.Application/EShopOnAbp.CmskitService.Application.csproj +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application/EShopOnAbp.CmskitService.Application.csproj @@ -10,6 +10,7 @@ + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceDomainSharedModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceDomainSharedModule.cs index eeaa7c3a..92e3163c 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceDomainSharedModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/CmskitServiceDomainSharedModule.cs @@ -1,17 +1,19 @@ -using EShopOnAbp.CmskitService.Localization; +using EShopOnAbp.CmskitService.Localization; using Volo.Abp.Localization; using Volo.Abp.Localization.ExceptionHandling; using Volo.Abp.Modularity; using Volo.Abp.Validation; using Volo.Abp.Validation.Localization; using Volo.Abp.VirtualFileSystem; +using Volo.CmsKit; namespace EShopOnAbp.CmskitService; [DependsOn( typeof(AbpValidationModule) )] -public class CmskitServiceDomainSharedModule : AbpModule +[DependsOn(typeof(CmsKitDomainSharedModule))] + public class CmskitServiceDomainSharedModule : AbpModule { public override void PreConfigureServices(ServiceConfigurationContext context) { diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/EShopOnAbp.CmskitService.Domain.Shared.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/EShopOnAbp.CmskitService.Domain.Shared.csproj index b9b23370..ec8cb5cd 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/EShopOnAbp.CmskitService.Domain.Shared.csproj +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/EShopOnAbp.CmskitService.Domain.Shared.csproj @@ -10,6 +10,7 @@ + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain/CmskitServiceDomainModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/CmskitServiceDomainModule.cs index 5766104e..7ad5cae5 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.Domain/CmskitServiceDomainModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/CmskitServiceDomainModule.cs @@ -1,5 +1,6 @@ -using Volo.Abp.Domain; +using Volo.Abp.Domain; using Volo.Abp.Modularity; +using Volo.CmsKit; namespace EShopOnAbp.CmskitService; @@ -7,6 +8,7 @@ namespace EShopOnAbp.CmskitService; typeof(AbpDddDomainModule), typeof(CmskitServiceDomainSharedModule) )] -public class CmskitServiceDomainModule : AbpModule +[DependsOn(typeof(CmsKitDomainModule))] + public class CmskitServiceDomainModule : AbpModule { } diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain/EShopOnAbp.CmskitService.Domain.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/EShopOnAbp.CmskitService.Domain.csproj index 3e273657..beb1a435 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.Domain/EShopOnAbp.CmskitService.Domain.csproj +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain/EShopOnAbp.CmskitService.Domain.csproj @@ -9,6 +9,7 @@ + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EShopOnAbp.CmskitService.EntityFrameworkCore.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EShopOnAbp.CmskitService.EntityFrameworkCore.csproj index c88c2a4f..541c45b5 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EShopOnAbp.CmskitService.EntityFrameworkCore.csproj +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EShopOnAbp.CmskitService.EntityFrameworkCore.csproj @@ -11,6 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreModule.cs index 2979576c..35243170 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreModule.cs @@ -3,6 +3,7 @@ using System; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.PostgreSql; using Volo.Abp.Modularity; +using Volo.CmsKit.EntityFrameworkCore; namespace EShopOnAbp.CmskitService.EntityFrameworkCore; @@ -10,7 +11,8 @@ namespace EShopOnAbp.CmskitService.EntityFrameworkCore; typeof(AbpEntityFrameworkCorePostgreSqlModule), typeof(CmskitServiceDomainModule) )] -public class CmskitServiceEntityFrameworkCoreModule : AbpModule +[DependsOn(typeof(CmsKitEntityFrameworkCoreModule))] + public class CmskitServiceEntityFrameworkCoreModule : AbpModule { public override void PreConfigureServices(ServiceConfigurationContext context) { diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/CmskitServiceHttpApiClientModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/CmskitServiceHttpApiClientModule.cs index 90e77789..83128ae7 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/CmskitServiceHttpApiClientModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/CmskitServiceHttpApiClientModule.cs @@ -1,14 +1,16 @@ -using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; using Volo.Abp.VirtualFileSystem; +using Volo.CmsKit; namespace EShopOnAbp.CmskitService; [DependsOn( typeof(CmskitServiceApplicationContractsModule), typeof(AbpHttpClientModule))] -public class CmskitServiceHttpApiClientModule : AbpModule +[DependsOn(typeof(CmsKitHttpApiClientModule))] + public class CmskitServiceHttpApiClientModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/EShopOnAbp.CmskitService.HttpApi.Client.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/EShopOnAbp.CmskitService.HttpApi.Client.csproj index 90e5e358..af8ad84e 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/EShopOnAbp.CmskitService.HttpApi.Client.csproj +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/EShopOnAbp.CmskitService.HttpApi.Client.csproj @@ -9,6 +9,7 @@ + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs index d4ce36ec..e93835ef 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs @@ -1,16 +1,18 @@ -using Localization.Resources.AbpUi; +using Localization.Resources.AbpUi; using Microsoft.Extensions.DependencyInjection; using EShopOnAbp.CmskitService.Localization; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Localization; using Volo.Abp.Modularity; +using Volo.CmsKit; namespace EShopOnAbp.CmskitService; [DependsOn( typeof(CmskitServiceApplicationContractsModule), typeof(AbpAspNetCoreMvcModule))] -public class CmskitServiceHttpApiModule : AbpModule +[DependsOn(typeof(CmsKitHttpApiModule))] + public class CmskitServiceHttpApiModule : AbpModule { public override void PreConfigureServices(ServiceConfigurationContext context) { diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/EShopOnAbp.CmskitService.HttpApi.csproj b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/EShopOnAbp.CmskitService.HttpApi.csproj index e74364be..59a248dd 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/EShopOnAbp.CmskitService.HttpApi.csproj +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/EShopOnAbp.CmskitService.HttpApi.csproj @@ -9,6 +9,7 @@ + From 1e962b992dbeb1d9aaca2abdc291563ec29d0e6a Mon Sep 17 00:00:00 2001 From: malik masis Date: Thu, 15 Sep 2022 12:26:52 +0300 Subject: [PATCH 13/29] Added and applied migration --- .../FeatureConfigurer.cs | 19 ++ .../CmskitServiceDbContext.cs | 4 + .../CmskitServiceDbContextFactory.cs | 4 +- .../20220915090116_Initial.Designer.cs | 191 ++++++++++++++++++ .../Migrations/20220915090116_Initial.cs | 108 ++++++++++ .../CmskitServiceDbContextModelSnapshot.cs | 189 +++++++++++++++++ .../CmskitServiceHttpApiHostModule.cs | 11 +- 7 files changed, 523 insertions(+), 3 deletions(-) create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/FeatureConfigurer.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/Migrations/20220915090116_Initial.Designer.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/Migrations/20220915090116_Initial.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/Migrations/CmskitServiceDbContextModelSnapshot.cs diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/FeatureConfigurer.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/FeatureConfigurer.cs new file mode 100644 index 00000000..544ffba0 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Domain.Shared/FeatureConfigurer.cs @@ -0,0 +1,19 @@ +using Volo.Abp.GlobalFeatures; +using Volo.Abp.Threading; + +namespace EShopOnAbp.CmskitService; + +public static class FeatureConfigurer +{ + private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); + + public static void Configure() + { + OneTimeRunner.Run(() => + { + GlobalFeatureManager.Instance.Modules.CmsKit().Comments.Enable(); + GlobalFeatureManager.Instance.Modules.CmsKit().Ratings.Enable(); + }); + } +} + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContext.cs b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContext.cs index bb4f8053..3a9b6490 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContext.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContext.cs @@ -1,6 +1,7 @@ using Microsoft.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; namespace EShopOnAbp.CmskitService.EntityFrameworkCore; @@ -17,6 +18,9 @@ public class CmskitServiceDbContext : AbpDbContext, ICms { base.OnModelCreating(modelBuilder); + FeatureConfigurer.Configure(); + modelBuilder.ConfigureCmskitService(); + modelBuilder.ConfigureCmsKit(); } } diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContextFactory.cs b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContextFactory.cs index 345f89c2..0eaa0b84 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContextFactory.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContextFactory.cs @@ -21,7 +21,7 @@ public class CmskitServiceDbContextFactory : IDesignTimeDbContextFactory { - b.MigrationsHistoryTable("__OrderingService_Migrations"); + b.MigrationsHistoryTable("__CmsKitService_Migrations"); }); // https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic @@ -33,7 +33,7 @@ public class CmskitServiceDbContextFactory : IDesignTimeDbContextFactory +using System; +using EShopOnAbp.CmskitService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace EShopOnAbp.CmskitService.Migrations +{ + [DbContext(typeof(CmskitServiceDbContext))] + [Migration("20220915090116_Initial")] + partial class Initial + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "6.0.1") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("RepliedCommentId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "RepliedCommentId"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsComments", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("StarCount") + .HasColumnType("smallint"); + + b.Property("TenantId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); + + b.ToTable("CmsRatings", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Name"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Email"); + + b.HasIndex("TenantId", "UserName"); + + b.ToTable("CmsUsers", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/Migrations/20220915090116_Initial.cs b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/Migrations/20220915090116_Initial.cs new file mode 100644 index 00000000..1626edb9 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/Migrations/20220915090116_Initial.cs @@ -0,0 +1,108 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EShopOnAbp.CmskitService.Migrations +{ + public partial class Initial : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "CmsComments", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + EntityType = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + EntityId = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + Text = table.Column(type: "character varying(512)", maxLength: 512, nullable: false), + RepliedCommentId = table.Column(type: "uuid", nullable: true), + CreatorId = table.Column(type: "uuid", nullable: false), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_CmsComments", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "CmsRatings", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + EntityType = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + EntityId = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + StarCount = table.Column(type: "smallint", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: false), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CmsRatings", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "CmsUsers", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Email = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + Surname = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + EmailConfirmed = table.Column(type: "boolean", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "character varying(16)", maxLength: 16, nullable: true), + PhoneNumberConfirmed = table.Column(type: "boolean", nullable: false, defaultValue: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_CmsUsers", x => x.Id); + }); + + migrationBuilder.CreateIndex( + name: "IX_CmsComments_TenantId_EntityType_EntityId", + table: "CmsComments", + columns: new[] { "TenantId", "EntityType", "EntityId" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsComments_TenantId_RepliedCommentId", + table: "CmsComments", + columns: new[] { "TenantId", "RepliedCommentId" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsRatings_TenantId_EntityType_EntityId_CreatorId", + table: "CmsRatings", + columns: new[] { "TenantId", "EntityType", "EntityId", "CreatorId" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsUsers_TenantId_Email", + table: "CmsUsers", + columns: new[] { "TenantId", "Email" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsUsers_TenantId_UserName", + table: "CmsUsers", + columns: new[] { "TenantId", "UserName" }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "CmsComments"); + + migrationBuilder.DropTable( + name: "CmsRatings"); + + migrationBuilder.DropTable( + name: "CmsUsers"); + } + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/Migrations/CmskitServiceDbContextModelSnapshot.cs b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/Migrations/CmskitServiceDbContextModelSnapshot.cs new file mode 100644 index 00000000..6b0a077f --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/Migrations/CmskitServiceDbContextModelSnapshot.cs @@ -0,0 +1,189 @@ +// +using System; +using EShopOnAbp.CmskitService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace EShopOnAbp.CmskitService.Migrations +{ + [DbContext(typeof(CmskitServiceDbContext))] + partial class CmskitServiceDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "6.0.1") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("RepliedCommentId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "RepliedCommentId"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsComments", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("StarCount") + .HasColumnType("smallint"); + + b.Property("TenantId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); + + b.ToTable("CmsRatings", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Name"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Email"); + + b.HasIndex("TenantId", "UserName"); + + b.ToTable("CmsUsers", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs index 415c298a..23aeaf4e 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs @@ -12,6 +12,8 @@ using Volo.Abp.AspNetCore.Mvc; using System.Linq; using Microsoft.AspNetCore.Cors; using Microsoft.Extensions.Configuration; +using Volo.Abp.GlobalFeatures; +using Volo.Abp.Threading; namespace EShopOnAbp.CmskitService; [DependsOn( @@ -22,9 +24,16 @@ namespace EShopOnAbp.CmskitService; )] public class CmskitServiceHttpApiHostModule : AbpModule { + //public override void PreConfigureServices(ServiceConfigurationContext context) + //{ + // //TODO why doesn't work? + // FeatureConfigurer.Configure(); + //} + + public override void ConfigureServices(ServiceConfigurationContext context) { - var configuration = context.Services.GetConfiguration(); + var configuration = context.Services.GetConfiguration(); // var hostingEnvironment = context.Services.GetHostingEnvironment(); JwtBearerConfigurationHelper.Configure(context, "CmskitService"); From 172048fe581aeacf911978077e5c6968faddf4d4 Mon Sep 17 00:00:00 2001 From: malik masis Date: Thu, 15 Sep 2022 23:50:20 +0300 Subject: [PATCH 14/29] styling --- .../CmskitServiceApplicationContractsModule.cs | 7 +++---- .../CmskitServiceHttpApiModule.cs | 6 +++--- .../appsettings.Docker.json | 2 +- .../appsettings.json | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceApplicationContractsModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceApplicationContractsModule.cs index 29bea23a..d51796d4 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceApplicationContractsModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.Application.Contracts/CmskitServiceApplicationContractsModule.cs @@ -8,10 +8,9 @@ namespace EShopOnAbp.CmskitService; [DependsOn( typeof(CmskitServiceDomainSharedModule), typeof(AbpDddApplicationContractsModule), - typeof(AbpAuthorizationModule) - )] -[DependsOn(typeof(CmsKitApplicationContractsModule))] - public class CmskitServiceApplicationContractsModule : AbpModule + typeof(AbpAuthorizationModule), + typeof(CmsKitApplicationContractsModule))] +public class CmskitServiceApplicationContractsModule : AbpModule { } diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs index e93835ef..4c34bc21 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs @@ -10,9 +10,9 @@ namespace EShopOnAbp.CmskitService; [DependsOn( typeof(CmskitServiceApplicationContractsModule), - typeof(AbpAspNetCoreMvcModule))] -[DependsOn(typeof(CmsKitHttpApiModule))] - public class CmskitServiceHttpApiModule : AbpModule + typeof(AbpAspNetCoreMvcModule), + typeof(CmsKitHttpApiModule))] +public class CmskitServiceHttpApiModule : AbpModule { public override void PreConfigureServices(ServiceConfigurationContext context) { diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.Docker.json b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.Docker.json index 9888347c..ce6a7530 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.Docker.json +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.Docker.json @@ -62,7 +62,7 @@ "RootUrl": "https://localhost:44357" }, "CmskitService": { - "RootUrl": "https://localhost:44358" + "RootUrl": "https://localhost:44358" } } } diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json index b218bdf1..9678ab64 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json @@ -76,7 +76,7 @@ "RootUrl": "https://localhost:44357" }, "CmskitService": { - "RootUrl": "https://localhost:44358" + "RootUrl": "https://localhost:44358" } } } From e0f002357a7f867ea6733ed19a3fc89cf187e50e Mon Sep 17 00:00:00 2001 From: malik masis Date: Fri, 16 Sep 2022 00:00:02 +0300 Subject: [PATCH 15/29] Fixed cors issue --- .../CmskitServiceHttpApiHostModule.cs | 47 +++++++++---------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs index 23aeaf4e..a5f87b4d 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs @@ -1,19 +1,17 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.Hosting; -using EShopOnAbp.CmskitService.EntityFrameworkCore; -using EShopOnAbp.Shared.Hosting.Microservices; -using Volo.Abp; -using Volo.Abp.Modularity; +using EShopOnAbp.CmskitService.EntityFrameworkCore; using EShopOnAbp.Shared.Hosting.AspNetCore; -using System.Collections.Generic; +using EShopOnAbp.Shared.Hosting.Microservices; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Cors; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; using System; -using Volo.Abp.AspNetCore.Mvc; +using System.Collections.Generic; using System.Linq; -using Microsoft.AspNetCore.Cors; -using Microsoft.Extensions.Configuration; -using Volo.Abp.GlobalFeatures; -using Volo.Abp.Threading; +using Volo.Abp; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Modularity; namespace EShopOnAbp.CmskitService; [DependsOn( @@ -24,17 +22,9 @@ namespace EShopOnAbp.CmskitService; )] public class CmskitServiceHttpApiHostModule : AbpModule { - //public override void PreConfigureServices(ServiceConfigurationContext context) - //{ - // //TODO why doesn't work? - // FeatureConfigurer.Configure(); - //} - - public override void ConfigureServices(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); - // var hostingEnvironment = context.Services.GetHostingEnvironment(); JwtBearerConfigurationHelper.Configure(context, "CmskitService"); @@ -42,11 +32,11 @@ public class CmskitServiceHttpApiHostModule : AbpModule context: context, authority: configuration["AuthServer:Authority"], scopes: new - Dictionary /* Requested scopes for authorization code request and descriptions for swagger UI only */ + Dictionary { - { "CmskitService", "CmskitService Service API" } + { "CmskitService", "Cmskit Service API" } }, - apiTitle: "CmskitService Service API" + apiTitle: "Cmskit Service API" ); context.Services.AddCors(options => @@ -68,7 +58,6 @@ public class CmskitServiceHttpApiHostModule : AbpModule }); }); - // TODO: Create controller instead of auto-controller configuration Configure(options => { options.ConventionalControllers.Create(typeof(CmskitServiceApplicationModule).Assembly, opts => @@ -90,12 +79,12 @@ public class CmskitServiceHttpApiHostModule : AbpModule } app.UseCorrelationId(); + app.UseCors(); app.UseAbpRequestLocalization(); app.UseStaticFiles(); app.UseRouting(); app.UseAuthentication(); app.UseAbpClaimsMap(); - app.UseMultiTenancy(); app.UseAuthorization(); app.UseSwagger(); app.UseSwaggerUI(options => @@ -110,4 +99,12 @@ public class CmskitServiceHttpApiHostModule : AbpModule app.UseUnitOfWork(); app.UseConfiguredEndpoints(); } + + //TODO don't forget here... It gives error + //public override async Task OnPostApplicationInitializationAsync(ApplicationInitializationContext context) + //{ + //await context.ServiceProvider + // .GetRequiredService() + // .CheckAndApplyDatabaseMigrationsAsync(); + //} } From 1a03bd6b05822f73962068bd8f0fddc1ec90a5b9 Mon Sep 17 00:00:00 2001 From: malik masis Date: Fri, 16 Sep 2022 17:48:56 +0300 Subject: [PATCH 16/29] Configuration FeatureConfigurer --- .../CmskitServiceEfCoreEntityExtensionMappings.cs | 2 +- .../CmskitServiceEntityFrameworkCoreModule.cs | 8 ++++---- .../CmskitServiceHttpApiClientModule.cs | 13 +++++++++---- .../CmskitServiceHttpApiHostModule.cs | 5 +++++ .../Program.cs | 2 ++ .../CmskitServiceHttpApiModule.cs | 2 ++ 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEfCoreEntityExtensionMappings.cs b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEfCoreEntityExtensionMappings.cs index df89888f..3315391e 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEfCoreEntityExtensionMappings.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEfCoreEntityExtensionMappings.cs @@ -9,7 +9,7 @@ public static class CmskitServiceEfCoreEntityExtensionMappings public static void Configure() { CmskitServiceModuleExtensionConfigurator.Configure(); - + //TODO global OneTimeRunner.Run(() => { /* You can configure extra properties for the diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreModule.cs index 35243170..1dc0e051 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceEntityFrameworkCoreModule.cs @@ -9,10 +9,10 @@ namespace EShopOnAbp.CmskitService.EntityFrameworkCore; [DependsOn( typeof(AbpEntityFrameworkCorePostgreSqlModule), - typeof(CmskitServiceDomainModule) -)] -[DependsOn(typeof(CmsKitEntityFrameworkCoreModule))] - public class CmskitServiceEntityFrameworkCoreModule : AbpModule + typeof(CmskitServiceDomainModule), + typeof(CmsKitEntityFrameworkCoreModule))] + +public class CmskitServiceEntityFrameworkCoreModule : AbpModule { public override void PreConfigureServices(ServiceConfigurationContext context) { diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/CmskitServiceHttpApiClientModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/CmskitServiceHttpApiClientModule.cs index 83128ae7..1a6abe16 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/CmskitServiceHttpApiClientModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/CmskitServiceHttpApiClientModule.cs @@ -8,13 +8,18 @@ namespace EShopOnAbp.CmskitService; [DependsOn( typeof(CmskitServiceApplicationContractsModule), - typeof(AbpHttpClientModule))] -[DependsOn(typeof(CmsKitHttpApiClientModule))] - public class CmskitServiceHttpApiClientModule : AbpModule + typeof(AbpHttpClientModule), + typeof(CmsKitHttpApiClientModule))] +public class CmskitServiceHttpApiClientModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + FeatureConfigurer.Configure(); + } + public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies(typeof(CmskitServiceApplicationContractsModule).Assembly, + context.Services.AddStaticHttpClientProxies(typeof(CmskitServiceApplicationContractsModule).Assembly, CmskitServiceRemoteServiceConsts.RemoteServiceName); Configure(options => diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs index a5f87b4d..46cb6136 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs @@ -22,6 +22,11 @@ namespace EShopOnAbp.CmskitService; )] public class CmskitServiceHttpApiHostModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + FeatureConfigurer.Configure(); + } + public override void ConfigureServices(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Program.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Program.cs index 4d1bcedf..249f2e2d 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Program.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/Program.cs @@ -10,6 +10,8 @@ public class Program { public async static Task Main(string[] args) { + FeatureConfigurer.Configure(); + var assemblyName = typeof(Program).Assembly.GetName().Name; SerilogConfigurationHelper.Configure(assemblyName); diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs index 4c34bc21..d3977b88 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/CmskitServiceHttpApiModule.cs @@ -16,6 +16,8 @@ public class CmskitServiceHttpApiModule : AbpModule { public override void PreConfigureServices(ServiceConfigurationContext context) { + FeatureConfigurer.Configure(); + PreConfigure(mvcBuilder => { mvcBuilder.AddApplicationPartIfNotExists(typeof(CmskitServiceHttpApiModule).Assembly); From dfd63c94de7f21cd60e916f48feceb5db1f46a08 Mon Sep 17 00:00:00 2001 From: malik masis Date: Fri, 16 Sep 2022 17:49:51 +0300 Subject: [PATCH 17/29] Static proxy --- .../wwwroot/client-proxies/cms-kit-proxy.js | 80 +++ .../CommentPublicClientProxy.Generated.cs | 53 ++ .../ClientProxies/CommentPublicClientProxy.cs | 7 + .../RatingPublicClientProxy.Generated.cs | 46 ++ .../ClientProxies/RatingPublicClientProxy.cs | 7 + .../ClientProxies/cms-kit-generate-proxy.json | 458 ++++++++++++++++++ 6 files changed, 651 insertions(+) create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/client-proxies/cms-kit-proxy.js create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs create mode 100644 services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/client-proxies/cms-kit-proxy.js b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/client-proxies/cms-kit-proxy.js new file mode 100644 index 00000000..6761dc06 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/client-proxies/cms-kit-proxy.js @@ -0,0 +1,80 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module cms-kit + +(function(){ + + // controller volo.cmsKit.public.ratings.ratingPublic + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.public.ratings.ratingPublic'); + + volo.cmsKit.public.ratings.ratingPublic.create = function(entityType, entityId, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/ratings/' + entityType + '/' + entityId + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.public.ratings.ratingPublic['delete'] = function(entityType, entityId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/ratings/' + entityType + '/' + entityId + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + volo.cmsKit.public.ratings.ratingPublic.getGroupedStarCounts = function(entityType, entityId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/ratings/' + entityType + '/' + entityId + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.public.comments.commentPublic + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.public.comments.commentPublic'); + + volo.cmsKit.public.comments.commentPublic.getList = function(entityType, entityId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/comments/' + entityType + '/' + entityId + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.public.comments.commentPublic.create = function(entityType, entityId, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/comments/' + entityType + '/' + entityId + '', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.public.comments.commentPublic.update = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/comments/' + id + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.public.comments.commentPublic['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/comments/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs new file mode 100644 index 00000000..b7b1afc5 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs @@ -0,0 +1,53 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Public.Comments; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Comments.ClientProxies; + +[Dependency(ReplaceServices = true)] +[ExposeServices(typeof(ICommentPublicAppService), typeof(CommentPublicClientProxy))] +public partial class CommentPublicClientProxy : ClientProxyBase, ICommentPublicAppService +{ + public virtual async Task> GetListAsync(string entityType, string entityId) + { + return await RequestAsync>(nameof(GetListAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId } + }); + } + + public virtual async Task CreateAsync(string entityType, string entityId, CreateCommentInput input) + { + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId }, + { typeof(CreateCommentInput), input } + }); + } + + public virtual async Task UpdateAsync(Guid id, UpdateCommentInput input) + { + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(UpdateCommentInput), input } + }); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs new file mode 100644 index 00000000..826d4c0f --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs @@ -0,0 +1,7 @@ +// This file is part of CommentPublicClientProxy, you can customize it here +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Comments.ClientProxies; + +public partial class CommentPublicClientProxy +{ +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs new file mode 100644 index 00000000..583d86a2 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs @@ -0,0 +1,46 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Public.Ratings; +using System.Collections.Generic; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Ratings.ClientProxies; + +[Dependency(ReplaceServices = true)] +[ExposeServices(typeof(IRatingPublicAppService), typeof(RatingPublicClientProxy))] +public partial class RatingPublicClientProxy : ClientProxyBase, IRatingPublicAppService +{ + public virtual async Task CreateAsync(string entityType, string entityId, CreateUpdateRatingInput input) + { + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId }, + { typeof(CreateUpdateRatingInput), input } + }); + } + + public virtual async Task DeleteAsync(string entityType, string entityId) + { + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId } + }); + } + + public virtual async Task> GetGroupedStarCountsAsync(string entityType, string entityId) + { + return await RequestAsync>(nameof(GetGroupedStarCountsAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId } + }); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs new file mode 100644 index 00000000..6a4609f5 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs @@ -0,0 +1,7 @@ +// This file is part of RatingPublicClientProxy, you can customize it here +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Ratings.ClientProxies; + +public partial class RatingPublicClientProxy +{ +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json new file mode 100644 index 00000000..aa9ddbdd --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json @@ -0,0 +1,458 @@ +{ + "modules": { + "cms-kit": { + "rootPath": "cms-kit", + "remoteServiceName": "CmsKitPublic", + "controllers": { + "Volo.CmsKit.Public.Ratings.RatingPublicController": { + "controllerName": "RatingPublic", + "controllerGroupName": "RatingPublic", + "isRemoteService": false, + "apiVersion": null, + "type": "Volo.CmsKit.Public.Ratings.RatingPublicController", + "interfaces": [ + { + "type": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService" + } + ], + "actions": { + "CreateAsyncByEntityTypeAndEntityIdAndInput": { + "uniqueName": "CreateAsyncByEntityTypeAndEntityIdAndInput", + "name": "CreateAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-public/ratings/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput, Volo.CmsKit.Public.Application.Contracts", + "type": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput", + "typeSimple": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput", + "typeSimple": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Public.Ratings.RatingDto", + "typeSimple": "Volo.CmsKit.Public.Ratings.RatingDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService" + }, + "DeleteAsyncByEntityTypeAndEntityId": { + "uniqueName": "DeleteAsyncByEntityTypeAndEntityId", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/cms-kit-public/ratings/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService" + }, + "GetGroupedStarCountsAsyncByEntityTypeAndEntityId": { + "uniqueName": "GetGroupedStarCountsAsyncByEntityTypeAndEntityId", + "name": "GetGroupedStarCountsAsync", + "httpMethod": "GET", + "url": "api/cms-kit-public/ratings/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Collections.Generic.List", + "typeSimple": "[Volo.CmsKit.Public.Ratings.RatingWithStarCountDto]" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService" + } + } + }, + "Volo.CmsKit.Public.Comments.CommentPublicController": { + "controllerName": "CommentPublic", + "controllerGroupName": "CommentPublic", + "isRemoteService": false, + "apiVersion": null, + "type": "Volo.CmsKit.Public.Comments.CommentPublicController", + "interfaces": [ + { + "type": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + } + ], + "actions": { + "GetListAsyncByEntityTypeAndEntityId": { + "uniqueName": "GetListAsyncByEntityTypeAndEntityId", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/cms-kit-public/comments/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + }, + "CreateAsyncByEntityTypeAndEntityIdAndInput": { + "uniqueName": "CreateAsyncByEntityTypeAndEntityIdAndInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/cms-kit-public/comments/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Public.Comments.CreateCommentInput, Volo.CmsKit.Public.Application.Contracts", + "type": "Volo.CmsKit.Public.Comments.CreateCommentInput", + "typeSimple": "Volo.CmsKit.Public.Comments.CreateCommentInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Public.Comments.CreateCommentInput", + "typeSimple": "Volo.CmsKit.Public.Comments.CreateCommentInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Public.Comments.CommentDto", + "typeSimple": "Volo.CmsKit.Public.Comments.CommentDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-public/comments/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Public.Comments.UpdateCommentInput, Volo.CmsKit.Public.Application.Contracts", + "type": "Volo.CmsKit.Public.Comments.UpdateCommentInput", + "typeSimple": "Volo.CmsKit.Public.Comments.UpdateCommentInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Public.Comments.UpdateCommentInput", + "typeSimple": "Volo.CmsKit.Public.Comments.UpdateCommentInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Public.Comments.CommentDto", + "typeSimple": "Volo.CmsKit.Public.Comments.CommentDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/cms-kit-public/comments/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file From 309cae57c94ee0a1aea56b09e3aa5361113e6d14 Mon Sep 17 00:00:00 2001 From: malik masis Date: Fri, 16 Sep 2022 17:50:07 +0300 Subject: [PATCH 18/29] Update EShopOnAbpPublicWebModule.cs --- .../EShopOnAbpPublicWebModule.cs | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs index 37690f25..3f4ccefa 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs @@ -46,6 +46,10 @@ using Volo.Abp.UI.Navigation; using Volo.Abp.UI.Navigation.Urls; using Volo.Abp.VirtualFileSystem; using Yarp.ReverseProxy.Transforms; +using Volo.CmsKit.Comments; +using Volo.CmsKit; +using Volo.CmsKit.Public.Web; +using Volo.CmsKit.Ratings; namespace EShopOnAbp.PublicWeb; @@ -62,10 +66,14 @@ namespace EShopOnAbp.PublicWeb; typeof(CatalogServiceHttpApiClientModule), typeof(BasketServiceContractsModule), typeof(OrderingServiceHttpApiClientModule), - typeof(CmskitServiceHttpApiClientModule), typeof(AbpAspNetCoreSignalRModule), typeof(PaymentServiceHttpApiClientModule), - typeof(AbpAutoMapperModule) + typeof(AbpAutoMapperModule), + typeof(CmskitServiceHttpApiClientModule), + typeof(CmsKitDomainModule), + typeof(CmsKitPublicWebModule) + + )] public class EShopOnAbpPublicWebModule : AbpModule { @@ -91,6 +99,8 @@ public class EShopOnAbpPublicWebModule : AbpModule ); }); }); + + FeatureConfigurer.Configure(); } public override void ConfigureServices(ServiceConfigurationContext context) @@ -100,6 +110,8 @@ public class EShopOnAbpPublicWebModule : AbpModule ConfigureBasketHttpClient(context); + ConfigureCmskit(); + context.Services.AddAutoMapperObjectMapper(); Configure(options => { options.AddMaps(validate: true); }); @@ -244,6 +256,19 @@ public class EShopOnAbpPublicWebModule : AbpModule }); } + private void ConfigureCmskit() + { + Configure(options => + { + options.EntityTypes.Add(new CommentEntityTypeDefinition("quote")); + }); + + Configure(options => + { + options.EntityTypes.Add(new RatingEntityTypeDefinition("quote")); + }); + } + public override void OnApplicationInitialization(ApplicationInitializationContext context) { var app = context.GetApplicationBuilder(); From 7592e3a4190a7f38bdaf2c6dff1d4bc0c0a76d70 Mon Sep 17 00:00:00 2001 From: malik masis Date: Fri, 16 Sep 2022 17:50:49 +0300 Subject: [PATCH 19/29] yarp configuration --- .../EShopOnAbp.PublicWeb.csproj | 2 ++ .../src/EShopOnAbp.WebPublicGateway/yarp.json | 20 ++++++++++++++++++- .../appsettings.json | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj index 44587bdc..03a8f418 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj @@ -8,6 +8,8 @@ + + diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json index 235c049b..ea1b357f 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/yarp.json @@ -37,11 +37,29 @@ "Path": "/api/payment/{**everything}" } }, + "Cmskit Service": { + "ClusterId": "cmskitCluster", + "Match": { + "Path": "/api/cmskit/{**everything}" + } + }, + "Cmskit Public Service": { + "ClusterId": "cmskitCluster", + "Match": { + "Path": "/api/cms-kit-public/{**everything}" + } + }, + "Cmskit Admin Service": { + "ClusterId": "cmskitCluster", + "Match": { + "Path": "/api/cms-kit-admin/{**everything}" + } + }, "product-picture-route": { "ClusterId": "productPictureCluster", "Match": { "Path": "/product-images/{**everything}", - "Methods" : [ "GET" ] + "Methods": [ "GET" ] } } }, diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json index 4788a2cc..fab9000d 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json @@ -1,7 +1,7 @@ { "App": { "SelfUrl": "https://localhost:44358", - "CorsOrigins": "https://localhost:44372,https://localhost:44373,http://localhost:4200" + "CorsOrigins": "https://localhost:44372,https://localhost:44373,http://localhost:4200,https://localhost:44335" }, "AuthServer": { "Authority": "https://localhost:44330", From 2ae774116c3044f2121b1d38da0cef32ec0f9c50 Mon Sep 17 00:00:00 2001 From: malik masis Date: Fri, 16 Sep 2022 17:50:57 +0300 Subject: [PATCH 20/29] UI improvment --- .../Pages/ProductDetail.cshtml | 38 +++++++++++++++---- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml index d9876bda..de8ca551 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml @@ -1,27 +1,35 @@ @page "/products/{id:guid}" @using EShopOnAbp.Localization +@using EShopOnAbp.PublicWeb.Components.Basket @using Microsoft.Extensions.Localization @using System.Globalization @using Microsoft.Extensions.Options +@using Volo.Abp.GlobalFeatures @using Volo.Abp.Http.Client +@using Volo.Abp.Users +@using Volo.CmsKit.GlobalFeatures +@using Volo.CmsKit.Public.Comments +@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Commenting +@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Rating @model EShopOnAbp.PublicWeb.Pages.ProductDetailModel @inject IStringLocalizer L @inject IOptions options +@inject ICurrentUser CurrentUser @section styles{ } -@section scripts { + @section scripts { } -
-
-
-
- @{ +
+
+
+
+ @{ var product = Model.Product; var productPrice = product.Price.ToString("C", new CultureInfo("en-US")); string productImage = !product.ImageName.IsNullOrEmpty() ? $"{options.Value.RemoteServices.Default.BaseUrl}product-images/{product.ImageName}" : $"{options.Value.RemoteServices.Default.BaseUrl}product-images/@product.ImageName"; @@ -48,8 +56,24 @@
- } + }
+ + + + @if (GlobalFeatureManager.Instance.IsEnabled()) + { + @*@await Component.InvokeAsync(typeof(RatingViewComponent), new {entityType = "quote", entityId = "2"})*@ + } + + + @if (GlobalFeatureManager.Instance.IsEnabled()) + { + @await Component.InvokeAsync(typeof(CommentingViewComponent), new {entityType = "quote", entityId = @product.Id.ToString()}) + } + + +
\ No newline at end of file From f7e6fe968240cae03aea0ed841d85f04e72d5071 Mon Sep 17 00:00:00 2001 From: malik masis Date: Mon, 19 Sep 2022 18:13:40 +0300 Subject: [PATCH 21/29] Updated appsetting.json --- .../src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml | 2 +- .../src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml index de8ca551..4e41b795 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml @@ -63,7 +63,7 @@ @if (GlobalFeatureManager.Instance.IsEnabled()) { - @*@await Component.InvokeAsync(typeof(RatingViewComponent), new {entityType = "quote", entityId = "2"})*@ + @await Component.InvokeAsync(typeof(RatingViewComponent), new {entityType = "quote", entityId = @product.Id.ToString()}) } diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json index fab9000d..db340fed 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/appsettings.json @@ -19,6 +19,7 @@ "AllowedHosts": "*", "ConnectionStrings": { "CmskitService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Cmskit;Pooling=false", + "CmsKit": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Cmskit;Pooling=false", "AdministrationService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;" }, "StringEncryption": { From bea982ff842075bdc0b53c940aa3c705b3d999d2 Mon Sep 17 00:00:00 2001 From: malik masis Date: Tue, 20 Sep 2022 14:59:12 +0300 Subject: [PATCH 22/29] libs changes --- .../wwwroot/libs/clipboard/clipboard.js | 890 + .../wwwroot/libs/clipboard/clipboard.min.js | 7 + .../libs/highlight.js/highlight.pack.js | 2 + .../libs/highlight.js/styles/agate.css | 108 + .../highlight.js/styles/androidstudio.css | 66 + .../highlight.js/styles/arduino-light.css | 88 + .../wwwroot/libs/highlight.js/styles/arta.css | 73 + .../libs/highlight.js/styles/ascetic.css | 45 + .../highlight.js/styles/atelier-cave-dark.css | 83 + .../styles/atelier-cave-light.css | 85 + .../highlight.js/styles/atelier-dune-dark.css | 69 + .../styles/atelier-dune-light.css | 69 + .../styles/atelier-estuary-dark.css | 84 + .../styles/atelier-estuary-light.css | 84 + .../styles/atelier-forest-dark.css | 69 + .../styles/atelier-forest-light.css | 69 + .../styles/atelier-heath-dark.css | 69 + .../styles/atelier-heath-light.css | 69 + .../styles/atelier-lakeside-dark.css | 69 + .../styles/atelier-lakeside-light.css | 69 + .../styles/atelier-plateau-dark.css | 84 + .../styles/atelier-plateau-light.css | 84 + .../styles/atelier-savanna-dark.css | 84 + .../styles/atelier-savanna-light.css | 84 + .../styles/atelier-seaside-dark.css | 69 + .../styles/atelier-seaside-light.css | 69 + .../styles/atelier-sulphurpool-dark.css | 69 + .../styles/atelier-sulphurpool-light.css | 69 + .../highlight.js/styles/atom-one-dark.css | 96 + .../highlight.js/styles/atom-one-light.css | 96 + .../libs/highlight.js/styles/brown-paper.css | 64 + .../highlight.js/styles/brown-papersq.png | Bin 0 -> 18198 bytes .../highlight.js/styles/codepen-embed.css | 60 + .../libs/highlight.js/styles/color-brewer.css | 71 + .../libs/highlight.js/styles/darcula.css | 77 + .../wwwroot/libs/highlight.js/styles/dark.css | 63 + .../libs/highlight.js/styles/darkula.css | 6 + .../libs/highlight.js/styles/default.css | 99 + .../libs/highlight.js/styles/docco.css | 97 + .../libs/highlight.js/styles/dracula.css | 76 + .../wwwroot/libs/highlight.js/styles/far.css | 71 + .../libs/highlight.js/styles/foundation.css | 88 + .../libs/highlight.js/styles/github-gist.css | 71 + .../libs/highlight.js/styles/github.css | 99 + .../libs/highlight.js/styles/googlecode.css | 89 + .../libs/highlight.js/styles/grayscale.css | 101 + .../libs/highlight.js/styles/gruvbox-dark.css | 108 + .../highlight.js/styles/gruvbox-light.css | 108 + .../libs/highlight.js/styles/hopscotch.css | 83 + .../libs/highlight.js/styles/hybrid.css | 102 + .../wwwroot/libs/highlight.js/styles/idea.css | 97 + .../libs/highlight.js/styles/ir-black.css | 73 + .../libs/highlight.js/styles/kimbie.dark.css | 74 + .../libs/highlight.js/styles/kimbie.light.css | 74 + .../libs/highlight.js/styles/magula.css | 70 + .../libs/highlight.js/styles/mono-blue.css | 59 + .../highlight.js/styles/monokai-sublime.css | 83 + .../libs/highlight.js/styles/monokai.css | 70 + .../libs/highlight.js/styles/obsidian.css | 88 + .../libs/highlight.js/styles/ocean.css | 74 + .../libs/highlight.js/styles/paraiso-dark.css | 72 + .../highlight.js/styles/paraiso-light.css | 72 + .../libs/highlight.js/styles/pojoaque.css | 83 + .../libs/highlight.js/styles/pojoaque.jpg | Bin 0 -> 1186 bytes .../libs/highlight.js/styles/purebasic.css | 96 + .../highlight.js/styles/qtcreator_dark.css | 83 + .../highlight.js/styles/qtcreator_light.css | 83 + .../libs/highlight.js/styles/railscasts.css | 106 + .../libs/highlight.js/styles/rainbow.css | 85 + .../libs/highlight.js/styles/routeros.css | 108 + .../libs/highlight.js/styles/school-book.css | 72 + .../libs/highlight.js/styles/school-book.png | Bin 0 -> 486 bytes .../highlight.js/styles/solarized-dark.css | 84 + .../highlight.js/styles/solarized-light.css | 84 + .../libs/highlight.js/styles/sunburst.css | 102 + .../styles/tomorrow-night-blue.css | 75 + .../styles/tomorrow-night-bright.css | 74 + .../styles/tomorrow-night-eighties.css | 74 + .../highlight.js/styles/tomorrow-night.css | 75 + .../libs/highlight.js/styles/tomorrow.css | 72 + .../wwwroot/libs/highlight.js/styles/vs.css | 68 + .../libs/highlight.js/styles/vs2015.css | 115 + .../libs/highlight.js/styles/xcode.css | 93 + .../libs/highlight.js/styles/xt256.css | 92 + .../libs/highlight.js/styles/zenburn.css | 80 + .../wwwroot/libs/jstree/jstree.js | 8681 ++++ .../wwwroot/libs/jstree/jstree.min.js | 6 + .../libs/jstree/themes/default-dark/32px.png | Bin 0 -> 1525 bytes .../libs/jstree/themes/default-dark/40px.png | Bin 0 -> 6526 bytes .../libs/jstree/themes/default-dark/style.css | 1150 + .../jstree/themes/default-dark/style.min.css | 1 + .../jstree/themes/default-dark/throbber.gif | Bin 0 -> 1464 bytes .../libs/jstree/themes/default/32px.png | Bin 0 -> 5660 bytes .../libs/jstree/themes/default/40px.png | Bin 0 -> 2215 bytes .../libs/jstree/themes/default/style.css | 1106 + .../libs/jstree/themes/default/style.min.css | 1 + .../libs/jstree/themes/default/throbber.gif | Bin 0 -> 1464 bytes .../wwwroot/libs/prismjs/CHANGELOG.md | 3068 ++ .../wwwroot/libs/prismjs/LICENSE | 21 + .../wwwroot/libs/prismjs/README.md | 51 + .../wwwroot/libs/prismjs/components.js | 2 + .../wwwroot/libs/prismjs/components.json | 1766 + .../wwwroot/libs/prismjs/components/index.js | 56 + .../libs/prismjs/components/prism-abap.js | 48 + .../libs/prismjs/components/prism-abap.min.js | 1 + .../libs/prismjs/components/prism-abnf.js | 54 + .../libs/prismjs/components/prism-abnf.min.js | 1 + .../prismjs/components/prism-actionscript.js | 19 + .../components/prism-actionscript.min.js | 1 + .../libs/prismjs/components/prism-ada.js | 22 + .../libs/prismjs/components/prism-ada.min.js | 1 + .../libs/prismjs/components/prism-agda.js | 24 + .../libs/prismjs/components/prism-agda.min.js | 1 + .../libs/prismjs/components/prism-al.js | 25 + .../libs/prismjs/components/prism-al.min.js | 1 + .../libs/prismjs/components/prism-antlr4.js | 65 + .../prismjs/components/prism-antlr4.min.js | 1 + .../prismjs/components/prism-apacheconf.js | 47 + .../components/prism-apacheconf.min.js | 1 + .../libs/prismjs/components/prism-apex.js | 65 + .../libs/prismjs/components/prism-apex.min.js | 1 + .../libs/prismjs/components/prism-apl.js | 32 + .../libs/prismjs/components/prism-apl.min.js | 1 + .../prismjs/components/prism-applescript.js | 17 + .../components/prism-applescript.min.js | 1 + .../libs/prismjs/components/prism-aql.js | 49 + .../libs/prismjs/components/prism-aql.min.js | 1 + .../libs/prismjs/components/prism-arduino.js | 7 + .../prismjs/components/prism-arduino.min.js | 1 + .../libs/prismjs/components/prism-arff.js | 10 + .../libs/prismjs/components/prism-arff.min.js | 1 + .../libs/prismjs/components/prism-armasm.js | 49 + .../prismjs/components/prism-armasm.min.js | 1 + .../libs/prismjs/components/prism-arturo.js | 105 + .../prismjs/components/prism-arturo.min.js | 1 + .../libs/prismjs/components/prism-asciidoc.js | 234 + .../prismjs/components/prism-asciidoc.min.js | 1 + .../libs/prismjs/components/prism-asm6502.js | 29 + .../prismjs/components/prism-asm6502.min.js | 1 + .../libs/prismjs/components/prism-asmatmel.js | 43 + .../prismjs/components/prism-asmatmel.min.js | 1 + .../libs/prismjs/components/prism-aspnet.js | 48 + .../prismjs/components/prism-aspnet.min.js | 1 + .../prismjs/components/prism-autohotkey.js | 44 + .../components/prism-autohotkey.min.js | 1 + .../libs/prismjs/components/prism-autoit.js | 34 + .../prismjs/components/prism-autoit.min.js | 1 + .../libs/prismjs/components/prism-avisynth.js | 188 + .../prismjs/components/prism-avisynth.min.js | 1 + .../libs/prismjs/components/prism-avro-idl.js | 50 + .../prismjs/components/prism-avro-idl.min.js | 1 + .../libs/prismjs/components/prism-awk.js | 32 + .../libs/prismjs/components/prism-awk.min.js | 1 + .../libs/prismjs/components/prism-bash.js | 235 + .../libs/prismjs/components/prism-bash.min.js | 1 + .../libs/prismjs/components/prism-basic.js | 17 + .../prismjs/components/prism-basic.min.js | 1 + .../libs/prismjs/components/prism-batch.js | 99 + .../prismjs/components/prism-batch.min.js | 1 + .../libs/prismjs/components/prism-bbcode.js | 29 + .../prismjs/components/prism-bbcode.min.js | 1 + .../libs/prismjs/components/prism-bbj.js | 19 + .../libs/prismjs/components/prism-bbj.min.js | 1 + .../libs/prismjs/components/prism-bicep.js | 77 + .../prismjs/components/prism-bicep.min.js | 1 + .../libs/prismjs/components/prism-birb.js | 23 + .../libs/prismjs/components/prism-birb.min.js | 1 + .../libs/prismjs/components/prism-bison.js | 39 + .../prismjs/components/prism-bison.min.js | 1 + .../libs/prismjs/components/prism-bnf.js | 21 + .../libs/prismjs/components/prism-bnf.min.js | 1 + .../libs/prismjs/components/prism-bqn.js | 63 + .../libs/prismjs/components/prism-bqn.min.js | 1 + .../prismjs/components/prism-brainfuck.js | 20 + .../prismjs/components/prism-brainfuck.min.js | 1 + .../prismjs/components/prism-brightscript.js | 44 + .../components/prism-brightscript.min.js | 1 + .../libs/prismjs/components/prism-bro.js | 37 + .../libs/prismjs/components/prism-bro.min.js | 1 + .../libs/prismjs/components/prism-bsl.js | 75 + .../libs/prismjs/components/prism-bsl.min.js | 1 + .../libs/prismjs/components/prism-c.js | 80 + .../libs/prismjs/components/prism-c.min.js | 1 + .../libs/prismjs/components/prism-cfscript.js | 44 + .../prismjs/components/prism-cfscript.min.js | 1 + .../prismjs/components/prism-chaiscript.js | 60 + .../components/prism-chaiscript.min.js | 1 + .../libs/prismjs/components/prism-cil.js | 27 + .../libs/prismjs/components/prism-cil.min.js | 1 + .../libs/prismjs/components/prism-cilkc.js | 8 + .../prismjs/components/prism-cilkc.min.js | 1 + .../libs/prismjs/components/prism-cilkcpp.js | 9 + .../prismjs/components/prism-cilkcpp.min.js | 1 + .../libs/prismjs/components/prism-clike.js | 31 + .../prismjs/components/prism-clike.min.js | 1 + .../libs/prismjs/components/prism-clojure.js | 31 + .../prismjs/components/prism-clojure.min.js | 1 + .../libs/prismjs/components/prism-cmake.js | 29 + .../prismjs/components/prism-cmake.min.js | 1 + .../libs/prismjs/components/prism-cobol.js | 53 + .../prismjs/components/prism-cobol.min.js | 1 + .../prismjs/components/prism-coffeescript.js | 96 + .../components/prism-coffeescript.min.js | 1 + .../prismjs/components/prism-concurnas.js | 61 + .../prismjs/components/prism-concurnas.min.js | 1 + .../libs/prismjs/components/prism-cooklang.js | 146 + .../prismjs/components/prism-cooklang.min.js | 1 + .../libs/prismjs/components/prism-coq.js | 54 + .../libs/prismjs/components/prism-coq.min.js | 1 + .../libs/prismjs/components/prism-core.js | 1263 + .../libs/prismjs/components/prism-core.min.js | 1 + .../libs/prismjs/components/prism-cpp.js | 99 + .../libs/prismjs/components/prism-cpp.min.js | 1 + .../libs/prismjs/components/prism-crystal.js | 57 + .../prismjs/components/prism-crystal.min.js | 1 + .../libs/prismjs/components/prism-csharp.js | 366 + .../prismjs/components/prism-csharp.min.js | 1 + .../libs/prismjs/components/prism-cshtml.js | 199 + .../prismjs/components/prism-cshtml.min.js | 1 + .../libs/prismjs/components/prism-csp.js | 76 + .../libs/prismjs/components/prism-csp.min.js | 1 + .../prismjs/components/prism-css-extras.js | 120 + .../components/prism-css-extras.min.js | 1 + .../libs/prismjs/components/prism-css.js | 64 + .../libs/prismjs/components/prism-css.min.js | 1 + .../libs/prismjs/components/prism-csv.js | 6 + .../libs/prismjs/components/prism-csv.min.js | 1 + .../libs/prismjs/components/prism-cue.js | 84 + .../libs/prismjs/components/prism-cue.min.js | 1 + .../libs/prismjs/components/prism-cypher.js | 36 + .../prismjs/components/prism-cypher.min.js | 1 + .../libs/prismjs/components/prism-d.js | 84 + .../libs/prismjs/components/prism-d.min.js | 1 + .../libs/prismjs/components/prism-dart.js | 79 + .../libs/prismjs/components/prism-dart.min.js | 1 + .../prismjs/components/prism-dataweave.js | 41 + .../prismjs/components/prism-dataweave.min.js | 1 + .../libs/prismjs/components/prism-dax.js | 27 + .../libs/prismjs/components/prism-dax.min.js | 1 + .../libs/prismjs/components/prism-dhall.js | 69 + .../prismjs/components/prism-dhall.min.js | 1 + .../libs/prismjs/components/prism-diff.js | 64 + .../libs/prismjs/components/prism-diff.min.js | 1 + .../libs/prismjs/components/prism-django.js | 60 + .../prismjs/components/prism-django.min.js | 1 + .../prismjs/components/prism-dns-zone-file.js | 33 + .../components/prism-dns-zone-file.min.js | 1 + .../libs/prismjs/components/prism-docker.js | 98 + .../prismjs/components/prism-docker.min.js | 1 + .../libs/prismjs/components/prism-dot.js | 76 + .../libs/prismjs/components/prism-dot.min.js | 1 + .../libs/prismjs/components/prism-ebnf.js | 22 + .../libs/prismjs/components/prism-ebnf.min.js | 1 + .../prismjs/components/prism-editorconfig.js | 26 + .../components/prism-editorconfig.min.js | 1 + .../libs/prismjs/components/prism-eiffel.js | 34 + .../prismjs/components/prism-eiffel.min.js | 1 + .../libs/prismjs/components/prism-ejs.js | 26 + .../libs/prismjs/components/prism-ejs.min.js | 1 + .../libs/prismjs/components/prism-elixir.js | 98 + .../prismjs/components/prism-elixir.min.js | 1 + .../libs/prismjs/components/prism-elm.js | 45 + .../libs/prismjs/components/prism-elm.min.js | 1 + .../libs/prismjs/components/prism-erb.js | 25 + .../libs/prismjs/components/prism-erb.min.js | 1 + .../libs/prismjs/components/prism-erlang.js | 44 + .../prismjs/components/prism-erlang.min.js | 1 + .../libs/prismjs/components/prism-etlua.js | 23 + .../prismjs/components/prism-etlua.min.js | 1 + .../prismjs/components/prism-excel-formula.js | 66 + .../components/prism-excel-formula.min.js | 1 + .../libs/prismjs/components/prism-factor.js | 403 + .../prismjs/components/prism-factor.min.js | 1 + .../libs/prismjs/components/prism-false.js | 32 + .../prismjs/components/prism-false.min.js | 1 + .../prism-firestore-security-rules.js | 35 + .../prism-firestore-security-rules.min.js | 1 + .../libs/prismjs/components/prism-flow.js | 35 + .../libs/prismjs/components/prism-flow.min.js | 1 + .../libs/prismjs/components/prism-fortran.js | 40 + .../prismjs/components/prism-fortran.min.js | 1 + .../libs/prismjs/components/prism-fsharp.js | 75 + .../prismjs/components/prism-fsharp.min.js | 1 + .../libs/prismjs/components/prism-ftl.js | 98 + .../libs/prismjs/components/prism-ftl.min.js | 1 + .../libs/prismjs/components/prism-gap.js | 54 + .../libs/prismjs/components/prism-gap.min.js | 1 + .../libs/prismjs/components/prism-gcode.js | 16 + .../prismjs/components/prism-gcode.min.js | 1 + .../libs/prismjs/components/prism-gdscript.js | 27 + .../prismjs/components/prism-gdscript.min.js | 1 + .../libs/prismjs/components/prism-gedcom.js | 28 + .../prismjs/components/prism-gedcom.min.js | 1 + .../libs/prismjs/components/prism-gettext.js | 43 + .../prismjs/components/prism-gettext.min.js | 1 + .../libs/prismjs/components/prism-gherkin.js | 85 + .../prismjs/components/prism-gherkin.min.js | 1 + .../libs/prismjs/components/prism-git.js | 68 + .../libs/prismjs/components/prism-git.min.js | 1 + .../libs/prismjs/components/prism-glsl.js | 3 + .../libs/prismjs/components/prism-glsl.min.js | 1 + .../libs/prismjs/components/prism-gml.js | 7 + .../libs/prismjs/components/prism-gml.min.js | 1 + .../libs/prismjs/components/prism-gn.js | 51 + .../libs/prismjs/components/prism-gn.min.js | 1 + .../prismjs/components/prism-go-module.js | 24 + .../prismjs/components/prism-go-module.min.js | 1 + .../libs/prismjs/components/prism-go.js | 28 + .../libs/prismjs/components/prism-go.min.js | 1 + .../libs/prismjs/components/prism-gradle.js | 63 + .../prismjs/components/prism-gradle.min.js | 1 + .../libs/prismjs/components/prism-graphql.js | 211 + .../prismjs/components/prism-graphql.min.js | 1 + .../libs/prismjs/components/prism-groovy.js | 65 + .../prismjs/components/prism-groovy.min.js | 1 + .../libs/prismjs/components/prism-haml.js | 149 + .../libs/prismjs/components/prism-haml.min.js | 1 + .../prismjs/components/prism-handlebars.js | 40 + .../components/prism-handlebars.min.js | 1 + .../libs/prismjs/components/prism-haskell.js | 66 + .../prismjs/components/prism-haskell.min.js | 1 + .../libs/prismjs/components/prism-haxe.js | 78 + .../libs/prismjs/components/prism-haxe.min.js | 1 + .../libs/prismjs/components/prism-hcl.js | 63 + .../libs/prismjs/components/prism-hcl.min.js | 1 + .../libs/prismjs/components/prism-hlsl.js | 20 + .../libs/prismjs/components/prism-hlsl.min.js | 1 + .../libs/prismjs/components/prism-hoon.js | 14 + .../libs/prismjs/components/prism-hoon.min.js | 1 + .../libs/prismjs/components/prism-hpkp.js | 14 + .../libs/prismjs/components/prism-hpkp.min.js | 1 + .../libs/prismjs/components/prism-hsts.js | 14 + .../libs/prismjs/components/prism-hsts.min.js | 1 + .../libs/prismjs/components/prism-http.js | 151 + .../libs/prismjs/components/prism-http.min.js | 1 + .../prismjs/components/prism-ichigojam.js | 15 + .../prismjs/components/prism-ichigojam.min.js | 1 + .../libs/prismjs/components/prism-icon.js | 20 + .../libs/prismjs/components/prism-icon.min.js | 1 + .../components/prism-icu-message-format.js | 148 + .../prism-icu-message-format.min.js | 1 + .../libs/prismjs/components/prism-idris.js | 19 + .../prismjs/components/prism-idris.min.js | 1 + .../libs/prismjs/components/prism-iecst.js | 32 + .../prismjs/components/prism-iecst.min.js | 1 + .../libs/prismjs/components/prism-ignore.js | 23 + .../prismjs/components/prism-ignore.min.js | 1 + .../libs/prismjs/components/prism-inform7.js | 61 + .../prismjs/components/prism-inform7.min.js | 1 + .../libs/prismjs/components/prism-ini.js | 42 + .../libs/prismjs/components/prism-ini.min.js | 1 + .../libs/prismjs/components/prism-io.js | 22 + .../libs/prismjs/components/prism-io.min.js | 1 + .../libs/prismjs/components/prism-j.js | 28 + .../libs/prismjs/components/prism-j.min.js | 1 + .../libs/prismjs/components/prism-java.js | 124 + .../libs/prismjs/components/prism-java.min.js | 1 + .../libs/prismjs/components/prism-javadoc.js | 82 + .../prismjs/components/prism-javadoc.min.js | 1 + .../prismjs/components/prism-javadoclike.js | 87 + .../components/prism-javadoclike.min.js | 1 + .../prismjs/components/prism-javascript.js | 172 + .../components/prism-javascript.min.js | 1 + .../components/prism-javastacktrace.js | 142 + .../components/prism-javastacktrace.min.js | 1 + .../libs/prismjs/components/prism-jexl.js | 14 + .../libs/prismjs/components/prism-jexl.min.js | 1 + .../libs/prismjs/components/prism-jolie.js | 41 + .../prismjs/components/prism-jolie.min.js | 1 + .../libs/prismjs/components/prism-jq.js | 69 + .../libs/prismjs/components/prism-jq.min.js | 1 + .../prismjs/components/prism-js-extras.js | 135 + .../prismjs/components/prism-js-extras.min.js | 1 + .../prismjs/components/prism-js-templates.js | 349 + .../components/prism-js-templates.min.js | 1 + .../libs/prismjs/components/prism-jsdoc.js | 78 + .../prismjs/components/prism-jsdoc.min.js | 1 + .../libs/prismjs/components/prism-json.js | 27 + .../libs/prismjs/components/prism-json.min.js | 1 + .../libs/prismjs/components/prism-json5.js | 23 + .../prismjs/components/prism-json5.min.js | 1 + .../libs/prismjs/components/prism-jsonp.js | 7 + .../prismjs/components/prism-jsonp.min.js | 1 + .../prismjs/components/prism-jsstacktrace.js | 49 + .../components/prism-jsstacktrace.min.js | 1 + .../libs/prismjs/components/prism-jsx.js | 145 + .../libs/prismjs/components/prism-jsx.min.js | 1 + .../libs/prismjs/components/prism-julia.js | 35 + .../prismjs/components/prism-julia.min.js | 1 + .../prismjs/components/prism-keepalived.js | 51 + .../components/prism-keepalived.min.js | 1 + .../libs/prismjs/components/prism-keyman.js | 44 + .../prismjs/components/prism-keyman.min.js | 1 + .../libs/prismjs/components/prism-kotlin.js | 88 + .../prismjs/components/prism-kotlin.min.js | 1 + .../libs/prismjs/components/prism-kumir.js | 106 + .../prismjs/components/prism-kumir.min.js | 1 + .../libs/prismjs/components/prism-kusto.js | 44 + .../prismjs/components/prism-kusto.min.js | 1 + .../libs/prismjs/components/prism-latex.js | 64 + .../prismjs/components/prism-latex.min.js | 1 + .../libs/prismjs/components/prism-latte.js | 63 + .../prismjs/components/prism-latte.min.js | 1 + .../libs/prismjs/components/prism-less.js | 54 + .../libs/prismjs/components/prism-less.min.js | 1 + .../libs/prismjs/components/prism-lilypond.js | 69 + .../prismjs/components/prism-lilypond.min.js | 1 + .../prismjs/components/prism-linker-script.js | 30 + .../components/prism-linker-script.min.js | 1 + .../libs/prismjs/components/prism-liquid.js | 66 + .../prismjs/components/prism-liquid.min.js | 1 + .../libs/prismjs/components/prism-lisp.js | 197 + .../libs/prismjs/components/prism-lisp.min.js | 1 + .../prismjs/components/prism-livescript.js | 119 + .../components/prism-livescript.min.js | 1 + .../libs/prismjs/components/prism-llvm.js | 19 + .../libs/prismjs/components/prism-llvm.min.js | 1 + .../libs/prismjs/components/prism-log.js | 120 + .../libs/prismjs/components/prism-log.min.js | 1 + .../libs/prismjs/components/prism-lolcode.js | 55 + .../prismjs/components/prism-lolcode.min.js | 1 + .../libs/prismjs/components/prism-lua.js | 20 + .../libs/prismjs/components/prism-lua.min.js | 1 + .../libs/prismjs/components/prism-magma.js | 35 + .../prismjs/components/prism-magma.min.js | 1 + .../libs/prismjs/components/prism-makefile.js | 34 + .../prismjs/components/prism-makefile.min.js | 1 + .../libs/prismjs/components/prism-markdown.js | 415 + .../prismjs/components/prism-markdown.min.js | 1 + .../components/prism-markup-templating.js | 124 + .../components/prism-markup-templating.min.js | 1 + .../libs/prismjs/components/prism-markup.js | 186 + .../prismjs/components/prism-markup.min.js | 1 + .../libs/prismjs/components/prism-mata.js | 50 + .../libs/prismjs/components/prism-mata.min.js | 1 + .../libs/prismjs/components/prism-matlab.js | 16 + .../prismjs/components/prism-matlab.min.js | 1 + .../prismjs/components/prism-maxscript.js | 91 + .../prismjs/components/prism-maxscript.min.js | 1 + .../libs/prismjs/components/prism-mel.js | 46 + .../libs/prismjs/components/prism-mel.min.js | 1 + .../libs/prismjs/components/prism-mermaid.js | 113 + .../prismjs/components/prism-mermaid.min.js | 1 + .../libs/prismjs/components/prism-metafont.js | 84 + .../prismjs/components/prism-metafont.min.js | 1 + .../libs/prismjs/components/prism-mizar.js | 12 + .../prismjs/components/prism-mizar.min.js | 1 + .../libs/prismjs/components/prism-mongodb.js | 97 + .../prismjs/components/prism-mongodb.min.js | 1 + .../libs/prismjs/components/prism-monkey.js | 29 + .../prismjs/components/prism-monkey.min.js | 1 + .../prismjs/components/prism-moonscript.js | 57 + .../components/prism-moonscript.min.js | 1 + .../libs/prismjs/components/prism-n1ql.js | 24 + .../libs/prismjs/components/prism-n1ql.min.js | 1 + .../libs/prismjs/components/prism-n4js.js | 14 + .../libs/prismjs/components/prism-n4js.min.js | 1 + .../components/prism-nand2tetris-hdl.js | 9 + .../components/prism-nand2tetris-hdl.min.js | 1 + .../prismjs/components/prism-naniscript.js | 170 + .../components/prism-naniscript.min.js | 1 + .../libs/prismjs/components/prism-nasm.js | 24 + .../libs/prismjs/components/prism-nasm.min.js | 1 + .../libs/prismjs/components/prism-neon.js | 40 + .../libs/prismjs/components/prism-neon.min.js | 1 + .../libs/prismjs/components/prism-nevod.js | 125 + .../prismjs/components/prism-nevod.min.js | 1 + .../libs/prismjs/components/prism-nginx.js | 54 + .../prismjs/components/prism-nginx.min.js | 1 + .../libs/prismjs/components/prism-nim.js | 44 + .../libs/prismjs/components/prism-nim.min.js | 1 + .../libs/prismjs/components/prism-nix.js | 37 + .../libs/prismjs/components/prism-nix.min.js | 1 + .../libs/prismjs/components/prism-nsis.js | 30 + .../libs/prismjs/components/prism-nsis.min.js | 1 + .../prismjs/components/prism-objectivec.js | 12 + .../components/prism-objectivec.min.js | 1 + .../libs/prismjs/components/prism-ocaml.js | 58 + .../prismjs/components/prism-ocaml.min.js | 1 + .../libs/prismjs/components/prism-odin.js | 99 + .../libs/prismjs/components/prism-odin.min.js | 1 + .../libs/prismjs/components/prism-opencl.js | 61 + .../prismjs/components/prism-opencl.min.js | 1 + .../libs/prismjs/components/prism-openqasm.js | 23 + .../prismjs/components/prism-openqasm.min.js | 1 + .../libs/prismjs/components/prism-oz.js | 28 + .../libs/prismjs/components/prism-oz.min.js | 1 + .../libs/prismjs/components/prism-parigp.js | 30 + .../prismjs/components/prism-parigp.min.js | 1 + .../libs/prismjs/components/prism-parser.js | 73 + .../prismjs/components/prism-parser.min.js | 1 + .../libs/prismjs/components/prism-pascal.js | 71 + .../prismjs/components/prism-pascal.min.js | 1 + .../prismjs/components/prism-pascaligo.js | 62 + .../prismjs/components/prism-pascaligo.min.js | 1 + .../libs/prismjs/components/prism-pcaxis.js | 53 + .../prismjs/components/prism-pcaxis.min.js | 1 + .../prismjs/components/prism-peoplecode.js | 42 + .../components/prism-peoplecode.min.js | 1 + .../libs/prismjs/components/prism-perl.js | 156 + .../libs/prismjs/components/prism-perl.min.js | 1 + .../prismjs/components/prism-php-extras.js | 14 + .../components/prism-php-extras.min.js | 1 + .../libs/prismjs/components/prism-php.js | 342 + .../libs/prismjs/components/prism-php.min.js | 1 + .../libs/prismjs/components/prism-phpdoc.js | 27 + .../prismjs/components/prism-phpdoc.min.js | 1 + .../prismjs/components/prism-plant-uml.js | 103 + .../prismjs/components/prism-plant-uml.min.js | 1 + .../libs/prismjs/components/prism-plsql.js | 17 + .../prismjs/components/prism-plsql.min.js | 1 + .../prismjs/components/prism-powerquery.js | 55 + .../components/prism-powerquery.min.js | 1 + .../prismjs/components/prism-powershell.js | 58 + .../components/prism-powershell.min.js | 1 + .../prismjs/components/prism-processing.js | 15 + .../components/prism-processing.min.js | 1 + .../libs/prismjs/components/prism-prolog.js | 19 + .../prismjs/components/prism-prolog.min.js | 1 + .../libs/prismjs/components/prism-promql.js | 99 + .../prismjs/components/prism-promql.min.js | 1 + .../prismjs/components/prism-properties.js | 13 + .../components/prism-properties.min.js | 1 + .../libs/prismjs/components/prism-protobuf.js | 43 + .../prismjs/components/prism-protobuf.min.js | 1 + .../libs/prismjs/components/prism-psl.js | 35 + .../libs/prismjs/components/prism-psl.min.js | 1 + .../libs/prismjs/components/prism-pug.js | 188 + .../libs/prismjs/components/prism-pug.min.js | 1 + .../libs/prismjs/components/prism-puppet.js | 136 + .../prismjs/components/prism-puppet.min.js | 1 + .../libs/prismjs/components/prism-pure.js | 82 + .../libs/prismjs/components/prism-pure.min.js | 1 + .../prismjs/components/prism-purebasic.js | 70 + .../prismjs/components/prism-purebasic.min.js | 1 + .../prismjs/components/prism-purescript.js | 31 + .../components/prism-purescript.min.js | 1 + .../libs/prismjs/components/prism-python.js | 65 + .../prismjs/components/prism-python.min.js | 1 + .../libs/prismjs/components/prism-q.js | 51 + .../libs/prismjs/components/prism-q.min.js | 1 + .../libs/prismjs/components/prism-qml.js | 61 + .../libs/prismjs/components/prism-qml.min.js | 1 + .../libs/prismjs/components/prism-qore.js | 20 + .../libs/prismjs/components/prism-qore.min.js | 1 + .../libs/prismjs/components/prism-qsharp.js | 132 + .../prismjs/components/prism-qsharp.min.js | 1 + .../libs/prismjs/components/prism-r.js | 22 + .../libs/prismjs/components/prism-r.min.js | 1 + .../libs/prismjs/components/prism-racket.js | 18 + .../prismjs/components/prism-racket.min.js | 1 + .../libs/prismjs/components/prism-reason.js | 25 + .../prismjs/components/prism-reason.min.js | 1 + .../libs/prismjs/components/prism-regex.js | 104 + .../prismjs/components/prism-regex.min.js | 1 + .../libs/prismjs/components/prism-rego.js | 30 + .../libs/prismjs/components/prism-rego.min.js | 1 + .../libs/prismjs/components/prism-renpy.js | 29 + .../prismjs/components/prism-renpy.min.js | 1 + .../libs/prismjs/components/prism-rescript.js | 60 + .../prismjs/components/prism-rescript.min.js | 1 + .../libs/prismjs/components/prism-rest.js | 205 + .../libs/prismjs/components/prism-rest.min.js | 1 + .../libs/prismjs/components/prism-rip.js | 38 + .../libs/prismjs/components/prism-rip.min.js | 1 + .../libs/prismjs/components/prism-roboconf.js | 27 + .../prismjs/components/prism-roboconf.min.js | 1 + .../components/prism-robotframework.js | 104 + .../components/prism-robotframework.min.js | 1 + .../libs/prismjs/components/prism-ruby.js | 189 + .../libs/prismjs/components/prism-ruby.min.js | 1 + .../libs/prismjs/components/prism-rust.js | 128 + .../libs/prismjs/components/prism-rust.min.js | 1 + .../libs/prismjs/components/prism-sas.js | 326 + .../libs/prismjs/components/prism-sas.min.js | 1 + .../libs/prismjs/components/prism-sass.js | 77 + .../libs/prismjs/components/prism-sass.min.js | 1 + .../libs/prismjs/components/prism-scala.js | 50 + .../prismjs/components/prism-scala.min.js | 1 + .../libs/prismjs/components/prism-scheme.js | 120 + .../prismjs/components/prism-scheme.min.js | 1 + .../libs/prismjs/components/prism-scss.js | 81 + .../libs/prismjs/components/prism-scss.min.js | 1 + .../prismjs/components/prism-shell-session.js | 70 + .../components/prism-shell-session.min.js | 1 + .../libs/prismjs/components/prism-smali.js | 87 + .../prismjs/components/prism-smali.min.js | 1 + .../prismjs/components/prism-smalltalk.js | 38 + .../prismjs/components/prism-smalltalk.min.js | 1 + .../libs/prismjs/components/prism-smarty.js | 131 + .../prismjs/components/prism-smarty.min.js | 1 + .../libs/prismjs/components/prism-sml.js | 68 + .../libs/prismjs/components/prism-sml.min.js | 1 + .../libs/prismjs/components/prism-solidity.js | 22 + .../prismjs/components/prism-solidity.min.js | 1 + .../prismjs/components/prism-solution-file.js | 51 + .../components/prism-solution-file.min.js | 1 + .../libs/prismjs/components/prism-soy.js | 96 + .../libs/prismjs/components/prism-soy.min.js | 1 + .../libs/prismjs/components/prism-sparql.js | 18 + .../prismjs/components/prism-sparql.min.js | 1 + .../prismjs/components/prism-splunk-spl.js | 24 + .../components/prism-splunk-spl.min.js | 1 + .../libs/prismjs/components/prism-sqf.js | 34 + .../libs/prismjs/components/prism-sqf.min.js | 1 + .../libs/prismjs/components/prism-sql.js | 32 + .../libs/prismjs/components/prism-sql.min.js | 1 + .../libs/prismjs/components/prism-squirrel.js | 47 + .../prismjs/components/prism-squirrel.min.js | 1 + .../libs/prismjs/components/prism-stan.js | 65 + .../libs/prismjs/components/prism-stan.min.js | 1 + .../libs/prismjs/components/prism-stata.js | 76 + .../prismjs/components/prism-stata.min.js | 1 + .../libs/prismjs/components/prism-stylus.js | 143 + .../prismjs/components/prism-stylus.min.js | 1 + .../prismjs/components/prism-supercollider.js | 36 + .../components/prism-supercollider.min.js | 1 + .../libs/prismjs/components/prism-swift.js | 148 + .../prismjs/components/prism-swift.min.js | 1 + .../libs/prismjs/components/prism-systemd.js | 74 + .../prismjs/components/prism-systemd.min.js | 1 + .../libs/prismjs/components/prism-t4-cs.js | 1 + .../prismjs/components/prism-t4-cs.min.js | 1 + .../prismjs/components/prism-t4-templating.js | 49 + .../components/prism-t4-templating.min.js | 1 + .../libs/prismjs/components/prism-t4-vb.js | 1 + .../prismjs/components/prism-t4-vb.min.js | 1 + .../libs/prismjs/components/prism-tap.js | 22 + .../libs/prismjs/components/prism-tap.min.js | 1 + .../libs/prismjs/components/prism-tcl.js | 46 + .../libs/prismjs/components/prism-tcl.min.js | 1 + .../libs/prismjs/components/prism-textile.js | 286 + .../prismjs/components/prism-textile.min.js | 1 + .../libs/prismjs/components/prism-toml.js | 49 + .../libs/prismjs/components/prism-toml.min.js | 1 + .../libs/prismjs/components/prism-tremor.js | 72 + .../prismjs/components/prism-tremor.min.js | 1 + .../libs/prismjs/components/prism-tsx.js | 15 + .../libs/prismjs/components/prism-tsx.min.js | 1 + .../libs/prismjs/components/prism-tt2.js | 53 + .../libs/prismjs/components/prism-tt2.min.js | 1 + .../libs/prismjs/components/prism-turtle.js | 54 + .../prismjs/components/prism-turtle.min.js | 1 + .../libs/prismjs/components/prism-twig.js | 44 + .../libs/prismjs/components/prism-twig.min.js | 1 + .../prismjs/components/prism-typescript.js | 60 + .../components/prism-typescript.min.js | 1 + .../prismjs/components/prism-typoscript.js | 80 + .../components/prism-typoscript.min.js | 1 + .../prismjs/components/prism-unrealscript.js | 42 + .../components/prism-unrealscript.min.js | 1 + .../libs/prismjs/components/prism-uorazor.js | 48 + .../prismjs/components/prism-uorazor.min.js | 1 + .../libs/prismjs/components/prism-uri.js | 96 + .../libs/prismjs/components/prism-uri.min.js | 1 + .../libs/prismjs/components/prism-v.js | 81 + .../libs/prismjs/components/prism-v.min.js | 1 + .../libs/prismjs/components/prism-vala.js | 84 + .../libs/prismjs/components/prism-vala.min.js | 1 + .../libs/prismjs/components/prism-vbnet.js | 22 + .../prismjs/components/prism-vbnet.min.js | 1 + .../libs/prismjs/components/prism-velocity.js | 72 + .../prismjs/components/prism-velocity.min.js | 1 + .../libs/prismjs/components/prism-verilog.js | 26 + .../prismjs/components/prism-verilog.min.js | 1 + .../libs/prismjs/components/prism-vhdl.js | 26 + .../libs/prismjs/components/prism-vhdl.min.js | 1 + .../libs/prismjs/components/prism-vim.js | 10 + .../libs/prismjs/components/prism-vim.min.js | 1 + .../prismjs/components/prism-visual-basic.js | 29 + .../components/prism-visual-basic.min.js | 1 + .../prismjs/components/prism-warpscript.js | 21 + .../components/prism-warpscript.min.js | 1 + .../libs/prismjs/components/prism-wasm.js | 31 + .../libs/prismjs/components/prism-wasm.min.js | 1 + .../libs/prismjs/components/prism-web-idl.js | 101 + .../prismjs/components/prism-web-idl.min.js | 1 + .../libs/prismjs/components/prism-wgsl.js | 69 + .../libs/prismjs/components/prism-wgsl.min.js | 1 + .../libs/prismjs/components/prism-wiki.js | 82 + .../libs/prismjs/components/prism-wiki.min.js | 1 + .../libs/prismjs/components/prism-wolfram.js | 29 + .../prismjs/components/prism-wolfram.min.js | 1 + .../libs/prismjs/components/prism-wren.js | 100 + .../libs/prismjs/components/prism-wren.min.js | 1 + .../libs/prismjs/components/prism-xeora.js | 114 + .../prismjs/components/prism-xeora.min.js | 1 + .../libs/prismjs/components/prism-xml-doc.js | 40 + .../prismjs/components/prism-xml-doc.min.js | 1 + .../libs/prismjs/components/prism-xojo.js | 21 + .../libs/prismjs/components/prism-xojo.min.js | 1 + .../libs/prismjs/components/prism-xquery.js | 162 + .../prismjs/components/prism-xquery.min.js | 1 + .../libs/prismjs/components/prism-yaml.js | 83 + .../libs/prismjs/components/prism-yaml.min.js | 1 + .../libs/prismjs/components/prism-yang.js | 20 + .../libs/prismjs/components/prism-yang.min.js | 1 + .../libs/prismjs/components/prism-zig.js | 101 + .../libs/prismjs/components/prism-zig.min.js | 1 + .../wwwroot/libs/prismjs/dependencies.js | 452 + .../wwwroot/libs/prismjs/package.json | 87 + .../plugins/autolinker/prism-autolinker.css | 3 + .../plugins/autolinker/prism-autolinker.js | 76 + .../autolinker/prism-autolinker.min.css | 1 + .../autolinker/prism-autolinker.min.js | 1 + .../plugins/autoloader/prism-autoloader.js | 541 + .../autoloader/prism-autoloader.min.js | 1 + .../command-line/prism-command-line.css | 43 + .../command-line/prism-command-line.js | 239 + .../command-line/prism-command-line.min.css | 1 + .../command-line/prism-command-line.min.js | 1 + .../prism-copy-to-clipboard.js | 160 + .../prism-copy-to-clipboard.min.js | 1 + .../custom-class/prism-custom-class.js | 110 + .../custom-class/prism-custom-class.min.js | 1 + .../prism-data-uri-highlight.js | 94 + .../prism-data-uri-highlight.min.js | 1 + .../diff-highlight/prism-diff-highlight.css | 13 + .../diff-highlight/prism-diff-highlight.js | 90 + .../prism-diff-highlight.min.css | 1 + .../prism-diff-highlight.min.js | 1 + .../download-button/prism-download-button.js | 20 + .../prism-download-button.min.js | 1 + .../file-highlight/prism-file-highlight.js | 195 + .../prism-file-highlight.min.js | 1 + .../prism-filter-highlight-all.js | 127 + .../prism-filter-highlight-all.min.js | 1 + .../prism-highlight-keywords.js | 14 + .../prism-highlight-keywords.min.js | 1 + .../inline-color/prism-inline-color.css | 33 + .../inline-color/prism-inline-color.js | 105 + .../inline-color/prism-inline-color.min.css | 1 + .../inline-color/prism-inline-color.min.js | 1 + .../jsonp-highlight/prism-jsonp-highlight.js | 303 + .../prism-jsonp-highlight.min.js | 1 + .../plugins/keep-markup/prism-keep-markup.js | 126 + .../keep-markup/prism-keep-markup.min.js | 1 + .../line-highlight/prism-line-highlight.css | 70 + .../line-highlight/prism-line-highlight.js | 346 + .../prism-line-highlight.min.css | 1 + .../prism-line-highlight.min.js | 1 + .../line-numbers/prism-line-numbers.css | 40 + .../line-numbers/prism-line-numbers.js | 252 + .../line-numbers/prism-line-numbers.min.css | 1 + .../line-numbers/prism-line-numbers.min.js | 1 + .../match-braces/prism-match-braces.css | 29 + .../match-braces/prism-match-braces.js | 190 + .../match-braces/prism-match-braces.min.css | 1 + .../match-braces/prism-match-braces.min.js | 1 + .../prism-normalize-whitespace.js | 229 + .../prism-normalize-whitespace.min.js | 1 + .../plugins/previewers/prism-previewers.css | 243 + .../plugins/previewers/prism-previewers.js | 712 + .../previewers/prism-previewers.min.css | 1 + .../previewers/prism-previewers.min.js | 1 + .../prism-remove-initial-line-feed.js | 21 + .../prism-remove-initial-line-feed.min.js | 1 + .../show-invisibles/prism-show-invisibles.css | 34 + .../show-invisibles/prism-show-invisibles.js | 83 + .../prism-show-invisibles.min.css | 1 + .../prism-show-invisibles.min.js | 1 + .../show-language/prism-show-language.js | 325 + .../show-language/prism-show-language.min.js | 1 + .../prismjs/plugins/toolbar/prism-toolbar.css | 65 + .../prismjs/plugins/toolbar/prism-toolbar.js | 179 + .../plugins/toolbar/prism-toolbar.min.css | 1 + .../plugins/toolbar/prism-toolbar.min.js | 1 + .../plugins/treeview/prism-treeview.css | 168 + .../plugins/treeview/prism-treeview.js | 70 + .../plugins/treeview/prism-treeview.min.css | 1 + .../plugins/treeview/prism-treeview.min.js | 1 + .../prism-unescaped-markup.css | 10 + .../prism-unescaped-markup.js | 62 + .../prism-unescaped-markup.min.css | 1 + .../prism-unescaped-markup.min.js | 1 + .../libs/prismjs/plugins/wpd/prism-wpd.css | 11 + .../libs/prismjs/plugins/wpd/prism-wpd.js | 154 + .../prismjs/plugins/wpd/prism-wpd.min.css | 1 + .../libs/prismjs/plugins/wpd/prism-wpd.min.js | 1 + .../wwwroot/libs/prismjs/prism.js | 1946 + .../wwwroot/libs/prismjs/themes/prism-coy.css | 219 + .../libs/prismjs/themes/prism-coy.min.css | 1 + .../libs/prismjs/themes/prism-dark.css | 129 + .../libs/prismjs/themes/prism-dark.min.css | 1 + .../libs/prismjs/themes/prism-funky.css | 130 + .../libs/prismjs/themes/prism-funky.min.css | 1 + .../libs/prismjs/themes/prism-okaidia.css | 123 + .../libs/prismjs/themes/prism-okaidia.min.css | 1 + .../prismjs/themes/prism-solarizedlight.css | 150 + .../themes/prism-solarizedlight.min.css | 1 + .../libs/prismjs/themes/prism-tomorrow.css | 122 + .../prismjs/themes/prism-tomorrow.min.css | 1 + .../libs/prismjs/themes/prism-twilight.css | 169 + .../prismjs/themes/prism-twilight.min.css | 1 + .../wwwroot/libs/prismjs/themes/prism.css | 140 + .../wwwroot/libs/prismjs/themes/prism.min.css | 1 + .../wwwroot/libs/slugify/slugify.js | 69 + .../star-rating-svg/css/star-rating-svg.css | 37 + .../js/jquery.star-rating-svg.min.js | 1 + .../libs/tui-editor/toastui-editor-all.min.js | 24 + ...or-plugin-code-syntax-highlight-all.min.js | 15 + ...ditor-plugin-code-syntax-highlight.min.css | 171 + .../libs/tui-editor/toastui-editor.min.css | 7 + .../wwwroot/libs/uppy/README.md | 76 + .../wwwroot/libs/uppy/uppy.css | 4574 ++ .../wwwroot/libs/uppy/uppy.js | 42133 ++++++++++++++++ .../wwwroot/libs/uppy/uppy.js.map | 513 + .../wwwroot/libs/uppy/uppy.min.css | 11 + .../wwwroot/libs/uppy/uppy.min.js | 2 + .../wwwroot/libs/uppy/uppy.min.js.map | 5292 ++ 810 files changed, 106859 insertions(+) create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/clipboard/clipboard.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/clipboard/clipboard.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/highlight.pack.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/agate.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/androidstudio.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/arduino-light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/arta.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/ascetic.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-cave-dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-cave-light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-dune-dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-dune-light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-estuary-dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-estuary-light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-forest-dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-forest-light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-heath-dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-heath-light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-lakeside-dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-lakeside-light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-plateau-dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-plateau-light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-savanna-dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-savanna-light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-seaside-dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-seaside-light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-sulphurpool-dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-sulphurpool-light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atom-one-dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atom-one-light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/brown-paper.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/brown-papersq.png create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/codepen-embed.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/color-brewer.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/darcula.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/darkula.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/default.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/docco.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/dracula.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/far.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/foundation.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/github-gist.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/github.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/googlecode.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/grayscale.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/gruvbox-dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/gruvbox-light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/hopscotch.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/hybrid.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/idea.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/ir-black.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/kimbie.dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/kimbie.light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/magula.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/mono-blue.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/monokai-sublime.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/monokai.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/obsidian.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/ocean.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/paraiso-dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/paraiso-light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/pojoaque.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/pojoaque.jpg create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/purebasic.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/qtcreator_dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/qtcreator_light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/railscasts.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/rainbow.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/routeros.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/school-book.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/school-book.png create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/solarized-dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/solarized-light.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/sunburst.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night-blue.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night-bright.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night-eighties.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/vs.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/vs2015.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/xcode.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/xt256.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/zenburn.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/jstree.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/jstree.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default-dark/32px.png create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default-dark/40px.png create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default-dark/style.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default-dark/style.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default-dark/throbber.gif create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/32px.png create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/40px.png create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/style.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/style.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/throbber.gif create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/CHANGELOG.md create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/LICENSE create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/README.md create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components.json create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/index.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-abap.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-abap.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-abnf.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-abnf.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-actionscript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-actionscript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ada.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ada.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-agda.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-agda.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-al.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-al.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-antlr4.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-antlr4.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-apacheconf.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-apacheconf.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-apex.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-apex.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-apl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-apl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-applescript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-applescript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-aql.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-aql.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-arduino.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-arduino.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-arff.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-arff.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-armasm.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-armasm.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-arturo.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-arturo.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-asciidoc.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-asciidoc.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-asm6502.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-asm6502.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-asmatmel.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-asmatmel.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-aspnet.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-aspnet.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-autohotkey.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-autohotkey.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-autoit.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-autoit.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-avisynth.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-avisynth.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-avro-idl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-avro-idl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-awk.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-awk.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bash.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bash.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-basic.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-basic.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-batch.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-batch.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bbcode.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bbcode.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bbj.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bbj.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bicep.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bicep.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-birb.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-birb.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bison.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bison.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bnf.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bnf.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bqn.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bqn.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-brainfuck.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-brainfuck.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-brightscript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-brightscript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bro.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bro.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bsl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-bsl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-c.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-c.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cfscript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cfscript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-chaiscript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-chaiscript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cil.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cil.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cilkc.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cilkc.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cilkcpp.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cilkcpp.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-clike.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-clike.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-clojure.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-clojure.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cmake.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cmake.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cobol.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cobol.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-coffeescript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-coffeescript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-concurnas.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-concurnas.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cooklang.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cooklang.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-coq.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-coq.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-core.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-core.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cpp.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cpp.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-crystal.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-crystal.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-csharp.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-csharp.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cshtml.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cshtml.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-csp.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-csp.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-css-extras.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-css-extras.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-css.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-css.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-csv.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-csv.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cue.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cue.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cypher.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-cypher.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-d.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-d.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-dart.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-dart.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-dataweave.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-dataweave.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-dax.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-dax.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-dhall.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-dhall.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-diff.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-diff.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-django.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-django.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-dns-zone-file.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-dns-zone-file.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-docker.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-docker.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-dot.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-dot.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ebnf.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ebnf.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-editorconfig.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-editorconfig.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-eiffel.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-eiffel.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ejs.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ejs.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-elixir.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-elixir.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-elm.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-elm.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-erb.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-erb.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-erlang.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-erlang.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-etlua.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-etlua.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-excel-formula.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-excel-formula.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-factor.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-factor.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-false.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-false.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-firestore-security-rules.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-firestore-security-rules.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-flow.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-flow.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-fortran.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-fortran.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-fsharp.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-fsharp.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ftl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ftl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gap.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gap.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gcode.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gcode.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gdscript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gdscript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gedcom.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gedcom.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gettext.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gettext.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gherkin.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gherkin.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-git.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-git.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-glsl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-glsl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gml.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gml.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gn.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gn.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-go-module.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-go-module.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-go.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-go.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gradle.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-gradle.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-graphql.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-graphql.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-groovy.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-groovy.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-haml.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-haml.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-handlebars.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-handlebars.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-haskell.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-haskell.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-haxe.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-haxe.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-hcl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-hcl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-hlsl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-hlsl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-hoon.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-hoon.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-hpkp.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-hpkp.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-hsts.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-hsts.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-http.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-http.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ichigojam.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ichigojam.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-icon.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-icon.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-icu-message-format.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-icu-message-format.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-idris.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-idris.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-iecst.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-iecst.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ignore.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ignore.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-inform7.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-inform7.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ini.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ini.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-io.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-io.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-j.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-j.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-java.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-java.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-javadoc.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-javadoc.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-javadoclike.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-javadoclike.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-javascript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-javascript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-javastacktrace.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-javastacktrace.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-jexl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-jexl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-jolie.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-jolie.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-jq.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-jq.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-js-extras.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-js-extras.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-js-templates.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-js-templates.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-jsdoc.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-jsdoc.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-json.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-json.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-json5.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-json5.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-jsonp.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-jsonp.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-jsstacktrace.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-jsstacktrace.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-jsx.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-jsx.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-julia.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-julia.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-keepalived.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-keepalived.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-keyman.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-keyman.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-kotlin.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-kotlin.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-kumir.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-kumir.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-kusto.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-kusto.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-latex.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-latex.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-latte.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-latte.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-less.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-less.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-lilypond.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-lilypond.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-linker-script.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-linker-script.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-liquid.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-liquid.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-lisp.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-lisp.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-livescript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-livescript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-llvm.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-llvm.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-log.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-log.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-lolcode.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-lolcode.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-lua.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-lua.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-magma.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-magma.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-makefile.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-makefile.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-markdown.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-markdown.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-markup-templating.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-markup-templating.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-markup.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-markup.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-mata.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-mata.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-matlab.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-matlab.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-maxscript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-maxscript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-mel.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-mel.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-mermaid.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-mermaid.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-metafont.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-metafont.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-mizar.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-mizar.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-mongodb.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-mongodb.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-monkey.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-monkey.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-moonscript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-moonscript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-n1ql.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-n1ql.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-n4js.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-n4js.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-nand2tetris-hdl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-nand2tetris-hdl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-naniscript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-naniscript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-nasm.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-nasm.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-neon.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-neon.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-nevod.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-nevod.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-nginx.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-nginx.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-nim.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-nim.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-nix.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-nix.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-nsis.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-nsis.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-objectivec.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-objectivec.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ocaml.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ocaml.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-odin.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-odin.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-opencl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-opencl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-openqasm.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-openqasm.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-oz.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-oz.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-parigp.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-parigp.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-parser.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-parser.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-pascal.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-pascal.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-pascaligo.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-pascaligo.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-pcaxis.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-pcaxis.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-peoplecode.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-peoplecode.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-perl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-perl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-php-extras.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-php-extras.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-php.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-php.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-phpdoc.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-phpdoc.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-plant-uml.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-plant-uml.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-plsql.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-plsql.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-powerquery.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-powerquery.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-powershell.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-powershell.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-processing.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-processing.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-prolog.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-prolog.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-promql.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-promql.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-properties.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-properties.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-protobuf.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-protobuf.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-psl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-psl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-pug.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-pug.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-puppet.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-puppet.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-pure.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-pure.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-purebasic.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-purebasic.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-purescript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-purescript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-python.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-python.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-q.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-q.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-qml.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-qml.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-qore.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-qore.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-qsharp.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-qsharp.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-r.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-r.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-racket.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-racket.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-reason.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-reason.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-regex.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-regex.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-rego.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-rego.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-renpy.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-renpy.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-rescript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-rescript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-rest.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-rest.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-rip.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-rip.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-roboconf.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-roboconf.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-robotframework.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-robotframework.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ruby.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-ruby.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-rust.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-rust.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-sas.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-sas.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-sass.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-sass.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-scala.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-scala.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-scheme.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-scheme.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-scss.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-scss.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-shell-session.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-shell-session.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-smali.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-smali.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-smalltalk.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-smalltalk.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-smarty.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-smarty.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-sml.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-sml.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-solidity.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-solidity.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-solution-file.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-solution-file.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-soy.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-soy.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-sparql.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-sparql.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-splunk-spl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-splunk-spl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-sqf.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-sqf.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-sql.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-sql.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-squirrel.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-squirrel.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-stan.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-stan.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-stata.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-stata.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-stylus.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-stylus.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-supercollider.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-supercollider.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-swift.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-swift.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-systemd.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-systemd.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-t4-cs.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-t4-cs.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-t4-templating.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-t4-templating.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-t4-vb.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-t4-vb.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-tap.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-tap.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-tcl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-tcl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-textile.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-textile.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-toml.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-toml.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-tremor.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-tremor.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-tsx.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-tsx.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-tt2.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-tt2.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-turtle.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-turtle.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-twig.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-twig.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-typescript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-typescript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-typoscript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-typoscript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-unrealscript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-unrealscript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-uorazor.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-uorazor.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-uri.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-uri.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-v.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-v.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-vala.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-vala.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-vbnet.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-vbnet.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-velocity.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-velocity.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-verilog.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-verilog.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-vhdl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-vhdl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-vim.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-vim.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-visual-basic.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-visual-basic.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-warpscript.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-warpscript.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-wasm.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-wasm.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-web-idl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-web-idl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-wgsl.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-wgsl.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-wiki.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-wiki.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-wolfram.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-wolfram.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-wren.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-wren.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-xeora.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-xeora.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-xml-doc.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-xml-doc.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-xojo.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-xojo.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-xquery.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-xquery.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-yaml.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-yaml.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-yang.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-yang.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-zig.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/components/prism-zig.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/dependencies.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/package.json create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/autolinker/prism-autolinker.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/autolinker/prism-autolinker.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/autolinker/prism-autolinker.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/autolinker/prism-autolinker.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/autoloader/prism-autoloader.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/autoloader/prism-autoloader.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/command-line/prism-command-line.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/command-line/prism-command-line.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/command-line/prism-command-line.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/command-line/prism-command-line.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/custom-class/prism-custom-class.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/custom-class/prism-custom-class.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/data-uri-highlight/prism-data-uri-highlight.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/data-uri-highlight/prism-data-uri-highlight.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/diff-highlight/prism-diff-highlight.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/diff-highlight/prism-diff-highlight.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/diff-highlight/prism-diff-highlight.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/diff-highlight/prism-diff-highlight.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/download-button/prism-download-button.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/download-button/prism-download-button.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/file-highlight/prism-file-highlight.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/file-highlight/prism-file-highlight.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/filter-highlight-all/prism-filter-highlight-all.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/filter-highlight-all/prism-filter-highlight-all.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/highlight-keywords/prism-highlight-keywords.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/highlight-keywords/prism-highlight-keywords.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/inline-color/prism-inline-color.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/inline-color/prism-inline-color.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/inline-color/prism-inline-color.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/inline-color/prism-inline-color.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/jsonp-highlight/prism-jsonp-highlight.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/jsonp-highlight/prism-jsonp-highlight.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/keep-markup/prism-keep-markup.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/keep-markup/prism-keep-markup.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/line-highlight/prism-line-highlight.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/line-highlight/prism-line-highlight.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/line-highlight/prism-line-highlight.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/line-highlight/prism-line-highlight.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/line-numbers/prism-line-numbers.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/line-numbers/prism-line-numbers.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/line-numbers/prism-line-numbers.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/line-numbers/prism-line-numbers.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/match-braces/prism-match-braces.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/match-braces/prism-match-braces.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/match-braces/prism-match-braces.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/match-braces/prism-match-braces.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/normalize-whitespace/prism-normalize-whitespace.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/normalize-whitespace/prism-normalize-whitespace.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/previewers/prism-previewers.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/previewers/prism-previewers.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/previewers/prism-previewers.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/previewers/prism-previewers.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/remove-initial-line-feed/prism-remove-initial-line-feed.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/remove-initial-line-feed/prism-remove-initial-line-feed.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/show-invisibles/prism-show-invisibles.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/show-invisibles/prism-show-invisibles.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/show-invisibles/prism-show-invisibles.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/show-invisibles/prism-show-invisibles.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/show-language/prism-show-language.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/show-language/prism-show-language.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/toolbar/prism-toolbar.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/toolbar/prism-toolbar.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/toolbar/prism-toolbar.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/toolbar/prism-toolbar.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/treeview/prism-treeview.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/treeview/prism-treeview.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/treeview/prism-treeview.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/treeview/prism-treeview.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/unescaped-markup/prism-unescaped-markup.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/unescaped-markup/prism-unescaped-markup.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/unescaped-markup/prism-unescaped-markup.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/unescaped-markup/prism-unescaped-markup.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/wpd/prism-wpd.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/wpd/prism-wpd.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/wpd/prism-wpd.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/plugins/wpd/prism-wpd.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/prism.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism-coy.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism-coy.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism-dark.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism-dark.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism-funky.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism-funky.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism-okaidia.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism-okaidia.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism-solarizedlight.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism-solarizedlight.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism-tomorrow.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism-tomorrow.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism-twilight.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism-twilight.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/prismjs/themes/prism.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/slugify/slugify.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/star-rating-svg/css/star-rating-svg.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/star-rating-svg/js/jquery.star-rating-svg.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/tui-editor/toastui-editor-all.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/tui-editor/toastui-editor-plugin-code-syntax-highlight-all.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/tui-editor/toastui-editor-plugin-code-syntax-highlight.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/tui-editor/toastui-editor.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/uppy/README.md create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/uppy/uppy.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/uppy/uppy.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/uppy/uppy.js.map create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/uppy/uppy.min.css create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/uppy/uppy.min.js create mode 100644 apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/uppy/uppy.min.js.map diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/clipboard/clipboard.js b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/clipboard/clipboard.js new file mode 100644 index 00000000..aeb826f0 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/clipboard/clipboard.js @@ -0,0 +1,890 @@ +/*! + * clipboard.js v2.0.11 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["ClipboardJS"] = factory(); + else + root["ClipboardJS"] = factory(); +})(this, function() { +return /******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 686: +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "default": function() { return /* binding */ clipboard; } +}); + +// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js +var tiny_emitter = __webpack_require__(279); +var tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter); +// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js +var listen = __webpack_require__(370); +var listen_default = /*#__PURE__*/__webpack_require__.n(listen); +// EXTERNAL MODULE: ./node_modules/select/src/select.js +var src_select = __webpack_require__(817); +var select_default = /*#__PURE__*/__webpack_require__.n(src_select); +;// CONCATENATED MODULE: ./src/common/command.js +/** + * Executes a given operation type. + * @param {String} type + * @return {Boolean} + */ +function command(type) { + try { + return document.execCommand(type); + } catch (err) { + return false; + } +} +;// CONCATENATED MODULE: ./src/actions/cut.js + + +/** + * Cut action wrapper. + * @param {String|HTMLElement} target + * @return {String} + */ + +var ClipboardActionCut = function ClipboardActionCut(target) { + var selectedText = select_default()(target); + command('cut'); + return selectedText; +}; + +/* harmony default export */ var actions_cut = (ClipboardActionCut); +;// CONCATENATED MODULE: ./src/common/create-fake-element.js +/** + * Creates a fake textarea element with a value. + * @param {String} value + * @return {HTMLElement} + */ +function createFakeElement(value) { + var isRTL = document.documentElement.getAttribute('dir') === 'rtl'; + var fakeElement = document.createElement('textarea'); // Prevent zooming on iOS + + fakeElement.style.fontSize = '12pt'; // Reset box model + + fakeElement.style.border = '0'; + fakeElement.style.padding = '0'; + fakeElement.style.margin = '0'; // Move element out of screen horizontally + + fakeElement.style.position = 'absolute'; + fakeElement.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically + + var yPosition = window.pageYOffset || document.documentElement.scrollTop; + fakeElement.style.top = "".concat(yPosition, "px"); + fakeElement.setAttribute('readonly', ''); + fakeElement.value = value; + return fakeElement; +} +;// CONCATENATED MODULE: ./src/actions/copy.js + + + +/** + * Create fake copy action wrapper using a fake element. + * @param {String} target + * @param {Object} options + * @return {String} + */ + +var fakeCopyAction = function fakeCopyAction(value, options) { + var fakeElement = createFakeElement(value); + options.container.appendChild(fakeElement); + var selectedText = select_default()(fakeElement); + command('copy'); + fakeElement.remove(); + return selectedText; +}; +/** + * Copy action wrapper. + * @param {String|HTMLElement} target + * @param {Object} options + * @return {String} + */ + + +var ClipboardActionCopy = function ClipboardActionCopy(target) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { + container: document.body + }; + var selectedText = ''; + + if (typeof target === 'string') { + selectedText = fakeCopyAction(target, options); + } else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) { + // If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange + selectedText = fakeCopyAction(target.value, options); + } else { + selectedText = select_default()(target); + command('copy'); + } + + return selectedText; +}; + +/* harmony default export */ var actions_copy = (ClipboardActionCopy); +;// CONCATENATED MODULE: ./src/actions/default.js +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + + +/** + * Inner function which performs selection from either `text` or `target` + * properties and then executes copy or cut operations. + * @param {Object} options + */ + +var ClipboardActionDefault = function ClipboardActionDefault() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + // Defines base properties passed from constructor. + var _options$action = options.action, + action = _options$action === void 0 ? 'copy' : _options$action, + container = options.container, + target = options.target, + text = options.text; // Sets the `action` to be performed which can be either 'copy' or 'cut'. + + if (action !== 'copy' && action !== 'cut') { + throw new Error('Invalid "action" value, use either "copy" or "cut"'); + } // Sets the `target` property using an element that will be have its content copied. + + + if (target !== undefined) { + if (target && _typeof(target) === 'object' && target.nodeType === 1) { + if (action === 'copy' && target.hasAttribute('disabled')) { + throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute'); + } + + if (action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) { + throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes'); + } + } else { + throw new Error('Invalid "target" value, use a valid Element'); + } + } // Define selection strategy based on `text` property. + + + if (text) { + return actions_copy(text, { + container: container + }); + } // Defines which selection strategy based on `target` property. + + + if (target) { + return action === 'cut' ? actions_cut(target) : actions_copy(target, { + container: container + }); + } +}; + +/* harmony default export */ var actions_default = (ClipboardActionDefault); +;// CONCATENATED MODULE: ./src/clipboard.js +function clipboard_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { clipboard_typeof = function _typeof(obj) { return typeof obj; }; } else { clipboard_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return clipboard_typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (clipboard_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + + + + + + +/** + * Helper function to retrieve attribute value. + * @param {String} suffix + * @param {Element} element + */ + +function getAttributeValue(suffix, element) { + var attribute = "data-clipboard-".concat(suffix); + + if (!element.hasAttribute(attribute)) { + return; + } + + return element.getAttribute(attribute); +} +/** + * Base class which takes one or more elements, adds event listeners to them, + * and instantiates a new `ClipboardAction` on each click. + */ + + +var Clipboard = /*#__PURE__*/function (_Emitter) { + _inherits(Clipboard, _Emitter); + + var _super = _createSuper(Clipboard); + + /** + * @param {String|HTMLElement|HTMLCollection|NodeList} trigger + * @param {Object} options + */ + function Clipboard(trigger, options) { + var _this; + + _classCallCheck(this, Clipboard); + + _this = _super.call(this); + + _this.resolveOptions(options); + + _this.listenClick(trigger); + + return _this; + } + /** + * Defines if attributes would be resolved using internal setter functions + * or custom functions that were passed in the constructor. + * @param {Object} options + */ + + + _createClass(Clipboard, [{ + key: "resolveOptions", + value: function resolveOptions() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + this.action = typeof options.action === 'function' ? options.action : this.defaultAction; + this.target = typeof options.target === 'function' ? options.target : this.defaultTarget; + this.text = typeof options.text === 'function' ? options.text : this.defaultText; + this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body; + } + /** + * Adds a click event listener to the passed trigger. + * @param {String|HTMLElement|HTMLCollection|NodeList} trigger + */ + + }, { + key: "listenClick", + value: function listenClick(trigger) { + var _this2 = this; + + this.listener = listen_default()(trigger, 'click', function (e) { + return _this2.onClick(e); + }); + } + /** + * Defines a new `ClipboardAction` on each click event. + * @param {Event} e + */ + + }, { + key: "onClick", + value: function onClick(e) { + var trigger = e.delegateTarget || e.currentTarget; + var action = this.action(trigger) || 'copy'; + var text = actions_default({ + action: action, + container: this.container, + target: this.target(trigger), + text: this.text(trigger) + }); // Fires an event based on the copy operation result. + + this.emit(text ? 'success' : 'error', { + action: action, + text: text, + trigger: trigger, + clearSelection: function clearSelection() { + if (trigger) { + trigger.focus(); + } + + window.getSelection().removeAllRanges(); + } + }); + } + /** + * Default `action` lookup function. + * @param {Element} trigger + */ + + }, { + key: "defaultAction", + value: function defaultAction(trigger) { + return getAttributeValue('action', trigger); + } + /** + * Default `target` lookup function. + * @param {Element} trigger + */ + + }, { + key: "defaultTarget", + value: function defaultTarget(trigger) { + var selector = getAttributeValue('target', trigger); + + if (selector) { + return document.querySelector(selector); + } + } + /** + * Allow fire programmatically a copy action + * @param {String|HTMLElement} target + * @param {Object} options + * @returns Text copied. + */ + + }, { + key: "defaultText", + + /** + * Default `text` lookup function. + * @param {Element} trigger + */ + value: function defaultText(trigger) { + return getAttributeValue('text', trigger); + } + /** + * Destroy lifecycle. + */ + + }, { + key: "destroy", + value: function destroy() { + this.listener.destroy(); + } + }], [{ + key: "copy", + value: function copy(target) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { + container: document.body + }; + return actions_copy(target, options); + } + /** + * Allow fire programmatically a cut action + * @param {String|HTMLElement} target + * @returns Text cutted. + */ + + }, { + key: "cut", + value: function cut(target) { + return actions_cut(target); + } + /** + * Returns the support of the given action, or all actions if no action is + * given. + * @param {String} [action] + */ + + }, { + key: "isSupported", + value: function isSupported() { + var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut']; + var actions = typeof action === 'string' ? [action] : action; + var support = !!document.queryCommandSupported; + actions.forEach(function (action) { + support = support && !!document.queryCommandSupported(action); + }); + return support; + } + }]); + + return Clipboard; +}((tiny_emitter_default())); + +/* harmony default export */ var clipboard = (Clipboard); + +/***/ }), + +/***/ 828: +/***/ (function(module) { + +var DOCUMENT_NODE_TYPE = 9; + +/** + * A polyfill for Element.matches() + */ +if (typeof Element !== 'undefined' && !Element.prototype.matches) { + var proto = Element.prototype; + + proto.matches = proto.matchesSelector || + proto.mozMatchesSelector || + proto.msMatchesSelector || + proto.oMatchesSelector || + proto.webkitMatchesSelector; +} + +/** + * Finds the closest parent that matches a selector. + * + * @param {Element} element + * @param {String} selector + * @return {Function} + */ +function closest (element, selector) { + while (element && element.nodeType !== DOCUMENT_NODE_TYPE) { + if (typeof element.matches === 'function' && + element.matches(selector)) { + return element; + } + element = element.parentNode; + } +} + +module.exports = closest; + + +/***/ }), + +/***/ 438: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var closest = __webpack_require__(828); + +/** + * Delegates event to a selector. + * + * @param {Element} element + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @param {Boolean} useCapture + * @return {Object} + */ +function _delegate(element, selector, type, callback, useCapture) { + var listenerFn = listener.apply(this, arguments); + + element.addEventListener(type, listenerFn, useCapture); + + return { + destroy: function() { + element.removeEventListener(type, listenerFn, useCapture); + } + } +} + +/** + * Delegates event to a selector. + * + * @param {Element|String|Array} [elements] + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @param {Boolean} useCapture + * @return {Object} + */ +function delegate(elements, selector, type, callback, useCapture) { + // Handle the regular Element usage + if (typeof elements.addEventListener === 'function') { + return _delegate.apply(null, arguments); + } + + // Handle Element-less usage, it defaults to global delegation + if (typeof type === 'function') { + // Use `document` as the first parameter, then apply arguments + // This is a short way to .unshift `arguments` without running into deoptimizations + return _delegate.bind(null, document).apply(null, arguments); + } + + // Handle Selector-based usage + if (typeof elements === 'string') { + elements = document.querySelectorAll(elements); + } + + // Handle Array-like based usage + return Array.prototype.map.call(elements, function (element) { + return _delegate(element, selector, type, callback, useCapture); + }); +} + +/** + * Finds closest match and invokes callback. + * + * @param {Element} element + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @return {Function} + */ +function listener(element, selector, type, callback) { + return function(e) { + e.delegateTarget = closest(e.target, selector); + + if (e.delegateTarget) { + callback.call(element, e); + } + } +} + +module.exports = delegate; + + +/***/ }), + +/***/ 879: +/***/ (function(__unused_webpack_module, exports) { + +/** + * Check if argument is a HTML element. + * + * @param {Object} value + * @return {Boolean} + */ +exports.node = function(value) { + return value !== undefined + && value instanceof HTMLElement + && value.nodeType === 1; +}; + +/** + * Check if argument is a list of HTML elements. + * + * @param {Object} value + * @return {Boolean} + */ +exports.nodeList = function(value) { + var type = Object.prototype.toString.call(value); + + return value !== undefined + && (type === '[object NodeList]' || type === '[object HTMLCollection]') + && ('length' in value) + && (value.length === 0 || exports.node(value[0])); +}; + +/** + * Check if argument is a string. + * + * @param {Object} value + * @return {Boolean} + */ +exports.string = function(value) { + return typeof value === 'string' + || value instanceof String; +}; + +/** + * Check if argument is a function. + * + * @param {Object} value + * @return {Boolean} + */ +exports.fn = function(value) { + var type = Object.prototype.toString.call(value); + + return type === '[object Function]'; +}; + + +/***/ }), + +/***/ 370: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var is = __webpack_require__(879); +var delegate = __webpack_require__(438); + +/** + * Validates all params and calls the right + * listener function based on its target type. + * + * @param {String|HTMLElement|HTMLCollection|NodeList} target + * @param {String} type + * @param {Function} callback + * @return {Object} + */ +function listen(target, type, callback) { + if (!target && !type && !callback) { + throw new Error('Missing required arguments'); + } + + if (!is.string(type)) { + throw new TypeError('Second argument must be a String'); + } + + if (!is.fn(callback)) { + throw new TypeError('Third argument must be a Function'); + } + + if (is.node(target)) { + return listenNode(target, type, callback); + } + else if (is.nodeList(target)) { + return listenNodeList(target, type, callback); + } + else if (is.string(target)) { + return listenSelector(target, type, callback); + } + else { + throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList'); + } +} + +/** + * Adds an event listener to a HTML element + * and returns a remove listener function. + * + * @param {HTMLElement} node + * @param {String} type + * @param {Function} callback + * @return {Object} + */ +function listenNode(node, type, callback) { + node.addEventListener(type, callback); + + return { + destroy: function() { + node.removeEventListener(type, callback); + } + } +} + +/** + * Add an event listener to a list of HTML elements + * and returns a remove listener function. + * + * @param {NodeList|HTMLCollection} nodeList + * @param {String} type + * @param {Function} callback + * @return {Object} + */ +function listenNodeList(nodeList, type, callback) { + Array.prototype.forEach.call(nodeList, function(node) { + node.addEventListener(type, callback); + }); + + return { + destroy: function() { + Array.prototype.forEach.call(nodeList, function(node) { + node.removeEventListener(type, callback); + }); + } + } +} + +/** + * Add an event listener to a selector + * and returns a remove listener function. + * + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @return {Object} + */ +function listenSelector(selector, type, callback) { + return delegate(document.body, selector, type, callback); +} + +module.exports = listen; + + +/***/ }), + +/***/ 817: +/***/ (function(module) { + +function select(element) { + var selectedText; + + if (element.nodeName === 'SELECT') { + element.focus(); + + selectedText = element.value; + } + else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') { + var isReadOnly = element.hasAttribute('readonly'); + + if (!isReadOnly) { + element.setAttribute('readonly', ''); + } + + element.select(); + element.setSelectionRange(0, element.value.length); + + if (!isReadOnly) { + element.removeAttribute('readonly'); + } + + selectedText = element.value; + } + else { + if (element.hasAttribute('contenteditable')) { + element.focus(); + } + + var selection = window.getSelection(); + var range = document.createRange(); + + range.selectNodeContents(element); + selection.removeAllRanges(); + selection.addRange(range); + + selectedText = selection.toString(); + } + + return selectedText; +} + +module.exports = select; + + +/***/ }), + +/***/ 279: +/***/ (function(module) { + +function E () { + // Keep this empty so it's easier to inherit from + // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3) +} + +E.prototype = { + on: function (name, callback, ctx) { + var e = this.e || (this.e = {}); + + (e[name] || (e[name] = [])).push({ + fn: callback, + ctx: ctx + }); + + return this; + }, + + once: function (name, callback, ctx) { + var self = this; + function listener () { + self.off(name, listener); + callback.apply(ctx, arguments); + }; + + listener._ = callback + return this.on(name, listener, ctx); + }, + + emit: function (name) { + var data = [].slice.call(arguments, 1); + var evtArr = ((this.e || (this.e = {}))[name] || []).slice(); + var i = 0; + var len = evtArr.length; + + for (i; i < len; i++) { + evtArr[i].fn.apply(evtArr[i].ctx, data); + } + + return this; + }, + + off: function (name, callback) { + var e = this.e || (this.e = {}); + var evts = e[name]; + var liveEvents = []; + + if (evts && callback) { + for (var i = 0, len = evts.length; i < len; i++) { + if (evts[i].fn !== callback && evts[i].fn._ !== callback) + liveEvents.push(evts[i]); + } + } + + // Remove event from queue to prevent memory leak + // Suggested by https://github.com/lazd + // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910 + + (liveEvents.length) + ? e[name] = liveEvents + : delete e[name]; + + return this; + } +}; + +module.exports = E; +module.exports.TinyEmitter = E; + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ if(__webpack_module_cache__[moduleId]) { +/******/ return __webpack_module_cache__[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ !function() { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function() { return module['default']; } : +/******/ function() { return module; }; +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ !function() { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = function(exports, definition) { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ !function() { +/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } +/******/ }(); +/******/ +/************************************************************************/ +/******/ // module exports must be returned from runtime so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ return __webpack_require__(686); +/******/ })() +.default; +}); \ No newline at end of file diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/clipboard/clipboard.min.js b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/clipboard/clipboard.min.js new file mode 100644 index 00000000..1103f811 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/clipboard/clipboard.min.js @@ -0,0 +1,7 @@ +/*! + * clipboard.js v2.0.11 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return b}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),r=n.n(e);function c(t){try{return document.execCommand(t)}catch(t){return}}var a=function(t){t=r()(t);return c("cut"),t};function o(t,e){var n,o,t=(n=t,o="rtl"===document.documentElement.getAttribute("dir"),(t=document.createElement("textarea")).style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[o?"right":"left"]="-9999px",o=window.pageYOffset||document.documentElement.scrollTop,t.style.top="".concat(o,"px"),t.setAttribute("readonly",""),t.value=n,t);return e.container.appendChild(t),e=r()(t),c("copy"),t.remove(),e}var f=function(t){var e=1/g,">")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return w(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||w(i))return i}function o(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return r.forEach(function(e){for(n in e)t[n]=e[n]}),t}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset"}function u(e){s+=""}function c(e){("start"===e.event?o:u)(e.node)}for(var l=0,s="",f=[];e.length||r.length;){var g=i();if(s+=n(a.substring(l,g[0].offset)),l=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===l);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return s+n(a.substr(l))}function l(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(n){return o(e,{v:null},n)})),e.cached_variants||e.eW&&[o(e)]||[e]}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var o={},u=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");o[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?u("keyword",a.k):x(a.k).forEach(function(e){u(e,a.k[e])}),a.k=o}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]),a.c=Array.prototype.concat.apply([],a.c.map(function(e){return l("self"===e?a:e)})),a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var c=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=c.length?t(c.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function l(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function p(e,n,t,r){var a=r?"":I.classPrefix,i='',i+n+o}function h(){var e,t,r,a;if(!E.k)return n(k);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(k);r;)a+=n(k.substring(t,r.index)),e=l(E,r),e?(B+=e[1],a+=p(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(k);return a+n(k.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!y[E.sL])return n(k);var t=e?f(E.sL,k,!0,x[E.sL]):g(k,E.sL.length?E.sL:void 0);return E.r>0&&(B+=t.r),e&&(x[E.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){L+=null!=E.sL?d():h(),k=""}function v(e){L+=e.cN?p(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(k+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?k+=n:(t.eB&&(k+=n),b(),t.rB||t.eB||(k=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?k+=n:(a.rE||a.eE||(k+=n),b(),a.eE&&(k=n));do E.cN&&(L+=C),E.skip||(B+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"")+'"');return k+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var R,E=i||N,x={},L="";for(R=E;R!==N;R=R.parent)R.cN&&(L=p(R.cN,"",!0)+L);var k="",B=0;try{for(var M,j,O=0;;){if(E.t.lastIndex=O,M=E.t.exec(t),!M)break;j=m(t.substring(O,M.index),M[0]),O=M.index+j}for(m(t.substr(O)),R=E;R.parent;R=R.parent)R.cN&&(L+=C);return{r:B,value:L,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function g(e,t){t=t||I.languages||x(y);var r={r:0,value:n(e)},a=r;return t.filter(w).forEach(function(n){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function p(e){return I.tabReplace||I.useBR?e.replace(M,function(e,n){return I.useBR&&"\n"===e?"
":I.tabReplace?n.replace(/\t/g,I.tabReplace):""}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function d(e){var n,t,r,o,l,s=i(e);a(s)||(I.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):n=e,l=n.textContent,r=s?f(s,l,!0):g(l),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),l)),r.value=p(r.value),e.innerHTML=r.value,e.className=h(e.className,s,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function b(e){I=o(I,e)}function v(){if(!v.called){v.called=!0;var e=document.querySelectorAll("pre code");E.forEach.call(e,d)}}function m(){addEventListener("DOMContentLoaded",v,!1),addEventListener("load",v,!1)}function N(n,t){var r=y[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function R(){return x(y)}function w(e){return e=(e||"").toLowerCase(),y[e]||y[L[e]]}var E=[],x=Object.keys,y={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="
",I={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};return e.highlight=f,e.highlightAuto=g,e.fixMarkup=p,e.highlightBlock=d,e.configure=b,e.initHighlighting=v,e.initHighlightingOnLoad=m,e.registerLanguage=N,e.listLanguages=R,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("xml",function(s){var e="[A-Za-z0-9\\._:-]+",t={eW:!0,i:/`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"|$)",e:">",k:{name:"style"},c:[t],starts:{e:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"|$)",e:">",k:{name:"script"},c:[t],starts:{e:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},t]}]}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}});hljs.registerLanguage("javascript",function(e){var r="[A-Za-z$_][0-9A-Za-z$_]*",t={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:t,c:[]},c={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,c,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:t,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,c,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:r+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:r,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+r+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:r},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,c:s}]}]},{b://,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:r}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("powershell",function(e){var t={b:"`[\\s\\S]",r:0},o={cN:"variable",v:[{b:/\$[\w\d][\w\d_:]*/}]},r={cN:"literal",b:/\$(null|true|false)\b/},n={cN:"string",v:[{b:/"/,e:/"/},{b:/@"/,e:/^"@/}],c:[t,o,{cN:"variable",b:/\$[A-z]/,e:/[^A-z]/}]},a={cN:"string",v:[{b:/'/,e:/'/},{b:/@'/,e:/^'@/}]},i={cN:"doctag",v:[{b:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{b:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]},s=e.inherit(e.C(null,null),{v:[{b:/#/,e:/$/},{b:/<#/,e:/#>/}],c:[i]});return{aliases:["ps"],l:/-?[A-z\.\-]+/,cI:!0,k:{keyword:"if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch",built_in:"Add-Computer Add-Content Add-History Add-JobTrigger Add-Member Add-PSSnapin Add-Type Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Host Clear-Item Clear-ItemProperty Clear-Variable Compare-Object Complete-Transaction Connect-PSSession Connect-WSMan Convert-Path ConvertFrom-Csv ConvertFrom-Json ConvertFrom-SecureString ConvertFrom-StringData ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-SecureString ConvertTo-Xml Copy-Item Copy-ItemProperty Debug-Process Disable-ComputerRestore Disable-JobTrigger Disable-PSBreakpoint Disable-PSRemoting Disable-PSSessionConfiguration Disable-WSManCredSSP Disconnect-PSSession Disconnect-WSMan Disable-ScheduledJob Enable-ComputerRestore Enable-JobTrigger Enable-PSBreakpoint Enable-PSRemoting Enable-PSSessionConfiguration Enable-ScheduledJob Enable-WSManCredSSP Enter-PSSession Exit-PSSession Export-Alias Export-Clixml Export-Console Export-Counter Export-Csv Export-FormatData Export-ModuleMember Export-PSSession ForEach-Object Format-Custom Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-ComputerRestorePoint Get-Content Get-ControlPanelItem Get-Counter Get-Credential Get-Culture Get-Date Get-Event Get-EventLog Get-EventSubscriber Get-ExecutionPolicy Get-FormatData Get-Host Get-HotFix Get-Help Get-History Get-IseSnippet Get-Item Get-ItemProperty Get-Job Get-JobTrigger Get-Location Get-Member Get-Module Get-PfxCertificate Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDrive Get-PSProvider Get-PSSession Get-PSSessionConfiguration Get-PSSnapin Get-Random Get-ScheduledJob Get-ScheduledJobOption Get-Service Get-TraceSource Get-Transaction Get-TypeData Get-UICulture Get-Unique Get-Variable Get-Verb Get-WinEvent Get-WmiObject Get-WSManCredSSP Get-WSManInstance Group-Object Import-Alias Import-Clixml Import-Counter Import-Csv Import-IseSnippet Import-LocalizedData Import-PSSession Import-Module Invoke-AsWorkflow Invoke-Command Invoke-Expression Invoke-History Invoke-Item Invoke-RestMethod Invoke-WebRequest Invoke-WmiMethod Invoke-WSManAction Join-Path Limit-EventLog Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-Event New-EventLog New-IseSnippet New-Item New-ItemProperty New-JobTrigger New-Object New-Module New-ModuleManifest New-PSDrive New-PSSession New-PSSessionConfigurationFile New-PSSessionOption New-PSTransportOption New-PSWorkflowExecutionOption New-PSWorkflowSession New-ScheduledJobOption New-Service New-TimeSpan New-Variable New-WebServiceProxy New-WinEvent New-WSManInstance New-WSManSessionOption Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-String Pop-Location Push-Location Read-Host Receive-Job Register-EngineEvent Register-ObjectEvent Register-PSSessionConfiguration Register-ScheduledJob Register-WmiEvent Remove-Computer Remove-Event Remove-EventLog Remove-Item Remove-ItemProperty Remove-Job Remove-JobTrigger Remove-Module Remove-PSBreakpoint Remove-PSDrive Remove-PSSession Remove-PSSnapin Remove-TypeData Remove-Variable Remove-WmiObject Remove-WSManInstance Rename-Computer Rename-Item Rename-ItemProperty Reset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-Service Restore-Computer Resume-Job Resume-Service Save-Help Select-Object Select-String Select-Xml Send-MailMessage Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-JobTrigger Set-Location Set-PSBreakpoint Set-PSDebug Set-PSSessionConfiguration Set-ScheduledJob Set-ScheduledJobOption Set-Service Set-StrictMode Set-TraceSource Set-Variable Set-WmiInstance Set-WSManInstance Set-WSManQuickConfig Show-Command Show-ControlPanelItem Show-EventLog Sort-Object Split-Path Start-Job Start-Process Start-Service Start-Sleep Start-Transaction Start-Transcript Stop-Computer Stop-Job Stop-Process Stop-Service Stop-Transcript Suspend-Job Suspend-Service Tee-Object Test-ComputerSecureChannel Test-Connection Test-ModuleManifest Test-Path Test-PSSessionConfigurationFile Trace-Command Unblock-File Undo-Transaction Unregister-Event Unregister-PSSessionConfiguration Unregister-ScheduledJob Update-FormatData Update-Help Update-List Update-TypeData Use-Transaction Wait-Event Wait-Job Wait-Process Where-Object Write-Debug Write-Error Write-EventLog Write-Host Write-Output Write-Progress Write-Verbose Write-Warning Add-MDTPersistentDrive Disable-MDTMonitorService Enable-MDTMonitorService Get-MDTDeploymentShareStatistics Get-MDTMonitorData Get-MDTOperatingSystemCatalog Get-MDTPersistentDrive Import-MDTApplication Import-MDTDriver Import-MDTOperatingSystem Import-MDTPackage Import-MDTTaskSequence New-MDTDatabase Remove-MDTMonitorData Remove-MDTPersistentDrive Restore-MDTPersistentDrive Set-MDTMonitorData Test-MDTDeploymentShare Test-MDTMonitorData Update-MDTDatabaseSchema Update-MDTDeploymentShare Update-MDTLinkedDS Update-MDTMedia Update-MDTMedia Add-VamtProductKey Export-VamtData Find-VamtManagedMachine Get-VamtConfirmationId Get-VamtProduct Get-VamtProductKey Import-VamtData Initialize-VamtData Install-VamtConfirmationId Install-VamtProductActivation Install-VamtProductKey Update-VamtProduct",nomarkup:"-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace"},c:[t,e.NM,n,a,r,o,s]}});hljs.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/={3,}/,e:/$/},{b:/^\-{3}/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+{3}/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}});hljs.registerLanguage("java",function(e){var a="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",t=a+"(<"+a+"(\\s*,\\s*"+a+")*>)?",r="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",s="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",c={cN:"number",b:s,r:0};return{aliases:["jsp"],k:r,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+t+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:r,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:r,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},c,{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("vbnet",function(e){return{aliases:["vb"],cI:!0,k:{keyword:"addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},i:"//|{|}|endif|gosub|variant|wend",c:[e.inherit(e.QSM,{c:[{b:'""'}]}),e.C("'","$",{rB:!0,c:[{cN:"doctag",b:"'''|",c:[e.PWM]},{cN:"doctag",b:"",c:[e.PWM]}]}),e.CNM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elseif end region externalsource"}}]}});hljs.registerLanguage("cs",function(e){var i={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long nameof object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},t={cN:"string",b:'@"',e:'"',c:[{b:'""'}]},r=e.inherit(t,{i:/\n/}),a={cN:"subst",b:"{",e:"}",k:i},c=e.inherit(a,{i:/\n/}),n={cN:"string",b:/\$"/,e:'"',i:/\n/,c:[{b:"{{"},{b:"}}"},e.BE,c]},s={cN:"string",b:/\$@"/,e:'"',c:[{b:"{{"},{b:"}}"},{b:'""'},a]},o=e.inherit(s,{i:/\n/,c:[{b:"{{"},{b:"}}"},{b:'""'},c]});a.c=[s,n,t,e.ASM,e.QSM,e.CNM,e.CBCM],c.c=[o,n,r,e.ASM,e.QSM,e.CNM,e.inherit(e.CBCM,{i:/\n/})];var l={v:[s,n,t,e.ASM,e.QSM]},b=e.IR+"(<"+e.IR+"(\\s*,\\s*"+e.IR+")*>)?(\\[\\])?";return{aliases:["csharp"],k:i,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:""},{b:""}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},l,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{cN:"meta",b:"^\\s*\\[",eB:!0,e:"\\]",eE:!0,c:[{cN:"meta-string",b:/"/,e:/"/}]},{bK:"new return throw await else",r:0},{cN:"function",b:"("+b+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:i,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:i,r:0,c:[l,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("go",function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],k:t,i:"{}*#]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",e:/;/,eW:!0,l:/[\w\.]+/,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage("vbscript",function(e){return{aliases:["vbs"],cI:!0,k:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:"lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",literal:"true false null nothing empty"},i:"//",c:[e.inherit(e.QSM,{c:[{b:'""'}]}),e.C(/'/,/$/,{r:0}),e.CNM]}});hljs.registerLanguage("vbscript-html",function(r){return{sL:"xml",c:[{b:"<%",e:"%>",sL:"vbscript"}]}});hljs.registerLanguage("fsharp",function(e){var t={b:"<",e:">",c:[e.inherit(e.TM,{b:/'[a-zA-Z0-9_]+/})]};return{aliases:["fs"],k:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",i:/\/\*/,c:[{cN:"keyword",b:/\b(yield|return|let|do)!/},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},{cN:"string",b:'"""',e:'"""'},e.C("\\(\\*","\\*\\)"),{cN:"class",bK:"type",e:"\\(|=|$",eE:!0,c:[e.UTM,t]},{cN:"meta",b:"\\[<",e:">\\]",r:10},{cN:"symbol",b:"\\B('[A-Za-z])\\b",c:[e.BE]},e.CLCM,e.inherit(e.QSM,{i:null}),e.CNM]}});hljs.registerLanguage("less",function(e){var r="[\\w-]+",t="("+r+"|@{"+r+"})",a=[],c=[],s=function(e){return{cN:"string",b:"~?"+e+".*?"+e}},b=function(e,r,t){return{cN:e,b:r,r:t}},n={b:"\\(",e:"\\)",c:c,r:0};c.push(e.CLCM,e.CBCM,s("'"),s('"'),e.CSSNM,{b:"(url|data-uri)\\(",starts:{cN:"string",e:"[\\)\\n]",eE:!0}},b("number","#[0-9A-Fa-f]+\\b"),n,b("variable","@@?"+r,10),b("variable","@{"+r+"}"),b("built_in","~?`[^`]*?`"),{cN:"attribute",b:r+"\\s*:",e:":",rB:!0,eE:!0},{cN:"meta",b:"!important"});var i=c.concat({b:"{",e:"}",c:a}),o={bK:"when",eW:!0,c:[{bK:"and not"}].concat(c)},u={b:t+"\\s*:",rB:!0,e:"[;}]",r:0,c:[{cN:"attribute",b:t,e:":",eE:!0,starts:{eW:!0,i:"[<=$]",r:0,c:c}}]},l={cN:"keyword",b:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{e:"[;{}]",rE:!0,c:c,r:0}},C={cN:"variable",v:[{b:"@"+r+"\\s*:",r:15},{b:"@"+r}],starts:{e:"[;}]",rE:!0,c:i}},p={v:[{b:"[\\.#:&\\[>]",e:"[;{}]"},{b:t,e:"{"}],rB:!0,rE:!0,i:"[<='$\"]",r:0,c:[e.CLCM,e.CBCM,o,b("keyword","all\\b"),b("variable","@{"+r+"}"),b("selector-tag",t+"%?",0),b("selector-id","#"+t),b("selector-class","\\."+t,0),b("selector-tag","&",0),{cN:"selector-attr",b:"\\[",e:"\\]"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"\\(",e:"\\)",c:i},{b:"!important"}]};return a.push(e.CLCM,e.CBCM,l,C,u,p),{cI:!0,i:"[=>'/<($\"]",c:a}});hljs.registerLanguage("dos",function(e){var r=e.C(/^\s*@?rem\b/,/$/,{r:10}),t={cN:"symbol",b:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)",r:0};return{aliases:["bat","cmd"],cI:!0,i:/\/\*/,k:{keyword:"if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq",built_in:"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux shift cd dir echo setlocal endlocal set pause copy append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color comp compact convert date dir diskcomp diskcopy doskey erase fs find findstr format ftype graftabl help keyb label md mkdir mode more move path pause print popd pushd promt rd recover rem rename replace restore rmdir shiftsort start subst time title tree type ver verify vol ping net ipconfig taskkill xcopy ren del"},c:[{cN:"variable",b:/%%[^ ]|%[^ ]+?%|![^ ]+?!/},{cN:"function",b:t.b,e:"goto:eof",c:[e.inherit(e.TM,{b:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),r]},{cN:"number",b:"\\b\\d+",r:0},r]}});hljs.registerLanguage("python",function(e){var r={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},b={cN:"meta",b:/^(>>>|\.\.\.) /},c={cN:"subst",b:/\{/,e:/\}/,k:r,i:/#/},a={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[b],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[b],r:10},{b:/(fr|rf|f)'''/,e:/'''/,c:[b,c]},{b:/(fr|rf|f)"""/,e:/"""/,c:[b,c]},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},{b:/(fr|rf|f)'/,e:/'/,c:[c]},{b:/(fr|rf|f)"/,e:/"/,c:[c]},e.ASM,e.QSM]},s={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},i={cN:"params",b:/\(/,e:/\)/,c:["self",b,s,a]};return c.c=[a,s,b],{aliases:["py","gyp"],k:r,i:/(<\/|->|\?)|=>/,c:[b,s,a,e.HCM,{v:[{cN:"function",bK:"def"},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,i,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/},{b:/\(/,e:/\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",i:/:/,c:[{cN:"keyword",b:/\w+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:c,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}});hljs.registerLanguage("cpp",function(t){var e={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[{b:'(u8?|U)?L?"',e:'"',i:"\\n",c:[t.BE]},{b:'(u8?|U)?R"',e:'"',c:[t.BE]},{b:"'\\\\?.",e:"'",i:"."}]},s={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},i={cN:"meta",b:/#\s*[a-z]+\b/,e:/$/,k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},c:[{b:/\\\n/,r:0},t.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:/<[^\n>]*>/,e:/$/,i:"\\n"},t.CLCM,t.CBCM]},a=t.IR+"\\s*\\(",c={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and or not",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},n=[e,t.CLCM,t.CBCM,s,r];return{aliases:["c","cc","h","c++","h++","hpp"],k:c,i:"",k:c,c:["self",e]},{b:t.IR+"::",k:c},{v:[{b:/=/,e:/;/},{b:/\(/,e:/\)/},{bK:"new throw return else",e:/;/}],k:c,c:n.concat([{b:/\(/,e:/\)/,k:c,c:n.concat(["self"]),r:0}]),r:0},{cN:"function",b:"("+t.IR+"[\\*&\\s]+)+"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\w\s\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,s,e]},t.CLCM,t.CBCM,i]},{cN:"class",bK:"class struct",e:/[{;:]/,c:[{b://,c:["self"]},t.TM]}]),exports:{preprocessor:i,strings:r,k:c}}});hljs.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}}); \ No newline at end of file diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/agate.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/agate.css new file mode 100644 index 00000000..8d64547c --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/agate.css @@ -0,0 +1,108 @@ +/*! + * Agate by Taufik Nurrohman + * ---------------------------------------------------- + * + * #ade5fc + * #a2fca2 + * #c6b4f0 + * #d36363 + * #fcc28c + * #fc9b9b + * #ffa + * #fff + * #333 + * #62c8f3 + * #888 + * + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #333; + color: white; +} + +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-code, +.hljs-emphasis { + font-style: italic; +} + +.hljs-tag { + color: #62c8f3; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-selector-id, +.hljs-selector-class { + color: #ade5fc; +} + +.hljs-string, +.hljs-bullet { + color: #a2fca2; +} + +.hljs-type, +.hljs-title, +.hljs-section, +.hljs-attribute, +.hljs-quote, +.hljs-built_in, +.hljs-builtin-name { + color: #ffa; +} + +.hljs-number, +.hljs-symbol, +.hljs-bullet { + color: #d36363; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal { + color: #fcc28c; +} + +.hljs-comment, +.hljs-deletion, +.hljs-code { + color: #888; +} + +.hljs-regexp, +.hljs-link { + color: #c6b4f0; +} + +.hljs-meta { + color: #fc9b9b; +} + +.hljs-deletion { + background-color: #fc9b9b; + color: #333; +} + +.hljs-addition { + background-color: #a2fca2; + color: #333; +} + +.hljs a { + color: inherit; +} + +.hljs a:focus, +.hljs a:hover { + color: inherit; + text-decoration: underline; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/androidstudio.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/androidstudio.css new file mode 100644 index 00000000..bc8e473b --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/androidstudio.css @@ -0,0 +1,66 @@ +/* +Date: 24 Fev 2015 +Author: Pedro Oliveira +*/ + +.hljs { + color: #a9b7c6; + background: #282b2e; + display: block; + overflow-x: auto; + padding: 0.5em; +} + +.hljs-number, +.hljs-literal, +.hljs-symbol, +.hljs-bullet { + color: #6897BB; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-deletion { + color: #cc7832; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-link { + color: #629755; +} + +.hljs-comment, +.hljs-quote { + color: #808080; +} + +.hljs-meta { + color: #bbb529; +} + +.hljs-string, +.hljs-attribute, +.hljs-addition { + color: #6A8759; +} + +.hljs-section, +.hljs-title, +.hljs-type { + color: #ffc66d; +} + +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #e8bf6a; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/arduino-light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/arduino-light.css new file mode 100644 index 00000000..4b8b7fd3 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/arduino-light.css @@ -0,0 +1,88 @@ +/* + +Arduino® Light Theme - Stefania Mellai + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #FFFFFF; +} + +.hljs, +.hljs-subst { + color: #434f54; +} + +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-doctag, +.hljs-name { + color: #00979D; +} + +.hljs-built_in, +.hljs-literal, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #D35400; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #00979D; +} + +.hljs-type, +.hljs-string, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #005C5F; +} + +.hljs-title, +.hljs-section { + color: #880000; + font-weight: bold; +} + +.hljs-comment { + color: rgba(149,165,166,.8); +} + +.hljs-meta-keyword { + color: #728E00; +} + +.hljs-meta { + color: #728E00; + color: #434f54; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-function { + color: #728E00; +} + +.hljs-number { + color: #8A7B52; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/arta.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/arta.css new file mode 100644 index 00000000..75ef3a9e --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/arta.css @@ -0,0 +1,73 @@ +/* +Date: 17.V.2011 +Author: pumbur +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #222; +} + +.hljs, +.hljs-subst { + color: #aaa; +} + +.hljs-section { + color: #fff; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta { + color: #444; +} + +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-regexp { + color: #ffcc33; +} + +.hljs-number, +.hljs-addition { + color: #00cc66; +} + +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-template-variable, +.hljs-attribute, +.hljs-link { + color: #32aaee; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #6644aa; +} + +.hljs-title, +.hljs-variable, +.hljs-deletion, +.hljs-template-tag { + color: #bb1166; +} + +.hljs-section, +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/ascetic.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/ascetic.css new file mode 100644 index 00000000..48397e88 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/ascetic.css @@ -0,0 +1,45 @@ +/* + +Original style from softwaremaniacs.org (c) Ivan Sagalaev + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: white; + color: black; +} + +.hljs-string, +.hljs-variable, +.hljs-template-variable, +.hljs-symbol, +.hljs-bullet, +.hljs-section, +.hljs-addition, +.hljs-attribute, +.hljs-link { + color: #888; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta, +.hljs-deletion { + color: #ccc; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-name, +.hljs-type, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-cave-dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-cave-dark.css new file mode 100644 index 00000000..65428f3b --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-cave-dark.css @@ -0,0 +1,83 @@ +/* Base16 Atelier Cave Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Cave Comment */ +.hljs-comment, +.hljs-quote { + color: #7e7887; +} + +/* Atelier-Cave Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-regexp, +.hljs-link, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #be4678; +} + +/* Atelier-Cave Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #aa573c; +} + +/* Atelier-Cave Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #2a9292; +} + +/* Atelier-Cave Blue */ +.hljs-title, +.hljs-section { + color: #576ddb; +} + +/* Atelier-Cave Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #955ae7; +} + +.hljs-deletion, +.hljs-addition { + color: #19171c; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #be4678; +} + +.hljs-addition { + background-color: #2a9292; +} + +.hljs { + display: block; + overflow-x: auto; + background: #19171c; + color: #8b8792; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-cave-light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-cave-light.css new file mode 100644 index 00000000..b419f9fd --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-cave-light.css @@ -0,0 +1,85 @@ +/* Base16 Atelier Cave Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Cave Comment */ +.hljs-comment, +.hljs-quote { + color: #655f6d; +} + +/* Atelier-Cave Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #be4678; +} + +/* Atelier-Cave Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #aa573c; +} + +/* Atelier-Cave Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #2a9292; +} + +/* Atelier-Cave Blue */ +.hljs-title, +.hljs-section { + color: #576ddb; +} + +/* Atelier-Cave Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #955ae7; +} + +.hljs-deletion, +.hljs-addition { + color: #19171c; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #be4678; +} + +.hljs-addition { + background-color: #2a9292; +} + +.hljs { + display: block; + overflow-x: auto; + background: #efecf4; + color: #585260; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-dune-dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-dune-dark.css new file mode 100644 index 00000000..1684f522 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-dune-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Dune Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Dune Comment */ +.hljs-comment, +.hljs-quote { + color: #999580; +} + +/* Atelier-Dune Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d73737; +} + +/* Atelier-Dune Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b65611; +} + +/* Atelier-Dune Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #60ac39; +} + +/* Atelier-Dune Blue */ +.hljs-title, +.hljs-section { + color: #6684e1; +} + +/* Atelier-Dune Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b854d4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #20201d; + color: #a6a28c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-dune-light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-dune-light.css new file mode 100644 index 00000000..547719de --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-dune-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Dune Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Dune Comment */ +.hljs-comment, +.hljs-quote { + color: #7d7a68; +} + +/* Atelier-Dune Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d73737; +} + +/* Atelier-Dune Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b65611; +} + +/* Atelier-Dune Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #60ac39; +} + +/* Atelier-Dune Blue */ +.hljs-title, +.hljs-section { + color: #6684e1; +} + +/* Atelier-Dune Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b854d4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #fefbec; + color: #6e6b5e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-estuary-dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-estuary-dark.css new file mode 100644 index 00000000..a5e50718 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-estuary-dark.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Estuary Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Estuary Comment */ +.hljs-comment, +.hljs-quote { + color: #878573; +} + +/* Atelier-Estuary Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ba6236; +} + +/* Atelier-Estuary Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #ae7313; +} + +/* Atelier-Estuary Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7d9726; +} + +/* Atelier-Estuary Blue */ +.hljs-title, +.hljs-section { + color: #36a166; +} + +/* Atelier-Estuary Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #5f9182; +} + +.hljs-deletion, +.hljs-addition { + color: #22221b; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ba6236; +} + +.hljs-addition { + background-color: #7d9726; +} + +.hljs { + display: block; + overflow-x: auto; + background: #22221b; + color: #929181; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-estuary-light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-estuary-light.css new file mode 100644 index 00000000..1daee5d9 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-estuary-light.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Estuary Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Estuary Comment */ +.hljs-comment, +.hljs-quote { + color: #6c6b5a; +} + +/* Atelier-Estuary Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ba6236; +} + +/* Atelier-Estuary Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #ae7313; +} + +/* Atelier-Estuary Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7d9726; +} + +/* Atelier-Estuary Blue */ +.hljs-title, +.hljs-section { + color: #36a166; +} + +/* Atelier-Estuary Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #5f9182; +} + +.hljs-deletion, +.hljs-addition { + color: #22221b; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ba6236; +} + +.hljs-addition { + background-color: #7d9726; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f4f3ec; + color: #5f5e4e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-forest-dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-forest-dark.css new file mode 100644 index 00000000..0ef4fae3 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-forest-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Forest Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Forest Comment */ +.hljs-comment, +.hljs-quote { + color: #9c9491; +} + +/* Atelier-Forest Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #f22c40; +} + +/* Atelier-Forest Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #df5320; +} + +/* Atelier-Forest Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7b9726; +} + +/* Atelier-Forest Blue */ +.hljs-title, +.hljs-section { + color: #407ee7; +} + +/* Atelier-Forest Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6666ea; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1b1918; + color: #a8a19f; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-forest-light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-forest-light.css new file mode 100644 index 00000000..bbedde18 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-forest-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Forest Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Forest Comment */ +.hljs-comment, +.hljs-quote { + color: #766e6b; +} + +/* Atelier-Forest Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #f22c40; +} + +/* Atelier-Forest Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #df5320; +} + +/* Atelier-Forest Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7b9726; +} + +/* Atelier-Forest Blue */ +.hljs-title, +.hljs-section { + color: #407ee7; +} + +/* Atelier-Forest Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6666ea; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f1efee; + color: #68615e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-heath-dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-heath-dark.css new file mode 100644 index 00000000..fe01ff72 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-heath-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Heath Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Heath Comment */ +.hljs-comment, +.hljs-quote { + color: #9e8f9e; +} + +/* Atelier-Heath Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca402b; +} + +/* Atelier-Heath Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #a65926; +} + +/* Atelier-Heath Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #918b3b; +} + +/* Atelier-Heath Blue */ +.hljs-title, +.hljs-section { + color: #516aec; +} + +/* Atelier-Heath Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #7b59c0; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1b181b; + color: #ab9bab; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-heath-light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-heath-light.css new file mode 100644 index 00000000..ee43786d --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-heath-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Heath Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Heath Comment */ +.hljs-comment, +.hljs-quote { + color: #776977; +} + +/* Atelier-Heath Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca402b; +} + +/* Atelier-Heath Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #a65926; +} + +/* Atelier-Heath Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #918b3b; +} + +/* Atelier-Heath Blue */ +.hljs-title, +.hljs-section { + color: #516aec; +} + +/* Atelier-Heath Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #7b59c0; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f7f3f7; + color: #695d69; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-lakeside-dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-lakeside-dark.css new file mode 100644 index 00000000..a937d3bf --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-lakeside-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Lakeside Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Lakeside Comment */ +.hljs-comment, +.hljs-quote { + color: #7195a8; +} + +/* Atelier-Lakeside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d22d72; +} + +/* Atelier-Lakeside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #935c25; +} + +/* Atelier-Lakeside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #568c3b; +} + +/* Atelier-Lakeside Blue */ +.hljs-title, +.hljs-section { + color: #257fad; +} + +/* Atelier-Lakeside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6b6bb8; +} + +.hljs { + display: block; + overflow-x: auto; + background: #161b1d; + color: #7ea2b4; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-lakeside-light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-lakeside-light.css new file mode 100644 index 00000000..6c7e8f9e --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-lakeside-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Lakeside Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Lakeside Comment */ +.hljs-comment, +.hljs-quote { + color: #5a7b8c; +} + +/* Atelier-Lakeside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d22d72; +} + +/* Atelier-Lakeside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #935c25; +} + +/* Atelier-Lakeside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #568c3b; +} + +/* Atelier-Lakeside Blue */ +.hljs-title, +.hljs-section { + color: #257fad; +} + +/* Atelier-Lakeside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6b6bb8; +} + +.hljs { + display: block; + overflow-x: auto; + background: #ebf8ff; + color: #516d7b; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-plateau-dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-plateau-dark.css new file mode 100644 index 00000000..3bb05269 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-plateau-dark.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Plateau Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Plateau Comment */ +.hljs-comment, +.hljs-quote { + color: #7e7777; +} + +/* Atelier-Plateau Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca4949; +} + +/* Atelier-Plateau Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b45a3c; +} + +/* Atelier-Plateau Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #4b8b8b; +} + +/* Atelier-Plateau Blue */ +.hljs-title, +.hljs-section { + color: #7272ca; +} + +/* Atelier-Plateau Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #8464c4; +} + +.hljs-deletion, +.hljs-addition { + color: #1b1818; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ca4949; +} + +.hljs-addition { + background-color: #4b8b8b; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1b1818; + color: #8a8585; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-plateau-light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-plateau-light.css new file mode 100644 index 00000000..5f0222be --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-plateau-light.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Plateau Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Plateau Comment */ +.hljs-comment, +.hljs-quote { + color: #655d5d; +} + +/* Atelier-Plateau Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca4949; +} + +/* Atelier-Plateau Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b45a3c; +} + +/* Atelier-Plateau Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #4b8b8b; +} + +/* Atelier-Plateau Blue */ +.hljs-title, +.hljs-section { + color: #7272ca; +} + +/* Atelier-Plateau Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #8464c4; +} + +.hljs-deletion, +.hljs-addition { + color: #1b1818; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ca4949; +} + +.hljs-addition { + background-color: #4b8b8b; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f4ecec; + color: #585050; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-savanna-dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-savanna-dark.css new file mode 100644 index 00000000..38f83143 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-savanna-dark.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Savanna Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Savanna Comment */ +.hljs-comment, +.hljs-quote { + color: #78877d; +} + +/* Atelier-Savanna Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #b16139; +} + +/* Atelier-Savanna Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #9f713c; +} + +/* Atelier-Savanna Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #489963; +} + +/* Atelier-Savanna Blue */ +.hljs-title, +.hljs-section { + color: #478c90; +} + +/* Atelier-Savanna Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #55859b; +} + +.hljs-deletion, +.hljs-addition { + color: #171c19; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #b16139; +} + +.hljs-addition { + background-color: #489963; +} + +.hljs { + display: block; + overflow-x: auto; + background: #171c19; + color: #87928a; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-savanna-light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-savanna-light.css new file mode 100644 index 00000000..1ccd7c68 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-savanna-light.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Savanna Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Savanna Comment */ +.hljs-comment, +.hljs-quote { + color: #5f6d64; +} + +/* Atelier-Savanna Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #b16139; +} + +/* Atelier-Savanna Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #9f713c; +} + +/* Atelier-Savanna Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #489963; +} + +/* Atelier-Savanna Blue */ +.hljs-title, +.hljs-section { + color: #478c90; +} + +/* Atelier-Savanna Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #55859b; +} + +.hljs-deletion, +.hljs-addition { + color: #171c19; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #b16139; +} + +.hljs-addition { + background-color: #489963; +} + +.hljs { + display: block; + overflow-x: auto; + background: #ecf4ee; + color: #526057; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-seaside-dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-seaside-dark.css new file mode 100644 index 00000000..df29949c --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-seaside-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Seaside Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Seaside Comment */ +.hljs-comment, +.hljs-quote { + color: #809980; +} + +/* Atelier-Seaside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #e6193c; +} + +/* Atelier-Seaside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #87711d; +} + +/* Atelier-Seaside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #29a329; +} + +/* Atelier-Seaside Blue */ +.hljs-title, +.hljs-section { + color: #3d62f5; +} + +/* Atelier-Seaside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #ad2bee; +} + +.hljs { + display: block; + overflow-x: auto; + background: #131513; + color: #8ca68c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-seaside-light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-seaside-light.css new file mode 100644 index 00000000..9d960f29 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-seaside-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Seaside Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Seaside Comment */ +.hljs-comment, +.hljs-quote { + color: #687d68; +} + +/* Atelier-Seaside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #e6193c; +} + +/* Atelier-Seaside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #87711d; +} + +/* Atelier-Seaside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #29a329; +} + +/* Atelier-Seaside Blue */ +.hljs-title, +.hljs-section { + color: #3d62f5; +} + +/* Atelier-Seaside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #ad2bee; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f4fbf4; + color: #5e6e5e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-sulphurpool-dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-sulphurpool-dark.css new file mode 100644 index 00000000..c2ab7938 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-sulphurpool-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Sulphurpool Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Sulphurpool Comment */ +.hljs-comment, +.hljs-quote { + color: #898ea4; +} + +/* Atelier-Sulphurpool Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #c94922; +} + +/* Atelier-Sulphurpool Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #c76b29; +} + +/* Atelier-Sulphurpool Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #ac9739; +} + +/* Atelier-Sulphurpool Blue */ +.hljs-title, +.hljs-section { + color: #3d8fd1; +} + +/* Atelier-Sulphurpool Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6679cc; +} + +.hljs { + display: block; + overflow-x: auto; + background: #202746; + color: #979db4; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-sulphurpool-light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-sulphurpool-light.css new file mode 100644 index 00000000..96c47d08 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atelier-sulphurpool-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Sulphurpool Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Sulphurpool Comment */ +.hljs-comment, +.hljs-quote { + color: #6b7394; +} + +/* Atelier-Sulphurpool Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #c94922; +} + +/* Atelier-Sulphurpool Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #c76b29; +} + +/* Atelier-Sulphurpool Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #ac9739; +} + +/* Atelier-Sulphurpool Blue */ +.hljs-title, +.hljs-section { + color: #3d8fd1; +} + +/* Atelier-Sulphurpool Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6679cc; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f5f7ff; + color: #5e6687; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atom-one-dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atom-one-dark.css new file mode 100644 index 00000000..1616aafe --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atom-one-dark.css @@ -0,0 +1,96 @@ +/* + +Atom One Dark by Daniel Gamage +Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax + +base: #282c34 +mono-1: #abb2bf +mono-2: #818896 +mono-3: #5c6370 +hue-1: #56b6c2 +hue-2: #61aeee +hue-3: #c678dd +hue-4: #98c379 +hue-5: #e06c75 +hue-5-2: #be5046 +hue-6: #d19a66 +hue-6-2: #e6c07b + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #abb2bf; + background: #282c34; +} + +.hljs-comment, +.hljs-quote { + color: #5c6370; + font-style: italic; +} + +.hljs-doctag, +.hljs-keyword, +.hljs-formula { + color: #c678dd; +} + +.hljs-section, +.hljs-name, +.hljs-selector-tag, +.hljs-deletion, +.hljs-subst { + color: #e06c75; +} + +.hljs-literal { + color: #56b6c2; +} + +.hljs-string, +.hljs-regexp, +.hljs-addition, +.hljs-attribute, +.hljs-meta-string { + color: #98c379; +} + +.hljs-built_in, +.hljs-class .hljs-title { + color: #e6c07b; +} + +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-type, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-number { + color: #d19a66; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-meta, +.hljs-selector-id, +.hljs-title { + color: #61aeee; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link { + text-decoration: underline; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atom-one-light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atom-one-light.css new file mode 100644 index 00000000..d5bd1d2a --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/atom-one-light.css @@ -0,0 +1,96 @@ +/* + +Atom One Light by Daniel Gamage +Original One Light Syntax theme from https://github.com/atom/one-light-syntax + +base: #fafafa +mono-1: #383a42 +mono-2: #686b77 +mono-3: #a0a1a7 +hue-1: #0184bb +hue-2: #4078f2 +hue-3: #a626a4 +hue-4: #50a14f +hue-5: #e45649 +hue-5-2: #c91243 +hue-6: #986801 +hue-6-2: #c18401 + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #383a42; + background: #fafafa; +} + +.hljs-comment, +.hljs-quote { + color: #a0a1a7; + font-style: italic; +} + +.hljs-doctag, +.hljs-keyword, +.hljs-formula { + color: #a626a4; +} + +.hljs-section, +.hljs-name, +.hljs-selector-tag, +.hljs-deletion, +.hljs-subst { + color: #e45649; +} + +.hljs-literal { + color: #0184bb; +} + +.hljs-string, +.hljs-regexp, +.hljs-addition, +.hljs-attribute, +.hljs-meta-string { + color: #50a14f; +} + +.hljs-built_in, +.hljs-class .hljs-title { + color: #c18401; +} + +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-type, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-number { + color: #986801; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-meta, +.hljs-selector-id, +.hljs-title { + color: #4078f2; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link { + text-decoration: underline; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/brown-paper.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/brown-paper.css new file mode 100644 index 00000000..f0197b92 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/brown-paper.css @@ -0,0 +1,64 @@ +/* + +Brown Paper style from goldblog.com.ua (c) Zaripov Yura + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background:#b7a68e url(./brown-papersq.png); +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal { + color:#005599; + font-weight:bold; +} + +.hljs, +.hljs-subst { + color: #363c69; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable, +.hljs-link, +.hljs-name { + color: #2c009f; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta, +.hljs-deletion { + color: #802022; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/brown-papersq.png b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/brown-papersq.png new file mode 100644 index 0000000000000000000000000000000000000000..3813903dbf9fa7b1fb5bd11d9534c06667d9056f GIT binary patch literal 18198 zcmZsCRajhYlWil7yGw9LaCaw2kl^kP!M%at?m>cka0u>ctf6s&e8CzTLSrGMaSIUS zWM7q;>fa~s$OpT> zFLY-GO$7j;Wl{{7eE9cF?XPU&ukYpLA870A2vBhFvU6lq^RRVx)N{0T2=eQ4J41(5=2G+8;)w1ZEPMkbF2bGnazV|OLZz2Hb@=WyXBX0)f+0o;fWze0N{t<*y ztIiNnZC{LRA&k!$ZY8RSSkRr34SfzyO1FQ1#+`5DKBGKIaW*#IpS|)H)0b)RO)vVT zdmZs``V5~Rd=7^niGNRi-KohFdl7;cLNt=6H%jET$<@@a?HPC}DI+UeV-R$j(|Cgb zovyEp&h`&JS~h*u+dsTgScW2zDVr4f~DH;Zx@cQhlKiyzUik!{j?26_bcGl3n zz;xi(8ENgs!;6LMT9?9^)|SgIm+Xu<9pAn@Jwvr@j|kU$Ps<;yJK|Ptilz{)cF~50 z>3}X}-GE2L$gd5vToUcA;ufTe+vCmq6y;EHLIF1Y)!*mMIk7Ufz`-6@{%j+0t}5by-kjAimHgt*AfoWQ3<}2%HH1G)X=gxwsGTnqo!jS zPp^mHU)Wdo9i$J93f_cGL~o081HVh2MIfFb&r#24&zMhy4-B`@-M4wqKeV5e3rOCk zzfxnXb=ed%7QxZsGFZ!Bk=ojIqXM0lz`=t&N`(ieb`uT$vaWG--x!ps=kokELG7^v z+{LRR;H>H{+#Sy9)~}T-X{s*WDIF9ko?!YOUrBL6c1UTt%|c-C%-R`h{*D&-?xTv6%U;Fy)q@zD7n;Mm&VTYo!f>`4|^@IrUrWqi<2` zIK=%8Y>k7_cJFc62Fm1dsu5V%^D!kOF(oA;3duw z%pO09{DvbtIv+U1{6MQ8Wq|e~4(8RFaZSiu$ z|CJ~BTvRLdM64V`xYr`XpzSoka%-H{0)Ro-jT6+} zT18|CY&T<`K}73~WMQMkzj<-{e`EjOV2Ch(n321C+#16;>MjIhblly|M?Br0UERMA z8yIvk9sVuv0~h)1=S{wY{&V6fDi@0c8|@S!>h`gR_^u~(f!y=uu=3o8U2>$VV-mwV zeJKl8K*mz%0O$3!XmmqEd#rW!>oY?U<|?CBsX=UMCSrinA}B9GA5MTUzn%ILQD=}Q z^-qc}to5D!{UYEBFfSF{7{}5#I2`7!9Xcs|{e!rTVYvNetFc@43N$#e!DM_Y#5_4V z3P*)qJyw97IJGZYj53iEQKK~Zk6QE|wnDAQ6e%ci7WM9yX{3Voy>2v7-{dW*|+Zvy7%^(o^DMc&%_Tp}4@Jo%0Bs7ObY$K2QS=1v19slY*WwV!8B05I;*7gc| zC}iWT!ocL=zoXCa-*EVkQZPGoFVou4>|(ng{&T`5ns(d;`0IWRE4$3aCE zX={pif)xfKL2J&CwL-rbsVhFX~Ast|24AzGCb$6bP zzjP96&p17?0`zA}Cr(1{- zBWmAc^Tih%c@PSpJD39Rtvbpc27|&`W}18q&trP3z4xp%4^t5T!T})zWON*!hQ+0C zGnKXI-(t5+$xcN_*!vy^Ebcn(`}3GQ=EjrR)jEu#)a!Qo+uU^L6Sf!vtQo@-)YCH_ zIkq!}#RQ?#H9Na)c>fA?i%F=AwN>+%6IHG_6~07@;tNMw)pj-py?fm5OAkUXC)Brp z)eG?cTAV-ODy=aRrlcS^!0S!95GOO@_zy6Yr~oZODHiWB(rYDHVW+oP+iSHanvW_2 zD+33#kuvw;P&BQf8OM-`63t1%h)cdnm8}>fIrS=425~>gpk!*nOPF^FRJ!}0{NO(e z1ANE&sU_mPMS;Pw9^8F*v5!k1Dr?=^%?eWij0f~to7y`V{K(<#9fgxsh1qZ}irc;t zApc;fE}TBG^?-(ZYfC3hk)rzA9||a50&`5$fOMODInB^CQQz-%|FVW(Me6cd&RQ!Em*`8(cOiTV*}I0^ zkh9#bz+b`^Achh+t!T{E%m*7Spr8X*#NFvrNeQKR9N#NYImXo$orFW}S#|kp!g) zC|mslRtj z{<(wk5heSmNTLQPjVu+tu`Ax0<Jp<3;sv=x5%C^te-lbQRUIA>ktvMAj}|$FYU$Qp}=T~;pv%9btR=dxklUy zkR9E*9e)3CPHhghYGI4o&yB<6Ek^@&s6_$^hHm%y;$mG#6s2Gj@yUh|7NNvbZ*-CiW>(`$PB*?kxl)}lSZKB^Wx?u%oy%PiU;Ucb|V z|JbtHI`e>wDu43V9mbmTz-O*hsj=x3p@_52uHWdv$KHWXIJ?hAN_O+SE^)}7#rG|6 z_BKM`Ghwpm2fNaI-XM&&0MIfLw+nk~2$Q9!(m1H({sIm*PjV$tD(vHzF8J^I z$5d)V3#P=#{X0~lkvdz*hO?2|P39$67m%BB>cJ;P&i?e>f6oD0A_x(fXnlhN8_iy~ z=8_i6_?scR{Q@F{<_+s`6F0?)4q>Y!TZURG@z1Xg(XF|Uq<7M}+x3!5CKzKPU%EBw zWsc%dMB{e=rbNFynyQz;$Wk>xdNDkRB!r}hPlheoBDRi4NdE0U68C8T=FwmB)E|du zu(3Ry^ER}qt8o=s^t;)ka7?Rw9BkK-AbMm!5YyN{n8j%4(FS=#^NXNFzOKvDh-fh_ ztrMuN#+;}%O*fdC_O-zikI?cL4FkQFbMJ&%;LsLdp2pU1z81byeDrcnfVfSPjd&Tx z0uTNCRa&zYgwCK{AP>=r8Sx{G=0I#zQ4SAF*CLY5@Ge_3>$_ebR&z8QuoP^G_nMbA zR!J5=NfW+bA;6g4yh|56J$}zRiUEt*T!NqU4MM$Ik(YO5ElC z3I>TTR5(&RS-e$~mJ610i3Tb|O!%oihx2Dou=SDi zY8QGbi&iMst0x9N)(Qw|m<=v9=H$h=d9q7_RC$8&xiTCpO(nAT)09jNd*kDz)xA=d zA>mDJMEO}wm=z8%##p8Epux^Z?6*hT+bBf^Yw~9wh1mOBI2*B_&;n6YqN$_sLi+`r zN+}oUEH%!)UEZO0kGwoV{fV0125Liy{XQRjOG;ll15xL$5w(ynu*BE#Y!uUbJlqhC z*)p9Akd=!p3VXT;Mo_Zvej_{xJkq)x&0<&B)@Utjud|co5aPb~dM)3OKXKmRzZ}RD zt~hR#D>70m`e$6d9RY-q2@W6QANld%IvZ*VmwpbdVCzWDJ`&UO%hC*(c9AJ; z8qe|b;=knC|ZRghL9-j+JpIpBjS zLIz{G#rkZ%K&UOs1pgA;bi1JjfXryT;9AV*AdF1(P;A$V^MMS0X10gTzoNjJBTB;U z#kJ5|QkG?|zHY}$^ddtj_$wAkIcd;Wk|&B6^`fnOL3uIPj@Z+b!gftAC_YE@sh~EY z@awBver>U-j(pBMf%*W;OI?#3J3yRO&^PqFHW`#yr|%#0rDM+^ZV zw!IXpiDk0Qo5iL_mNZlA`+m>mgyn-Z9( z1VK4OJry2Iq?o90-NhDNVAP3Niev{MJh~PQ7M5U9?Ob1#H}q=Dgn%~Ng=3b;7jX>n zADv=?=pgaOIN2G2JCr_(7k0YF#OlE0c}by4_|pb-iJ-CYzLbWwHs2A)ZY;uuYwbQMUa1ed5)1G+DXr$;MC*sQ-N@4$xD327+bTrT^ z?kmr?X}=Lu2xf7X5|gkw#k>FEC139#QtL*Y>C)kvvqB=d;fVQ8{+;RhP-)is9rX&jj-Ik zT00%|O4wv`6`(M(&W*hs2A z?qIa9QPvO>*ssTM+$((GcA1>?(C1jm10t6@Dy(k%HtIN+5d!Bk;~J%32ZhcKu$-i2gOM1Ek)Av0js<&PBErK4 zp0BqauJ^Yy7bnHdyGOO!FbWP*qG)O@I>y%wAIOX9eD)7R>ow6xlYRy-h|ZmQaLshv zm7r7H)>I5~>_i>NDSv6k)mCwZu$9K6)JGn#ni#>O5}3aMrYt7e67}_&zNlt_@b&$n z)VO|sK6qnt57(FA0!{d&$}h!DdNgOgYMn=8${CJ>S2YIAe zYh9atd77_K6soYC+WALnJL7SxqnE#(+1G`m^0I56gta@e+L0z>IRG+?>DS@Oe-NlQ z-mQ)F{=7b($L)X@jB5Ot*D*>ceMR8793ItK-tTO`iAnNm-xzYn0#;&=gXJYz8KmnUBrL#cb@ELwnkp?O zZZ{8tSRklRk}8Ts29G>v-&z?qob#qYSe!ek zt^r`X2W(J?(qxhOf%h#^?8D`^&MPbuUE9s z$80u<1iU&&+mQB<4bZeyBaOB}$!d@`^f4+iXS3;h>rXP~*FRrr)Wki^(q)&EwAMt?71xOWwtXa8UsY(_;C*7d*d9Z z-#(@Mu>`+6lrEC|=E^q^u&A=e+P9|#`hdP0Rg9`gUbNqm@!-Gg-V6vL;!*U<4ZtIa zv@cWy_^m4cV=F@sv3lCwx|?r%lb?NGQobaW&#Mi<9dngpq({-uy?xwAR&#MBUtybddE z1Ka>|_TRpK@#mBE#M;ka;RDR*2pXmP#YHG|5qh#YgXDUPD*cs3)>>Co@wnbArjo;_^QGnuQGdUSqu6AMPxBHbW99c9gHFZ*u&-M5cS}n@d z@wWUbV?X7y#NTCaqV_t*)w+Vzpte?L^08$=xiju5lCZ4~#~@34qa{rJM!{y~Tqe5H z-`N}U;ZKj9jnYas%EXCD=*$|XC$h{m@?;&T(uT--QOR_H^PcjyAP~pc&dS&v#J%KN zK|)APC-pnC;EKdibKx8O+Pqef? zY3J^)uf~;VDge4m$gh`Aj{?OYnES!Tftm1kjZwLB-5soBf8q9RaPk~e{SqHq+Gh(R z<}KbtcWaoIC!do+k`h}5s~QzJ&#Ro?TzU_eO^xAgvNoX&oKS7|-8Lm;%2@BRKwb9H4rRICqXPIQLdOMGtG>0(Kh}5xDzW z<`R5ub7|^ov6hX(i^R_d6ZdLQ5t}vu@?2|ueBl^W!CoR=LZ1Urel(cC{`jK##xJ5Z zW6m&PFV^e{7~mrz4!xy@n!O%C(vIRG0g>FrE1t+=n3;z9D!vWHCUjqMi*QAc4!hId zk9MAo2%jf}g*lzYPM7_RYQxo3rJR%jUCd5FoBmmSn@QTM@?QERM*E-uEb}GD!7+W4 z;ucS;Fa1*ZgF9U&8>R&|tjy3FH;93-Kpof^^nCm9kp4U+SFqwi@6}>$jo4)7x?L*p z5eHsG=We;aDoq*x+H6v7x39;dP<1mgK0fQuG+#L+=2<$z#m5Z5 zCEto{j1wIIxQ(7>!yi2iRgQS~c_6N5JHqo=$`q=PD?Y@90#727stD}1n!C~qy z1q^LAqT}jq4r2TFIf&-|vYu|DXI}0>^}2ev5jUXZCM+ZOWL>l4t}d2Pur%y+XM$j(Cc126Ww7ST~4S;g=2q8j3!|OoWynEtKkuUjZ>k za%azP+sS^P^KJ=|`TAdnlNkRHqn@0nFWdFeMoI4-_sH22UA`hq_xA?B;_u;ixDrx%9ajWMqLgzfYCofw8KF`gO zWh92d@!_T((;rc7)Y0;~o3^0R^ALS8opgP}hX%hpsuO^eo@L^`#d1RJD{m2kN6wGw z5T;|y=;jNZl}W2j;Bc$yGn_%Ti(Jtk4%` zDK5cCl`%fdh(p%F! zN4;@Huf@ukLx1k|0(qt;@&Xiw=4#8cVPcfFDX~atn}9jl7(Tz#p-Q|4F%ywo(jlv# z%qISsaHlw>1|(CS*2KqRSCP8NF(6NfJ>HP|lV`v4llSyqeD!0%X_1> zg{vvN5D0m~n!O3#;}}s;n>z%iE0e^EX_%IQaWRp4yx4LOzqV3T+W(;k{udVh!#EJ} zgnXu%H1P~HO=bwcbt57%T)u4QT05g9BA!O6PoHP#DPg-80&W|M33F=n@!{4j6>-=9 zl9KJP6S3H+U>;T?}#WA z_O%upq*IdOTe9b~q#{Y}07vk515LC)Il|+Aa$f}Tcr-&vQOIH)UZ$6& z36g&<+>7?MFwXUe`uwpa`gVyIwLJn~p1QK-H&X5vGa};Wdy^Q_m|$Lgl*a(g9EO{h z##w%7(g(SjboyvXP~vP72(|N1)ZI{XNa-&bPjF54D`q-}^mUm=DGk7I_a#t~zNU)> zJD=vyGTVi2y}*&qMByXD3Tn-Wj|5S#f( z1uWJ`3RnO6rh+Yy?c=B~PUJ?nV_{w6l7FulT#(2M_~r)HsCX+L?$5L39mEvBSU`8$ zYq&EhHXoxg(J-om_c-fe@=~3q#OG#^kYLhMnV)y;ZF6Gqz_mr2P zugbL0xc8{kyxRcLC?m)K&Yj$%)>_B@og|1@e~QPf=dh!p2dBQAtX$a~q4}AI9ArA; za(4@-P0mv5dlML~u;DO#U*_mx8yZv31rn3O5F4pLW;#xXKA<~u3@cMIw&h)_VR
G3S-EN>9CM!{YB*|;6wg-K3V?)eR((z#1 zHyX+Us~H@9)~!8`K-#ZDU>v8HpiaQ|@=VU5MgT@ehzQ(1nZ!M0ZDk{Fb`>pCb0vQE z`gX@ZK}6S!(-($v3w8-+L6Xs~;@WTrR}q42gH9p2ncZYDab8*`#p8jbS&H9$DTx{1 z|8L)r+}X3oIp6b9dN^fZsl0TpRK4NW^TVGZOit8~r*qM+QL3pd7G0|~C`PHxw2PM3 z->n8iEh)LU)Je%r7nEt|D%&F&(={XI*19z_HKI38aE6Cfm-buU7W|=mo3gMA57~g` z7aBx4OS&(O5w@W;2pO@ZVyG;2^F+2cYshx%M2*M@%;(4quYc}>z1WX(9ccb&>8#{j zE=VlFg+&2-xsr%AY_}ciz4+<$^}2TO2e)byPmJl?+aOU7{UVx$=ZNQDTQLxsh}+(_ zak-NBw`v4=+Ydp_L=w^J1&NT$-AbEUuj%8LN7nJzt^APyl$(ght>;(o{)xCqf8IX6 zq`a-CyPq$UOPJN(oo>$gX?v65Y$GnIq7Fq?=??};kY4#Na69k#iG|Wd|{Tt z&uFLgaDQ4)`{9^3rX|Bg zNY8N2w1??HVsq#}Xk&RcmoQBacog;CZ%I-HU?7dT+nZRo?h7BQd5Yrv%sI0rPF^Sk^9@l-_4``bwK!A z5Ud{#8B%fMPHat04G9kj%j5>0maQK}jQTzGC!2<9FicZ-#V^ZaC)A?QK9EelA!nP) z+Z2DqYAqTsfZ9k1CW9+h;Uao59}OnJ9>r}xs&nHlM5^Y58T*TkM80zn8=UE2e8u{j zpH(Cv<_IWBdh<6_f1={d7#R|wGLcIoegMU>82VZLrcn;{FuCmF59Tpu7qQ5TEj5`AFXQxx{XS6|0N# z3g?J^0RDM8_l@3M4G0f^O03>$S#_it3cdG%7HWo_Xb-<{a&XHHzW`(2t54<~-m{AO)J~7AhPI zbkz9A9Eq!7aijhY%^=rG`j6?w^hb13^_LKf!X*}jaV$GaXvsies~+H0T#v%OcveHN zw6t*A@XdVfqJIPsPwPO4;>%M4C+{dTVU{cOk`3puW6b36K2&z%>btSk&&H>Z;<`p> z`FMTMiHw&wOXcQ$-Y{pG@3aN}s_>;# zeQ6GDsqIMA?iz{B1XzIIegeu-#qL_ZBH|eh`L{~J(A{bH*vND8W}io(WZ9s;;m3qZ zElXp!ru)Ht+yJJ|dfvRtcX?~Pn_nW{zZbM5z3mB?Hbf_|+7ZC-9yVjR&7mnNul4vE z%KEK*b1~tReV{kNh2E=&iwgU8w0kYs3c1o6m;*fZfrF-g?1!~+<-`f!Dj8+i7NJUI zcZj}vt?|8iHQ3TdM;gn(X(Vidn!cd{^x{>dX&Vt^`^_3pu?t)#>x|K0cW=egSMl9#+mqq-8|RdMP1Dw zx^5}L#|i6)ERW8LBjm}wD6@3$`!cXl0aV*W>(xz)J2m+v|RNGEXIA%XWv z$Hx$v!@W5LfaU7iEY}no2e;*F&dh{F;<$?``JyH&l3RVjA{xC=Rq{ z6}dLQKK(BW4N!Y)Mzd3h)PX8L3OR6JX82vsk%|<`y{3G<99ycR8(ZD;4@=k|d zx1nPOrARPmMi86c#Qn^1g5RVk00)%LY3fdvDm`_|D|ZP>a4hmnJmTiqc40*eItZ0G z(Cfxe`6oWB{4L&V2-lf)Dz{MkXQ(A{E}?e1cWU;s-J?xBbGBUgebeTI{+k+LT|P=A z;GHDn*981}=hBJAGXPX?iXEu)RoZN2kKn)}Yp)=+)%`(=Hk2z^Csu^a+hNSE9<}O4 zW9BhF843QW<{+N^4NZ(+Ohu0L$qp9AhpJ?UbX8~fibx(>f3CRh|ZH~FPW;%L4 z2Jfb`#^2zr=0rNvM5{6`q6x-M;QJ8B$W1lwJwBT6OTa+L|E?*68NnD-d zqirI@#!DTk6=nvBq1t|F2a57+*JomCoPO&bkNHd&fq@7CoA#=ogI@ER;^g6MTjnNJpU8$17lkcby!fn#Y^cf59qs4;WjW9@I`pu+^=!$XvlzSp zHl-BP6qCLifc*pwQ8vDfUY0lgjC>>zTLL$6VLQBKH2U4M(&?%A718nspPj%tmUBw+ z#X>LH_#p;`9!I5vv6@cVh1b)~bHTXz;!@s>4omWjec#A;((g=Fq_p{u1|<#I-D{h1 zr%{sZ%zv+3T?)s{c78c|r6Ez1kf5OuRJ<^!_`!;|HxG;mZiSf=CdVqy^)Fpf= zR6<3YrraF!c1|tIJ#;9sg<)`+=a+cw8*6)$-yV3w_=*W`MB#~zjz6^LYX4eVoTxdI zc3h_Bc-v+z^z5>e3vEp)brfA?bQ>r1^-8x`-ATBNL)99$& z;rXG-!IBn08OxyuZoj`hcQ)a@7O5;d=o7$6_hSTJ z;(^Dr%6p+QhE473G62?L^T{&S2^UB8^~fFHE0@wP^b_T#h%rn7^=(?yQf+N!)<~#c zB&mh#W%khdZrGJgs@ixb%h?ad2HG&$G8+QXR6zbUk;$(r4F#>F^1>Br!mAfDkRR@D z!K|#|oQjAh)DlY~3|CG`+4@opGIM z^i^Z4rXu>d*NVXngpKKI2U_*K}S3_}=T|7q^w`XB` z2D5mfvT(`vMwh8DGJql?=LI15;DsNI&n^nhYwgI&-{a#V-{;<=cJWiZ5HEkDY(4jD zc2?xCALMIz@)_iwDG(vRJQ8kP7xC8|N5n z-mb8AOpEdA->ZPnh_c<&o3Jg+X;AwynF(`1Ihpp9xt|hy zu7!?dLSahdVg=JpZk#xq{L7i0Y3(N`w+}g zn}vYJKK$VH`HhCBK)g%Cw8flu&$)8+Ef5m{+5}|bRYsP&t~Jk0TLEENO=yT3nrvyfYKk*n#uYjkyI9wC{A(mO8ae&B%;9#dTh)|_V0}&D>^xO(UZ2e z2{_|CZ)7#U(3yWf5i9##7`c79OX{6Y8(moRVE~tW6|XopYg$JLlxm|Q3X{o#=h{Lt zyCavxXR*2;2qGJ^XJ;nKfb^TpVwPUUM{br*(tWeRu{4Id4v!3gY2#K~T^)u_Zer}E zn_7xjY>yK@ouN|9;O0P^ZRT#CcRfGYf%F#Vs;VRb^a|0p^Z(QZ;v z_h#9VcRfJ+!d^?N=4N?P&mP&Il_OwCQMpD;0zHfk@ay$}8TVzgO~mUpV_LitM@Q8z z?9S+w#)-R7Wlo;vsZz9D@#pj>8Cxn}a*?q4(u0!Y^j5C?U$fc+Q?CL`w3ANg?&_1 z?FycB-DhP^mg2^y?@lqA_P>^f{|QRaU~igN=blSkS9CZwMjy&9MHhfv%{2!{eynf` z$pvnj!j!PJ^$UUrQOmKo@@YFMK}y`iI9Na(F-H2m)K^;G@|^OUI0RWuw$|>Zi>>4v zq8|c(foEJT-K`qR-DS&5P&JlKeXe6o?f)$qE9Lfsl2!ik}0GeaVk8W1YV42f9! zrDpRi_q@-CcyuXkqt%*k_=Sc09&?96Tu==56A9)J#}xMwb)PC2fO#x-Caabw>Rn0y z{HI2_IqLYwp=X|p=?Np~=954+Ml?kfMhR7O0xujiI*!b{uTA~|{_q>bBp z=-{T8<|tDq3CTI;lW2D@h@1>&cH*BDa_y{)8j?pQ@ST4-bycb_leaSjIqXOg!I-dI zwNUCuLgX|9CoCb|R&9g{#A6D$#nUq#?A;pr8AdUx?+Mg??0rWBc7w@CmP8$GxdE}e zzHzq~`$CYEEw*mQui5d*E?e~uhB&}WX3EcR8?CKn>HfFzpYY*7uYx^#J!@o8sI_T# z<9>7j4!UEiu=RQ98@44ed!uGToSby}kzEY$x!v2ihKXiyj2);!CRiFr>vI6V7wV&~ zpF$-W<*Q*jZKoda1CDyKwXd4AY%8NW?9?a@Yy}T{I z8l%pzl#*N&hVTtVAK9|*u$h3nx1=6hC?%PgdUH$1 zgU4B#9LvX`-GA_Cqken?Okqp8ZYE~ymacnbL{jExU#!eyp{f&~&7KrUZ(@I$| z*^;qz>W?cO%fU+}`r^A}yw+(=Jny@=CHlQvYr*sZn~Mq?a}U+deU_vMDx=p%_S zeq4>UTvg|Ns%zPo!tKDK1jo!MHXs5k!B@$&Iw30U0NMQkIcpzN?DYb2*ymZtS+0tL z|7ZN81f&h|3Gcxa1-K}FIu}UC&Q5;*yA>^uZA?ny{4)}sFcUL|IrhZMoeaaeLpX1W z;w-j*w2UV02#G(CdabMIPx^&kQ$y&xwe3xF%dn^Zx=-2>R>1)!wONiAju(G&X}wa&e3M9e@y*jUOnq=Da;aeY3U?)V#0wlC4b>zD zYg41RpwFSrtQS5)@i*U(!g@ZK3qpF#ekkwhzv36}MIRhhvDIX_{kvF-w-i!URUy&1 zZ(GVLd13Rxa`n}=54^&rT5t6b{-~*ny>~1i9TpVYZ!wNEQFHytZc3QlVJihZ*&r<0 z+pVZ@C%9pIE7QsXE_Wp;lEw)G|JA?Qr?Kw4JQlq%?zBMH%3 zQ6JVx`e*&{{{B6UR&7EDCoSR>Ia4d+4zz1c4JkkrJzYuTQJ&qreUvcDtG1l9xOB(^ zrc~7sn*MO0arcJ>5^dNJY0Dd`dhvNp0zvzsHa0TO=<$99GqoAfRNXiNXf(!*IEnmP zr8tbeCb^b*$m_VvC6g&*bjtGqCpo-Ox`{)A5lw;yGH&b+sGu3`p#9`TQsPue)fUR< z&`V+$NVA8gzWIS^yrU#20h!!^9m?LW?#vpgS2M(T!&ts|UtGu)ibm12hjYQH3>Qh9 z&4Gq1i{aI05C~XPmovUh_g2b!EvwQ{JyK_xNk>x&ulaux-hYGOKQD&wmOXCwH|wi# z>ZA;Hh-sqvZJyfmPTTsim;OTNb>l5w$r>9)Wr+8Y$ptx_kA@kv@KugIc@7s51}<>$GYQ56)Ki`;R>$*#5fm%=a3oHXA{2r ze(gE^q7@6M#NOKDk?lQ!5v+|OS})<3Q$-XinH=iC%oZ$K*8mR&EYajonfKIB3qJw` zEh)zGw95_xD1yBg7v#8+sMaF^CW02x=1c30XZN3`1|S3xsHPU&%AtideyTVxW^pmN zC+CEKwcWLdiPK%WA><$Zk_5~1-n5;YlQ3aqhz90Q0Xyfxt(2@|0?VzodBvU=`;yT2 z97iv%rVlOZAzEh~-1FWqO$aNkyaLq>*<|?mOs(GR3FT392W{moZ;HD&I)GzNjoj|$ z6#h>D!~{G0fG#7m_{NwN;WBo+FBYH&u^ak!z=N*W+uPe4om4A>NYVy$G_k2Ag|NAO z1wvW{1B!~LGZRF@(ZG@sG?88UFOlrO7R5%3$!Z0a^39~K+xO1U`7jU^5z(@hy;s>te8_ua9x0Q zn(l}+Nj+K~g&_``wy#um;Qzq?f&T;l2mTNIANW7;|84Ov|JCpRS8NUz9_W9coCNv_ z?xl52VVa7r#b5F5PRa<1$EH=S_IdUhr^0@&t!&FBRvJ)_Pg&>TFXt z;Him`;9z20Fs(B_&VW(!)c3M{jzBor(F1Dq}caD#skevw=^xy`W{jSaVH-|RF^ zSxJ<1s$c_lG4y9pCj12Kt805nHipE(fmI(remtK}i2v8umpU5=fE&6Kz!tKfD5{zY zco!fp1V_e}JZR%cv(4G}(kNtwr>75|O)au*I`|}b#FsjqhIe!NJ-zeaOcKF`RqzgX zM*JenjN>g8sc(CV9npdUo7l-3T~TbOt`ob-!+y>EHiCg>^;n^+rmplETdVk@A`cVT zA1`NM{`03FQ?x4Ad8O#s9fGCv7?9O}iuG`+X$PzYMAI#+5>jAk1=DDL4Zw~OY#s>1 zQelFQX}adIQepTSq~Q#Jb(w>Y{qR)gW)Aw04L6*=W|uYVCY8oiUWoVZpBMokVRv`n z|G@u&{{#OA{tx^g_&@OfZSgOE^Xp%o&t1c5t;L4bTyJavWpxv!`N2~II|QWnuI)Ob zYv3~hzdJ|?XBxHj0LyR7#yX)CPY)MQMfjp;JB;mJUhwT5L@?^+5I~?-#K5{H_o>s$tlw9%!2JAO% zwPewi-QXC{!xhKIj#2sjTTl)0}n}@N`7N{W=1DLw7kpe!!Zsa-=pa8*m(NH%XbHdb1Xf#@^W+ z0!Yl(Z&WF*q+t}rJ+X~J$AAkhsNVDQV?(l=i7Q)eikH_fxBDBC;`#gl3*YY74ymO- zu^WR8?-b)qS)xc+#&MP};#uWZXjqxtS8$~83O9k&BTMF?%87MjbR|K3ytK zDO-8yV;5vhR^p`+p+(ZmL}s%bYB1U6cA4RPB%6{$xxo07C&85m{tx^g_&@M};Qzq? jf&T;l-xmM>p8x{@D(Mktb)u`N00000NkvXXu0mjf(?NUb literal 0 HcmV?d00001 diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/codepen-embed.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/codepen-embed.css new file mode 100644 index 00000000..195c4a07 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/codepen-embed.css @@ -0,0 +1,60 @@ +/* + codepen.io Embed Theme + Author: Justin Perry + Original theme - https://github.com/chriskempson/tomorrow-theme +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #222; + color: #fff; +} + +.hljs-comment, +.hljs-quote { + color: #777; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-regexp, +.hljs-meta, +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-params, +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-deletion { + color: #ab875d; +} + +.hljs-section, +.hljs-title, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-type, +.hljs-attribute { + color: #9b869b; +} + +.hljs-string, +.hljs-keyword, +.hljs-selector-tag, +.hljs-addition { + color: #8f9c6c; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/color-brewer.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/color-brewer.css new file mode 100644 index 00000000..7934d986 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/color-brewer.css @@ -0,0 +1,71 @@ +/* + +Colorbrewer theme +Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock +Ported by Fabrício Tavares de Oliveira + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fff; +} + +.hljs, +.hljs-subst { + color: #000; +} + +.hljs-string, +.hljs-meta, +.hljs-symbol, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition { + color: #756bb1; +} + +.hljs-comment, +.hljs-quote { + color: #636363; +} + +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-bullet, +.hljs-link { + color: #31a354; +} + +.hljs-deletion, +.hljs-variable { + color: #88f; +} + + + +.hljs-keyword, +.hljs-selector-tag, +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-doctag, +.hljs-type, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-strong { + color: #3182bd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-attribute { + color: #e6550d; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/darcula.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/darcula.css new file mode 100644 index 00000000..be182d0b --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/darcula.css @@ -0,0 +1,77 @@ +/* + +Darcula color scheme from the JetBrains family of IDEs + +*/ + + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #2b2b2b; +} + +.hljs { + color: #bababa; +} + +.hljs-strong, +.hljs-emphasis { + color: #a8a8a2; +} + +.hljs-bullet, +.hljs-quote, +.hljs-link, +.hljs-number, +.hljs-regexp, +.hljs-literal { + color: #6896ba; +} + +.hljs-code, +.hljs-selector-class { + color: #a6e22e; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-attribute, +.hljs-name, +.hljs-variable { + color: #cb7832; +} + +.hljs-params { + color: #b9b9b9; +} + +.hljs-string { + color: #6a8759; +} + +.hljs-subst, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-symbol, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition { + color: #e0c46c; +} + +.hljs-comment, +.hljs-deletion, +.hljs-meta { + color: #7f7f7f; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/dark.css new file mode 100644 index 00000000..b4724f5f --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/dark.css @@ -0,0 +1,63 @@ +/* + +Dark style from softwaremaniacs.org (c) Ivan Sagalaev + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #444; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-section, +.hljs-link { + color: white; +} + +.hljs, +.hljs-subst { + color: #ddd; +} + +.hljs-string, +.hljs-title, +.hljs-name, +.hljs-type, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #d88; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #777; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-title, +.hljs-section, +.hljs-doctag, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/darkula.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/darkula.css new file mode 100644 index 00000000..f4646c3c --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/darkula.css @@ -0,0 +1,6 @@ +/* + Deprecated due to a typo in the name and left here for compatibility purpose only. + Please use darcula.css instead. +*/ + +@import url('darcula.css'); diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/default.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/default.css new file mode 100644 index 00000000..f1bfade3 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/default.css @@ -0,0 +1,99 @@ +/* + +Original highlight.js style (c) Ivan Sagalaev + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #F0F0F0; +} + + +/* Base color: saturation 0; */ + +.hljs, +.hljs-subst { + color: #444; +} + +.hljs-comment { + color: #888888; +} + +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + font-weight: bold; +} + + +/* User color: hue: 0 */ + +.hljs-type, +.hljs-string, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #880000; +} + +.hljs-title, +.hljs-section { + color: #880000; + font-weight: bold; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #BC6060; +} + + +/* Language color: hue: 90; */ + +.hljs-literal { + color: #78A960; +} + +.hljs-built_in, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #397300; +} + + +/* Meta color: hue: 200 */ + +.hljs-meta { + color: #1f7199; +} + +.hljs-meta-string { + color: #4d99bf; +} + + +/* Misc effects */ + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/docco.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/docco.css new file mode 100644 index 00000000..db366be3 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/docco.css @@ -0,0 +1,97 @@ +/* +Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars) +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #000; + background: #f8f8ff; +} + +.hljs-comment, +.hljs-quote { + color: #408080; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-subst { + color: #954121; +} + +.hljs-number { + color: #40a070; +} + +.hljs-string, +.hljs-doctag { + color: #219161; +} + +.hljs-selector-id, +.hljs-selector-class, +.hljs-section, +.hljs-type { + color: #19469d; +} + +.hljs-params { + color: #00f; +} + +.hljs-title { + color: #458; + font-weight: bold; +} + +.hljs-tag, +.hljs-name, +.hljs-attribute { + color: #000080; + font-weight: normal; +} + +.hljs-variable, +.hljs-template-variable { + color: #008080; +} + +.hljs-regexp, +.hljs-link { + color: #b68; +} + +.hljs-symbol, +.hljs-bullet { + color: #990073; +} + +.hljs-built_in, +.hljs-builtin-name { + color: #0086b3; +} + +.hljs-meta { + color: #999; + font-weight: bold; +} + +.hljs-deletion { + background: #fdd; +} + +.hljs-addition { + background: #dfd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/dracula.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/dracula.css new file mode 100644 index 00000000..d591db68 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/dracula.css @@ -0,0 +1,76 @@ +/* + +Dracula Theme v1.2.0 + +https://github.com/zenorocha/dracula-theme + +Copyright 2015, All rights reserved + +Code licensed under the MIT license +http://zenorocha.mit-license.org + +@author Éverton Ribeiro +@author Zeno Rocha + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #282a36; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-section, +.hljs-link { + color: #8be9fd; +} + +.hljs-function .hljs-keyword { + color: #ff79c6; +} + +.hljs, +.hljs-subst { + color: #f8f8f2; +} + +.hljs-string, +.hljs-title, +.hljs-name, +.hljs-type, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #f1fa8c; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #6272a4; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-title, +.hljs-section, +.hljs-doctag, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/far.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/far.css new file mode 100644 index 00000000..2b3f87b5 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/far.css @@ -0,0 +1,71 @@ +/* + +FAR Style (c) MajestiC + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000080; +} + +.hljs, +.hljs-subst { + color: #0ff; +} + +.hljs-string, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-builtin-name, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition { + color: #ff0; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-variable { + color: #fff; +} + +.hljs-comment, +.hljs-quote, +.hljs-doctag, +.hljs-deletion { + color: #888; +} + +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-link { + color: #0f0; +} + +.hljs-meta { + color: #008080; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-title, +.hljs-section, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/foundation.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/foundation.css new file mode 100644 index 00000000..f1fe64b3 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/foundation.css @@ -0,0 +1,88 @@ +/* +Description: Foundation 4 docs style for highlight.js +Author: Dan Allen +Website: http://foundation.zurb.com/docs/ +Version: 1.0 +Date: 2013-04-02 +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #eee; color: black; +} + +.hljs-link, +.hljs-emphasis, +.hljs-attribute, +.hljs-addition { + color: #070; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong, +.hljs-string, +.hljs-deletion { + color: #d14; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-quote, +.hljs-comment { + color: #998; + font-style: italic; +} + +.hljs-section, +.hljs-title { + color: #900; +} + +.hljs-class .hljs-title, +.hljs-type { + color: #458; +} + +.hljs-variable, +.hljs-template-variable { + color: #336699; +} + +.hljs-bullet { + color: #997700; +} + +.hljs-meta { + color: #3344bb; +} + +.hljs-code, +.hljs-number, +.hljs-literal, +.hljs-keyword, +.hljs-selector-tag { + color: #099; +} + +.hljs-regexp { + background-color: #fff0ff; + color: #880088; +} + +.hljs-symbol { + color: #990073; +} + +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #007700; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/github-gist.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/github-gist.css new file mode 100644 index 00000000..155f0b91 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/github-gist.css @@ -0,0 +1,71 @@ +/** + * GitHub Gist Theme + * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro + */ + +.hljs { + display: block; + background: white; + padding: 0.5em; + color: #333333; + overflow-x: auto; +} + +.hljs-comment, +.hljs-meta { + color: #969896; +} + +.hljs-string, +.hljs-variable, +.hljs-template-variable, +.hljs-strong, +.hljs-emphasis, +.hljs-quote { + color: #df5000; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-type { + color: #a71d5d; +} + +.hljs-literal, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute { + color: #0086b3; +} + +.hljs-section, +.hljs-name { + color: #63a35c; +} + +.hljs-tag { + color: #333333; +} + +.hljs-title, +.hljs-attr, +.hljs-selector-id, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #795da3; +} + +.hljs-addition { + color: #55a532; + background-color: #eaffea; +} + +.hljs-deletion { + color: #bd2c00; + background-color: #ffecec; +} + +.hljs-link { + text-decoration: underline; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/github.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/github.css new file mode 100644 index 00000000..791932b8 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/github.css @@ -0,0 +1,99 @@ +/* + +github.com style (c) Vasily Polovnyov + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #333; + background: #f8f8f8; +} + +.hljs-comment, +.hljs-quote { + color: #998; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-subst { + color: #333; + font-weight: bold; +} + +.hljs-number, +.hljs-literal, +.hljs-variable, +.hljs-template-variable, +.hljs-tag .hljs-attr { + color: #008080; +} + +.hljs-string, +.hljs-doctag { + color: #d14; +} + +.hljs-title, +.hljs-section, +.hljs-selector-id { + color: #900; + font-weight: bold; +} + +.hljs-subst { + font-weight: normal; +} + +.hljs-type, +.hljs-class .hljs-title { + color: #458; + font-weight: bold; +} + +.hljs-tag, +.hljs-name, +.hljs-attribute { + color: #000080; + font-weight: normal; +} + +.hljs-regexp, +.hljs-link { + color: #009926; +} + +.hljs-symbol, +.hljs-bullet { + color: #990073; +} + +.hljs-built_in, +.hljs-builtin-name { + color: #0086b3; +} + +.hljs-meta { + color: #999; + font-weight: bold; +} + +.hljs-deletion { + background: #fdd; +} + +.hljs-addition { + background: #dfd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/googlecode.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/googlecode.css new file mode 100644 index 00000000..884ad635 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/googlecode.css @@ -0,0 +1,89 @@ +/* + +Google Code style (c) Aahan Krish + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: white; + color: black; +} + +.hljs-comment, +.hljs-quote { + color: #800; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-title, +.hljs-name { + color: #008; +} + +.hljs-variable, +.hljs-template-variable { + color: #660; +} + +.hljs-string, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-regexp { + color: #080; +} + +.hljs-literal, +.hljs-symbol, +.hljs-bullet, +.hljs-meta, +.hljs-number, +.hljs-link { + color: #066; +} + +.hljs-title, +.hljs-doctag, +.hljs-type, +.hljs-attr, +.hljs-built_in, +.hljs-builtin-name, +.hljs-params { + color: #606; +} + +.hljs-attribute, +.hljs-subst { + color: #000; +} + +.hljs-formula { + background-color: #eee; + font-style: italic; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #9B703F +} + +.hljs-addition { + background-color: #baeeba; +} + +.hljs-deletion { + background-color: #ffc8bd; +} + +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/grayscale.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/grayscale.css new file mode 100644 index 00000000..5376f340 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/grayscale.css @@ -0,0 +1,101 @@ +/* + +grayscale style (c) MY Sun + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #333; + background: #fff; +} + +.hljs-comment, +.hljs-quote { + color: #777; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-subst { + color: #333; + font-weight: bold; +} + +.hljs-number, +.hljs-literal { + color: #777; +} + +.hljs-string, +.hljs-doctag, +.hljs-formula { + color: #333; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAJ0lEQVQIW2O8e/fufwYGBgZBQUEQxcCIIfDu3Tuwivfv30NUoAsAALHpFMMLqZlPAAAAAElFTkSuQmCC) repeat; +} + +.hljs-title, +.hljs-section, +.hljs-selector-id { + color: #000; + font-weight: bold; +} + +.hljs-subst { + font-weight: normal; +} + +.hljs-class .hljs-title, +.hljs-type, +.hljs-name { + color: #333; + font-weight: bold; +} + +.hljs-tag { + color: #333; +} + +.hljs-regexp { + color: #333; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAAPUlEQVQYV2NkQAN37979r6yszIgujiIAU4RNMVwhuiQ6H6wQl3XI4oy4FMHcCJPHcDS6J2A2EqUQpJhohQDexSef15DBCwAAAABJRU5ErkJggg==) repeat; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link { + color: #000; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAKElEQVQIW2NkQAO7d+/+z4gsBhJwdXVlhAvCBECKwIIwAbhKZBUwBQA6hBpm5efZsgAAAABJRU5ErkJggg==) repeat; +} + +.hljs-built_in, +.hljs-builtin-name { + color: #000; + text-decoration: underline; +} + +.hljs-meta { + color: #999; + font-weight: bold; +} + +.hljs-deletion { + color: #fff; + background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAYAAABS3WWCAAAAE0lEQVQIW2MMDQ39zzhz5kwIAQAyxweWgUHd1AAAAABJRU5ErkJggg==) repeat; +} + +.hljs-addition { + color: #000; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAALUlEQVQYV2N89+7dfwYk8P79ewZBQUFkIQZGOiu6e/cuiptQHAPl0NtNxAQBAM97Oejj3Dg7AAAAAElFTkSuQmCC) repeat; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/gruvbox-dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/gruvbox-dark.css new file mode 100644 index 00000000..f563811a --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/gruvbox-dark.css @@ -0,0 +1,108 @@ +/* + +Gruvbox style (dark) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox) + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #282828; +} + +.hljs, +.hljs-subst { + color: #ebdbb2; +} + +/* Gruvbox Red */ +.hljs-deletion, +.hljs-formula, +.hljs-keyword, +.hljs-link, +.hljs-selector-tag { + color: #fb4934; +} + +/* Gruvbox Blue */ +.hljs-built_in, +.hljs-emphasis, +.hljs-name, +.hljs-quote, +.hljs-strong, +.hljs-title, +.hljs-variable { + color: #83a598; +} + +/* Gruvbox Yellow */ +.hljs-attr, +.hljs-params, +.hljs-template-tag, +.hljs-type { + color: #fabd2f; +} + +/* Gruvbox Purple */ +.hljs-builtin-name, +.hljs-doctag, +.hljs-literal, +.hljs-number { + color: #8f3f71; +} + +/* Gruvbox Orange */ +.hljs-code, +.hljs-meta, +.hljs-regexp, +.hljs-selector-id, +.hljs-template-variable { + color: #fe8019; +} + +/* Gruvbox Green */ +.hljs-addition, +.hljs-meta-string, +.hljs-section, +.hljs-selector-attr, +.hljs-selector-class, +.hljs-string, +.hljs-symbol { + color: #b8bb26; +} + +/* Gruvbox Aqua */ +.hljs-attribute, +.hljs-bullet, +.hljs-class, +.hljs-function, +.hljs-function .hljs-keyword, +.hljs-meta-keyword, +.hljs-selector-pseudo, +.hljs-tag { + color: #8ec07c; +} + +/* Gruvbox Gray */ +.hljs-comment { + color: #928374; +} + +/* Gruvbox Purple */ +.hljs-link_label, +.hljs-literal, +.hljs-number { + color: #d3869b; +} + +.hljs-comment, +.hljs-emphasis { + font-style: italic; +} + +.hljs-section, +.hljs-strong, +.hljs-tag { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/gruvbox-light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/gruvbox-light.css new file mode 100644 index 00000000..ff45468e --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/gruvbox-light.css @@ -0,0 +1,108 @@ +/* + +Gruvbox style (light) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox) + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fbf1c7; +} + +.hljs, +.hljs-subst { + color: #3c3836; +} + +/* Gruvbox Red */ +.hljs-deletion, +.hljs-formula, +.hljs-keyword, +.hljs-link, +.hljs-selector-tag { + color: #9d0006; +} + +/* Gruvbox Blue */ +.hljs-built_in, +.hljs-emphasis, +.hljs-name, +.hljs-quote, +.hljs-strong, +.hljs-title, +.hljs-variable { + color: #076678; +} + +/* Gruvbox Yellow */ +.hljs-attr, +.hljs-params, +.hljs-template-tag, +.hljs-type { + color: #b57614; +} + +/* Gruvbox Purple */ +.hljs-builtin-name, +.hljs-doctag, +.hljs-literal, +.hljs-number { + color: #8f3f71; +} + +/* Gruvbox Orange */ +.hljs-code, +.hljs-meta, +.hljs-regexp, +.hljs-selector-id, +.hljs-template-variable { + color: #af3a03; +} + +/* Gruvbox Green */ +.hljs-addition, +.hljs-meta-string, +.hljs-section, +.hljs-selector-attr, +.hljs-selector-class, +.hljs-string, +.hljs-symbol { + color: #79740e; +} + +/* Gruvbox Aqua */ +.hljs-attribute, +.hljs-bullet, +.hljs-class, +.hljs-function, +.hljs-function .hljs-keyword, +.hljs-meta-keyword, +.hljs-selector-pseudo, +.hljs-tag { + color: #427b58; +} + +/* Gruvbox Gray */ +.hljs-comment { + color: #928374; +} + +/* Gruvbox Purple */ +.hljs-link_label, +.hljs-literal, +.hljs-number { + color: #8f3f71; +} + +.hljs-comment, +.hljs-emphasis { + font-style: italic; +} + +.hljs-section, +.hljs-strong, +.hljs-tag { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/hopscotch.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/hopscotch.css new file mode 100644 index 00000000..32e60d23 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/hopscotch.css @@ -0,0 +1,83 @@ +/* + * Hopscotch + * by Jan T. Sott + * https://github.com/idleberg/Hopscotch + * + * This work is licensed under the Creative Commons CC0 1.0 Universal License + */ + +/* Comment */ +.hljs-comment, +.hljs-quote { + color: #989498; +} + +/* Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-link, +.hljs-deletion { + color: #dd464c; +} + +/* Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #fd8b19; +} + +/* Yellow */ +.hljs-class .hljs-title { + color: #fdcc59; +} + +/* Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #8fc13e; +} + +/* Aqua */ +.hljs-meta { + color: #149b93; +} + +/* Blue */ +.hljs-function, +.hljs-section, +.hljs-title { + color: #1290bf; +} + +/* Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #c85e7c; +} + +.hljs { + display: block; + background: #322931; + color: #b9b5b8; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/hybrid.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/hybrid.css new file mode 100644 index 00000000..29735a18 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/hybrid.css @@ -0,0 +1,102 @@ +/* + +vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid) + +*/ + +/*background color*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #1d1f21; +} + +/*selection color*/ +.hljs::selection, +.hljs span::selection { + background: #373b41; +} + +.hljs::-moz-selection, +.hljs span::-moz-selection { + background: #373b41; +} + +/*foreground color*/ +.hljs { + color: #c5c8c6; +} + +/*color: fg_yellow*/ +.hljs-title, +.hljs-name { + color: #f0c674; +} + +/*color: fg_comment*/ +.hljs-comment, +.hljs-meta, +.hljs-meta .hljs-keyword { + color: #707880; +} + +/*color: fg_red*/ +.hljs-number, +.hljs-symbol, +.hljs-literal, +.hljs-deletion, +.hljs-link { + color: #cc6666 +} + +/*color: fg_green*/ +.hljs-string, +.hljs-doctag, +.hljs-addition, +.hljs-regexp, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #b5bd68; +} + +/*color: fg_purple*/ +.hljs-attribute, +.hljs-code, +.hljs-selector-id { + color: #b294bb; +} + +/*color: fg_blue*/ +.hljs-keyword, +.hljs-selector-tag, +.hljs-bullet, +.hljs-tag { + color: #81a2be; +} + +/*color: fg_aqua*/ +.hljs-subst, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #8abeb7; +} + +/*color: fg_orange*/ +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-quote, +.hljs-section, +.hljs-selector-class { + color: #de935f; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/idea.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/idea.css new file mode 100644 index 00000000..3bf1892b --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/idea.css @@ -0,0 +1,97 @@ +/* + +Intellij Idea-like styling (c) Vasily Polovnyov + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #000; + background: #fff; +} + +.hljs-subst, +.hljs-title { + font-weight: normal; + color: #000; +} + +.hljs-comment, +.hljs-quote { + color: #808080; + font-style: italic; +} + +.hljs-meta { + color: #808000; +} + +.hljs-tag { + background: #efefef; +} + +.hljs-section, +.hljs-name, +.hljs-literal, +.hljs-keyword, +.hljs-selector-tag, +.hljs-type, +.hljs-selector-id, +.hljs-selector-class { + font-weight: bold; + color: #000080; +} + +.hljs-attribute, +.hljs-number, +.hljs-regexp, +.hljs-link { + font-weight: bold; + color: #0000ff; +} + +.hljs-number, +.hljs-regexp, +.hljs-link { + font-weight: normal; +} + +.hljs-string { + color: #008000; + font-weight: bold; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-formula { + color: #000; + background: #d0eded; + font-style: italic; +} + +.hljs-doctag { + text-decoration: underline; +} + +.hljs-variable, +.hljs-template-variable { + color: #660e7a; +} + +.hljs-addition { + background: #baeeba; +} + +.hljs-deletion { + background: #ffc8bd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/ir-black.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/ir-black.css new file mode 100644 index 00000000..bd4c755e --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/ir-black.css @@ -0,0 +1,73 @@ +/* + IR_Black style (c) Vasily Mikhailitchenko +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000; + color: #f8f8f8; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta { + color: #7c7c7c; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-tag, +.hljs-name { + color: #96cbfe; +} + +.hljs-attribute, +.hljs-selector-id { + color: #ffffb6; +} + +.hljs-string, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition { + color: #a8ff60; +} + +.hljs-subst { + color: #daefa3; +} + +.hljs-regexp, +.hljs-link { + color: #e9c062; +} + +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-doctag { + color: #ffffb6; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-variable, +.hljs-template-variable, +.hljs-literal { + color: #c6c5fe; +} + +.hljs-number, +.hljs-deletion { + color:#ff73fd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/kimbie.dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/kimbie.dark.css new file mode 100644 index 00000000..d139cb5d --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/kimbie.dark.css @@ -0,0 +1,74 @@ +/* + Name: Kimbie (dark) + Author: Jan T. Sott + License: Creative Commons Attribution-ShareAlike 4.0 Unported License + URL: https://github.com/idleberg/Kimbie-highlight.js +*/ + +/* Kimbie Comment */ +.hljs-comment, +.hljs-quote { + color: #d6baad; +} + +/* Kimbie Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-meta { + color: #dc3958; +} + +/* Kimbie Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion, +.hljs-link { + color: #f79a32; +} + +/* Kimbie Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #f06431; +} + +/* Kimbie Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #889b4a; +} + +/* Kimbie Purple */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-function { + color: #98676a; +} + +.hljs { + display: block; + overflow-x: auto; + background: #221a0f; + color: #d3af86; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/kimbie.light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/kimbie.light.css new file mode 100644 index 00000000..04ff6ed3 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/kimbie.light.css @@ -0,0 +1,74 @@ +/* + Name: Kimbie (light) + Author: Jan T. Sott + License: Creative Commons Attribution-ShareAlike 4.0 Unported License + URL: https://github.com/idleberg/Kimbie-highlight.js +*/ + +/* Kimbie Comment */ +.hljs-comment, +.hljs-quote { + color: #a57a4c; +} + +/* Kimbie Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-meta { + color: #dc3958; +} + +/* Kimbie Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion, +.hljs-link { + color: #f79a32; +} + +/* Kimbie Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #f06431; +} + +/* Kimbie Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #889b4a; +} + +/* Kimbie Purple */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-function { + color: #98676a; +} + +.hljs { + display: block; + overflow-x: auto; + background: #fbebd4; + color: #84613d; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/magula.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/magula.css new file mode 100644 index 00000000..44dee5e8 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/magula.css @@ -0,0 +1,70 @@ +/* +Description: Magula style for highligh.js +Author: Ruslan Keba +Website: http://rukeba.com/ +Version: 1.0 +Date: 2009-01-03 +Music: Aphex Twin / Xtal +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background-color: #f4f4f4; +} + +.hljs, +.hljs-subst { + color: black; +} + +.hljs-string, +.hljs-title, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #050; +} + +.hljs-comment, +.hljs-quote { + color: #777; +} + +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-type, +.hljs-link { + color: #800; +} + +.hljs-deletion, +.hljs-meta { + color: #00e; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-tag, +.hljs-name { + font-weight: bold; + color: navy; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/mono-blue.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/mono-blue.css new file mode 100644 index 00000000..884c97c7 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/mono-blue.css @@ -0,0 +1,59 @@ +/* + Five-color theme from a single blue hue. +*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #eaeef3; +} + +.hljs { + color: #00193a; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-title, +.hljs-section, +.hljs-doctag, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-comment { + color: #738191; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-literal, +.hljs-type, +.hljs-addition, +.hljs-tag, +.hljs-quote, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #0048ab; +} + +.hljs-meta, +.hljs-subst, +.hljs-symbol, +.hljs-regexp, +.hljs-attribute, +.hljs-deletion, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-bullet { + color: #4c81c9; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/monokai-sublime.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/monokai-sublime.css new file mode 100644 index 00000000..2864170d --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/monokai-sublime.css @@ -0,0 +1,83 @@ +/* + +Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/ + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #23241f; +} + +.hljs, +.hljs-tag, +.hljs-subst { + color: #f8f8f2; +} + +.hljs-strong, +.hljs-emphasis { + color: #a8a8a2; +} + +.hljs-bullet, +.hljs-quote, +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-link { + color: #ae81ff; +} + +.hljs-code, +.hljs-title, +.hljs-section, +.hljs-selector-class { + color: #a6e22e; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-name, +.hljs-attr { + color: #f92672; +} + +.hljs-symbol, +.hljs-attribute { + color: #66d9ef; +} + +.hljs-params, +.hljs-class .hljs-title { + color: #f8f8f2; +} + +.hljs-string, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition, +.hljs-variable, +.hljs-template-variable { + color: #e6db74; +} + +.hljs-comment, +.hljs-deletion, +.hljs-meta { + color: #75715e; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/monokai.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/monokai.css new file mode 100644 index 00000000..775d53f9 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/monokai.css @@ -0,0 +1,70 @@ +/* +Monokai style - ported by Luigi Maselli - http://grigio.org +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #272822; color: #ddd; +} + +.hljs-tag, +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-strong, +.hljs-name { + color: #f92672; +} + +.hljs-code { + color: #66d9ef; +} + +.hljs-class .hljs-title { + color: white; +} + +.hljs-attribute, +.hljs-symbol, +.hljs-regexp, +.hljs-link { + color: #bf79db; +} + +.hljs-string, +.hljs-bullet, +.hljs-subst, +.hljs-title, +.hljs-section, +.hljs-emphasis, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #a6e22e; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #75715e; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-selector-id { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/obsidian.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/obsidian.css new file mode 100644 index 00000000..356630fa --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/obsidian.css @@ -0,0 +1,88 @@ +/** + * Obsidian style + * ported by Alexander Marenin (http://github.com/ioncreature) + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #282b2e; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-selector-id { + color: #93c763; +} + +.hljs-number { + color: #ffcd22; +} + +.hljs { + color: #e0e2e4; +} + +.hljs-attribute { + color: #668bb0; +} + +.hljs-code, +.hljs-class .hljs-title, +.hljs-section { + color: white; +} + +.hljs-regexp, +.hljs-link { + color: #d39745; +} + +.hljs-meta { + color: #557182; +} + +.hljs-tag, +.hljs-name, +.hljs-bullet, +.hljs-subst, +.hljs-emphasis, +.hljs-type, +.hljs-built_in, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #8cbbad; +} + +.hljs-string, +.hljs-symbol { + color: #ec7600; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion { + color: #818e96; +} + +.hljs-selector-class { + color: #A082BD +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/ocean.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/ocean.css new file mode 100644 index 00000000..5901581b --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/ocean.css @@ -0,0 +1,74 @@ +/* Ocean Dark Theme */ +/* https://github.com/gavsiu */ +/* Original theme - https://github.com/chriskempson/base16 */ + +/* Ocean Comment */ +.hljs-comment, +.hljs-quote { + color: #65737e; +} + +/* Ocean Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #bf616a; +} + +/* Ocean Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #d08770; +} + +/* Ocean Yellow */ +.hljs-attribute { + color: #ebcb8b; +} + +/* Ocean Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #a3be8c; +} + +/* Ocean Blue */ +.hljs-title, +.hljs-section { + color: #8fa1b3; +} + +/* Ocean Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b48ead; +} + +.hljs { + display: block; + overflow-x: auto; + background: #2b303b; + color: #c0c5ce; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/paraiso-dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/paraiso-dark.css new file mode 100644 index 00000000..e7292401 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/paraiso-dark.css @@ -0,0 +1,72 @@ +/* + Paraíso (dark) + Created by Jan T. Sott (http://github.com/idleberg) + Inspired by the art of Rubens LP (http://www.rubenslp.com.br) +*/ + +/* Paraíso Comment */ +.hljs-comment, +.hljs-quote { + color: #8d8687; +} + +/* Paraíso Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-link, +.hljs-meta { + color: #ef6155; +} + +/* Paraíso Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion { + color: #f99b15; +} + +/* Paraíso Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #fec418; +} + +/* Paraíso Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #48b685; +} + +/* Paraíso Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #815ba4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #2f1e2e; + color: #a39e9b; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/paraiso-light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/paraiso-light.css new file mode 100644 index 00000000..944857cd --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/paraiso-light.css @@ -0,0 +1,72 @@ +/* + Paraíso (light) + Created by Jan T. Sott (http://github.com/idleberg) + Inspired by the art of Rubens LP (http://www.rubenslp.com.br) +*/ + +/* Paraíso Comment */ +.hljs-comment, +.hljs-quote { + color: #776e71; +} + +/* Paraíso Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-link, +.hljs-meta { + color: #ef6155; +} + +/* Paraíso Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion { + color: #f99b15; +} + +/* Paraíso Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #fec418; +} + +/* Paraíso Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #48b685; +} + +/* Paraíso Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #815ba4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #e7e9db; + color: #4f424c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/pojoaque.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/pojoaque.css new file mode 100644 index 00000000..2e07847b --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/pojoaque.css @@ -0,0 +1,83 @@ +/* + +Pojoaque Style by Jason Tate +http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html +Based on Solarized Style from http://ethanschoonover.com/solarized + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #dccf8f; + background: url(./pojoaque.jpg) repeat scroll left top #181914; +} + +.hljs-comment, +.hljs-quote { + color: #586e75; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-addition { + color: #b64926; +} + +.hljs-number, +.hljs-string, +.hljs-doctag, +.hljs-regexp { + color: #468966; +} + +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-name { + color: #ffb03b; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-class .hljs-title, +.hljs-type, +.hljs-tag { + color: #b58900; +} + +.hljs-attribute { + color: #b89859; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-subst, +.hljs-meta { + color: #cb4b16; +} + +.hljs-deletion { + color: #dc322f; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #d3a60c; +} + +.hljs-formula { + background: #073642; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/pojoaque.jpg b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/pojoaque.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9c07d4ab40b6d77e90ff69f0012bcd33b21d31c3 GIT binary patch literal 1186 zcmZXSe^8Tk9LK-kXFs3)f@f?)Cddzw3v4wdZyXQ;4x3=;Ja*N#%n9ik!UGmt9H3k0 zJST|5jOc(ID$FQt3C?jQZBws#kXolO1lg9Pba9BB=Q+UEBX!nY@6Uhl&+ofe$Q$y5 z@ci`~)&qzDP(lOiQ5p?p z(`j^e7!yUAVHk%K#^GQXn?s0=VLYCI$HRoe=xCuZ>A6A3@sxEP#XqNFpIb=0)KQ#Nss_tD17;m4@$JKL;LR|K|QF3f%!L5+s(9Ft8SQ zG|~pGpEGFW5Z|OA)-O@mNHy-g@7m8JTf?kl@vUKBGmw)Y*9sDRNr3PN!IKefWaydTe1D zjzpyzPnD3}hBNaS4aFX7=0&~I*Hu7#4au@qVBglH#-m;QFOx_`=j z{EqRY#Eh*yoWP^pa4H>8GH{rO?!_+xwL0(k4yL^D%^nBkJ*UI;Lx;ped8d|f*S_s@ z3~ilcRC(&NT#9Gn#UD;o^EYSMXDMf%XcUi3>;WXXD-QX3P9wMyP7eA&RS{)h5{??W3^Rq=goFJ>?lA~J- zdYe>!xvYLW*fPT0RK7wsJRg^?x#W1*GP9_f`6t>QD_X>0d!owyN>nO2?U5}|3?hX_UZYT@^>S!9eB~bZ9U`q;`U)@L670o1g z`Hd}h<_WRvUc|n*%v4Hbb-4tJD40iyF^q%g*&!6>hkYDvi-{Uc4yTM zzcthN4Z{ka!+F_KzYV#yWi;c^X^q6g`pD8cp?$Kl?hCz0s^a|mH%P!CF%*<6k^~i` zT5Mi-t5-frUcHkk^Qh}+N)Kz1&Bi95`oNc|quI>tUi~BY>xcF9(%tv2i{G6kE9*q~ qCoAGl20`)w0rdgp9H%Q=M5|p`hOhFz6$I%Y&ncY8>c?7PXyh+SL&XXJ literal 0 HcmV?d00001 diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/purebasic.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/purebasic.css new file mode 100644 index 00000000..5ce9b9e0 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/purebasic.css @@ -0,0 +1,96 @@ +/* + +PureBASIC native IDE style ( version 1.0 - April 2016 ) + +by Tristano Ajmone + +Public Domain + +NOTE_1: PureBASIC code syntax highlighting only applies the following classes: + .hljs-comment + .hljs-function + .hljs-keywords + .hljs-string + .hljs-symbol + + Other classes are added here for the benefit of styling other languages with the look and feel of PureBASIC native IDE style. + If you need to customize a stylesheet for PureBASIC only, remove all non-relevant classes -- PureBASIC-related classes are followed by + a "--- used for PureBASIC ... ---" comment on same line. + +NOTE_2: Color names provided in comments were derived using "Name that Color" online tool: + http://chir.ag/projects/name-that-color +*/ + +.hljs { /* Common set of rules required by highlight.js (don'r remove!) */ + display: block; + overflow-x: auto; + padding: 0.5em; + background: #FFFFDF; /* Half and Half (approx.) */ +/* --- Uncomment to add PureBASIC native IDE styled font! + font-family: Consolas; +*/ +} + +.hljs, /* --- used for PureBASIC base color --- */ +.hljs-type, /* --- used for PureBASIC Procedures return type --- */ +.hljs-function, /* --- used for wrapping PureBASIC Procedures definitions --- */ +.hljs-name, +.hljs-number, +.hljs-attr, +.hljs-params, +.hljs-subst { + color: #000000; /* Black */ +} + +.hljs-comment, /* --- used for PureBASIC Comments --- */ +.hljs-regexp, +.hljs-section, +.hljs-selector-pseudo, +.hljs-addition { + color: #00AAAA; /* Persian Green (approx.) */ +} + +.hljs-title, /* --- used for PureBASIC Procedures Names --- */ +.hljs-tag, +.hljs-variable, +.hljs-code { + color: #006666; /* Blue Stone (approx.) */ +} + +.hljs-keyword, /* --- used for PureBASIC Keywords --- */ +.hljs-class, +.hljs-meta-keyword, +.hljs-selector-class, +.hljs-built_in, +.hljs-builtin-name { + color: #006666; /* Blue Stone (approx.) */ + font-weight: bold; +} + +.hljs-string, /* --- used for PureBASIC Strings --- */ +.hljs-selector-attr { + color: #0080FF; /* Azure Radiance (approx.) */ +} + +.hljs-symbol, /* --- used for PureBASIC Constants --- */ +.hljs-link, +.hljs-deletion, +.hljs-attribute { + color: #924B72; /* Cannon Pink (approx.) */ +} + +.hljs-meta, +.hljs-literal, +.hljs-selector-id { + color: #924B72; /* Cannon Pink (approx.) */ + font-weight: bold; +} + +.hljs-strong, +.hljs-name { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/qtcreator_dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/qtcreator_dark.css new file mode 100644 index 00000000..7aa56a36 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/qtcreator_dark.css @@ -0,0 +1,83 @@ +/* + +Qt Creator dark color scheme + +*/ + + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000000; +} + +.hljs, +.hljs-subst, +.hljs-tag, +.hljs-title { + color: #aaaaaa; +} + +.hljs-strong, +.hljs-emphasis { + color: #a8a8a2; +} + +.hljs-bullet, +.hljs-quote, +.hljs-number, +.hljs-regexp, +.hljs-literal { + color: #ff55ff; +} + +.hljs-code +.hljs-selector-class { + color: #aaaaff; +} + +.hljs-emphasis, +.hljs-stronge, +.hljs-type { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-function, +.hljs-section, +.hljs-symbol, +.hljs-name { + color: #ffff55; +} + +.hljs-attribute { + color: #ff5555; +} + +.hljs-variable, +.hljs-params, +.hljs-class .hljs-title { + color: #8888ff; +} + +.hljs-string, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition, +.hljs-link { + color: #ff55ff; +} + +.hljs-comment, +.hljs-meta, +.hljs-deletion { + color: #55ffff; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/qtcreator_light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/qtcreator_light.css new file mode 100644 index 00000000..1efa2c66 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/qtcreator_light.css @@ -0,0 +1,83 @@ +/* + +Qt Creator light color scheme + +*/ + + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #ffffff; +} + +.hljs, +.hljs-subst, +.hljs-tag, +.hljs-title { + color: #000000; +} + +.hljs-strong, +.hljs-emphasis { + color: #000000; +} + +.hljs-bullet, +.hljs-quote, +.hljs-number, +.hljs-regexp, +.hljs-literal { + color: #000080; +} + +.hljs-code +.hljs-selector-class { + color: #800080; +} + +.hljs-emphasis, +.hljs-stronge, +.hljs-type { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-function, +.hljs-section, +.hljs-symbol, +.hljs-name { + color: #808000; +} + +.hljs-attribute { + color: #800000; +} + +.hljs-variable, +.hljs-params, +.hljs-class .hljs-title { + color: #0055AF; +} + +.hljs-string, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition, +.hljs-link { + color: #008000; +} + +.hljs-comment, +.hljs-meta, +.hljs-deletion { + color: #008000; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/railscasts.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/railscasts.css new file mode 100644 index 00000000..008cdc5b --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/railscasts.css @@ -0,0 +1,106 @@ +/* + +Railscasts-like style (c) Visoft, Inc. (Damien White) + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #232323; + color: #e6e1dc; +} + +.hljs-comment, +.hljs-quote { + color: #bc9458; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag { + color: #c26230; +} + +.hljs-string, +.hljs-number, +.hljs-regexp, +.hljs-variable, +.hljs-template-variable { + color: #a5c261; +} + +.hljs-subst { + color: #519f50; +} + +.hljs-tag, +.hljs-name { + color: #e8bf6a; +} + +.hljs-type { + color: #da4939; +} + + +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-builtin-name, +.hljs-attr, +.hljs-link { + color: #6d9cbe; +} + +.hljs-params { + color: #d0d0ff; +} + +.hljs-attribute { + color: #cda869; +} + +.hljs-meta { + color: #9b859d; +} + +.hljs-title, +.hljs-section { + color: #ffc66d; +} + +.hljs-addition { + background-color: #144212; + color: #e6e1dc; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #600; + color: #e6e1dc; + display: inline-block; + width: 100%; +} + +.hljs-selector-class { + color: #9b703f; +} + +.hljs-selector-id { + color: #8b98ab; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link { + text-decoration: underline; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/rainbow.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/rainbow.css new file mode 100644 index 00000000..905eb8ef --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/rainbow.css @@ -0,0 +1,85 @@ +/* + +Style with support for rainbow parens + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #474949; + color: #d1d9e1; +} + + +.hljs-comment, +.hljs-quote { + color: #969896; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-type, +.hljs-addition { + color: #cc99cc; +} + +.hljs-number, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #f99157; +} + +.hljs-string, +.hljs-doctag, +.hljs-regexp { + color: #8abeb7; +} + +.hljs-title, +.hljs-name, +.hljs-section, +.hljs-built_in { + color: #b5bd68; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-selector-id, +.hljs-class .hljs-title { + color: #ffcc66; +} + +.hljs-section, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-subst, +.hljs-meta, +.hljs-link { + color: #f99157; +} + +.hljs-deletion { + color: #dc322f; +} + +.hljs-formula { + background: #eee8d5; +} + +.hljs-attr, +.hljs-attribute { + color: #81a2be; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/routeros.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/routeros.css new file mode 100644 index 00000000..ebe23990 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/routeros.css @@ -0,0 +1,108 @@ +/* + + highlight.js style for Microtik RouterOS script + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #F0F0F0; +} + +/* Base color: saturation 0; */ + +.hljs, +.hljs-subst { + color: #444; +} + +.hljs-comment { + color: #888888; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + font-weight: bold; +} + +.hljs-attribute { + color: #0E9A00; +} + +.hljs-function { + color: #99069A; +} + +.hljs-builtin-name { + color: #99069A; +} + +/* User color: hue: 0 */ + +.hljs-type, +.hljs-string, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #880000; +} + +.hljs-title, +.hljs-section { + color: #880000; + font-weight: bold; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #BC6060; +} + + +/* Language color: hue: 90; */ + +.hljs-literal { + color: #78A960; +} + +.hljs-built_in, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #0C9A9A; +} + + +/* Meta color: hue: 200 */ + +.hljs-meta { + color: #1f7199; +} + +.hljs-meta-string { + color: #4d99bf; +} + + +/* Misc effects */ + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/school-book.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/school-book.css new file mode 100644 index 00000000..964b51d8 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/school-book.css @@ -0,0 +1,72 @@ +/* + +School Book style from goldblog.com.ua (c) Zaripov Yura + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 15px 0.5em 0.5em 30px; + font-size: 11px; + line-height:16px; +} + +pre{ + background:#f6f6ae url(./school-book.png); + border-top: solid 2px #d2e8b9; + border-bottom: solid 1px #d2e8b9; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal { + color:#005599; + font-weight:bold; +} + +.hljs, +.hljs-subst { + color: #3e5915; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute, +.hljs-built_in, +.hljs-builtin-name, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable, +.hljs-link { + color: #2c009f; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #e60415; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-selector-id, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/school-book.png b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/school-book.png new file mode 100644 index 0000000000000000000000000000000000000000..956e9790a0e2c079b3d568348ff3accd1d9cac30 GIT binary patch literal 486 zcmeAS@N?(olHy`uVBq!ia0y~yV7?7x3vjRjNjAS6Ga$v1?&#~tz_9*=IcwKTAYZb? zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkD0|R4)r;B4q#jQ7Ycl#YS5MfK$ z?b^fh#qmaEhFDxvyThwfhdfkOPApt1lr{NA;Vr%uzxJuVIyzm(ed_8_-0$LLU})H&o5Re&aDemE>EG#(|F^t9_pa-H z_Mf?rMVrs}-M?S|?ZdY@c6s41zy8~}@a{v&#Ea7V)wJ$+#K|u$5UvWCdFLwGac}6w{_s*=8A6L7Rfc|9gboFyt I=akR{0OLZ+qyPW_ literal 0 HcmV?d00001 diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/solarized-dark.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/solarized-dark.css new file mode 100644 index 00000000..b4c0da1f --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/solarized-dark.css @@ -0,0 +1,84 @@ +/* + +Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #002b36; + color: #839496; +} + +.hljs-comment, +.hljs-quote { + color: #586e75; +} + +/* Solarized Green */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-addition { + color: #859900; +} + +/* Solarized Cyan */ +.hljs-number, +.hljs-string, +.hljs-meta .hljs-meta-string, +.hljs-literal, +.hljs-doctag, +.hljs-regexp { + color: #2aa198; +} + +/* Solarized Blue */ +.hljs-title, +.hljs-section, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #268bd2; +} + +/* Solarized Yellow */ +.hljs-attribute, +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-class .hljs-title, +.hljs-type { + color: #b58900; +} + +/* Solarized Orange */ +.hljs-symbol, +.hljs-bullet, +.hljs-subst, +.hljs-meta, +.hljs-meta .hljs-keyword, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-link { + color: #cb4b16; +} + +/* Solarized Red */ +.hljs-built_in, +.hljs-deletion { + color: #dc322f; +} + +.hljs-formula { + background: #073642; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/solarized-light.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/solarized-light.css new file mode 100644 index 00000000..fdcfcc72 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/solarized-light.css @@ -0,0 +1,84 @@ +/* + +Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fdf6e3; + color: #657b83; +} + +.hljs-comment, +.hljs-quote { + color: #93a1a1; +} + +/* Solarized Green */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-addition { + color: #859900; +} + +/* Solarized Cyan */ +.hljs-number, +.hljs-string, +.hljs-meta .hljs-meta-string, +.hljs-literal, +.hljs-doctag, +.hljs-regexp { + color: #2aa198; +} + +/* Solarized Blue */ +.hljs-title, +.hljs-section, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #268bd2; +} + +/* Solarized Yellow */ +.hljs-attribute, +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-class .hljs-title, +.hljs-type { + color: #b58900; +} + +/* Solarized Orange */ +.hljs-symbol, +.hljs-bullet, +.hljs-subst, +.hljs-meta, +.hljs-meta .hljs-keyword, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-link { + color: #cb4b16; +} + +/* Solarized Red */ +.hljs-built_in, +.hljs-deletion { + color: #dc322f; +} + +.hljs-formula { + background: #eee8d5; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/sunburst.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/sunburst.css new file mode 100644 index 00000000..f56dd5e9 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/sunburst.css @@ -0,0 +1,102 @@ +/* + +Sunburst-like style (c) Vasily Polovnyov + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000; + color: #f8f8f8; +} + +.hljs-comment, +.hljs-quote { + color: #aeaeae; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-type { + color: #e28964; +} + +.hljs-string { + color: #65b042; +} + +.hljs-subst { + color: #daefa3; +} + +.hljs-regexp, +.hljs-link { + color: #e9c062; +} + +.hljs-title, +.hljs-section, +.hljs-tag, +.hljs-name { + color: #89bdff; +} + +.hljs-class .hljs-title, +.hljs-doctag { + text-decoration: underline; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-number { + color: #3387cc; +} + +.hljs-params, +.hljs-variable, +.hljs-template-variable { + color: #3e87e3; +} + +.hljs-attribute { + color: #cda869; +} + +.hljs-meta { + color: #8996a8; +} + +.hljs-formula { + background-color: #0e2231; + color: #f8f8f8; + font-style: italic; +} + +.hljs-addition { + background-color: #253b22; + color: #f8f8f8; +} + +.hljs-deletion { + background-color: #420e09; + color: #f8f8f8; +} + +.hljs-selector-class { + color: #9b703f; +} + +.hljs-selector-id { + color: #8b98ab; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night-blue.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night-blue.css new file mode 100644 index 00000000..78e59cc8 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night-blue.css @@ -0,0 +1,75 @@ +/* Tomorrow Night Blue Theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #7285b7; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #ff9da4; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #ffc58f; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #ffeead; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #d1f1a9; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #bbdaff; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #ebbbff; +} + +.hljs { + display: block; + overflow-x: auto; + background: #002451; + color: white; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night-bright.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night-bright.css new file mode 100644 index 00000000..e05af8ae --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night-bright.css @@ -0,0 +1,74 @@ +/* Tomorrow Night Bright Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #969896; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #d54e53; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #e78c45; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #e7c547; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #b9ca4a; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #7aa6da; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #c397d8; +} + +.hljs { + display: block; + overflow-x: auto; + background: black; + color: #eaeaea; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night-eighties.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night-eighties.css new file mode 100644 index 00000000..08fd51c7 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night-eighties.css @@ -0,0 +1,74 @@ +/* Tomorrow Night Eighties Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #999999; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #f2777a; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #f99157; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #ffcc66; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #99cc99; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #6699cc; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #cc99cc; +} + +.hljs { + display: block; + overflow-x: auto; + background: #2d2d2d; + color: #cccccc; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night.css new file mode 100644 index 00000000..ddd270a4 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow-night.css @@ -0,0 +1,75 @@ +/* Tomorrow Night Theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #969896; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #cc6666; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #de935f; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #f0c674; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #b5bd68; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #81a2be; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b294bb; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1d1f21; + color: #c5c8c6; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow.css new file mode 100644 index 00000000..026a62fe --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/tomorrow.css @@ -0,0 +1,72 @@ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #8e908c; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #c82829; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #f5871f; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #eab700; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #718c00; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #4271ae; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #8959a8; +} + +.hljs { + display: block; + overflow-x: auto; + background: white; + color: #4d4d4c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/vs.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/vs.css new file mode 100644 index 00000000..c5d07d31 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/vs.css @@ -0,0 +1,68 @@ +/* + +Visual Studio-like style based on original C# coloring by Jason Diamond + +*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: white; + color: black; +} + +.hljs-comment, +.hljs-quote, +.hljs-variable { + color: #008000; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-built_in, +.hljs-name, +.hljs-tag { + color: #00f; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-attribute, +.hljs-literal, +.hljs-template-tag, +.hljs-template-variable, +.hljs-type, +.hljs-addition { + color: #a31515; +} + +.hljs-deletion, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-meta { + color: #2b91af; +} + +.hljs-doctag { + color: #808080; +} + +.hljs-attr { + color: #f00; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link { + color: #00b0e8; +} + + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/vs2015.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/vs2015.css new file mode 100644 index 00000000..d1d9be3c --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/vs2015.css @@ -0,0 +1,115 @@ +/* + * Visual Studio 2015 dark style + * Author: Nicolas LLOBERA + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #1E1E1E; + color: #DCDCDC; +} + +.hljs-keyword, +.hljs-literal, +.hljs-symbol, +.hljs-name { + color: #569CD6; +} +.hljs-link { + color: #569CD6; + text-decoration: underline; +} + +.hljs-built_in, +.hljs-type { + color: #4EC9B0; +} + +.hljs-number, +.hljs-class { + color: #B8D7A3; +} + +.hljs-string, +.hljs-meta-string { + color: #D69D85; +} + +.hljs-regexp, +.hljs-template-tag { + color: #9A5334; +} + +.hljs-subst, +.hljs-function, +.hljs-title, +.hljs-params, +.hljs-formula { + color: #DCDCDC; +} + +.hljs-comment, +.hljs-quote { + color: #57A64A; + font-style: italic; +} + +.hljs-doctag { + color: #608B4E; +} + +.hljs-meta, +.hljs-meta-keyword, +.hljs-tag { + color: #9B9B9B; +} + +.hljs-variable, +.hljs-template-variable { + color: #BD63C5; +} + +.hljs-attr, +.hljs-attribute, +.hljs-builtin-name { + color: #9CDCFE; +} + +.hljs-section { + color: gold; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +/*.hljs-code { + font-family:'Monospace'; +}*/ + +.hljs-bullet, +.hljs-selector-tag, +.hljs-selector-id, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #D7BA7D; +} + +.hljs-addition { + background-color: #144212; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #600; + display: inline-block; + width: 100%; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/xcode.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/xcode.css new file mode 100644 index 00000000..43dddad8 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/xcode.css @@ -0,0 +1,93 @@ +/* + +XCode style (c) Angel Garcia + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fff; + color: black; +} + +.hljs-comment, +.hljs-quote { + color: #006a00; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal { + color: #aa0d91; +} + +.hljs-name { + color: #008; +} + +.hljs-variable, +.hljs-template-variable { + color: #660; +} + +.hljs-string { + color: #c41a16; +} + +.hljs-regexp, +.hljs-link { + color: #080; +} + +.hljs-title, +.hljs-tag, +.hljs-symbol, +.hljs-bullet, +.hljs-number, +.hljs-meta { + color: #1c00cf; +} + +.hljs-section, +.hljs-class .hljs-title, +.hljs-type, +.hljs-attr, +.hljs-built_in, +.hljs-builtin-name, +.hljs-params { + color: #5c2699; +} + +.hljs-attribute, +.hljs-subst { + color: #000; +} + +.hljs-formula { + background-color: #eee; + font-style: italic; +} + +.hljs-addition { + background-color: #baeeba; +} + +.hljs-deletion { + background-color: #ffc8bd; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #9b703f; +} + +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/xt256.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/xt256.css new file mode 100644 index 00000000..58df82cb --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/xt256.css @@ -0,0 +1,92 @@ + +/* + xt256.css + + Contact: initbar [at] protonmail [dot] ch + : github.com/initbar +*/ + +.hljs { + display: block; + overflow-x: auto; + color: #eaeaea; + background: #000; + padding: 0.5; +} + +.hljs-subst { + color: #eaeaea; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-builtin-name, +.hljs-type { + color: #eaeaea; +} + +.hljs-params { + color: #da0000; +} + +.hljs-literal, +.hljs-number, +.hljs-name { + color: #ff0000; + font-weight: bolder; +} + +.hljs-comment { + color: #969896; +} + +.hljs-selector-id, +.hljs-quote { + color: #00ffff; +} + +.hljs-template-variable, +.hljs-variable, +.hljs-title { + color: #00ffff; + font-weight: bold; +} + +.hljs-selector-class, +.hljs-keyword, +.hljs-symbol { + color: #fff000; +} + +.hljs-string, +.hljs-bullet { + color: #00ff00; +} + +.hljs-tag, +.hljs-section { + color: #000fff; +} + +.hljs-selector-tag { + color: #000fff; + font-weight: bold; +} + +.hljs-attribute, +.hljs-built_in, +.hljs-regexp, +.hljs-link { + color: #ff00ff; +} + +.hljs-meta { + color: #fff; + font-weight: bolder; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/zenburn.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/zenburn.css new file mode 100644 index 00000000..07be5020 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/highlight.js/styles/zenburn.css @@ -0,0 +1,80 @@ +/* + +Zenburn style from voldmar.ru (c) Vladimir Epifanov +based on dark.css by Ivan Sagalaev + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #3f3f3f; + color: #dcdcdc; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-tag { + color: #e3ceab; +} + +.hljs-template-tag { + color: #dcdcdc; +} + +.hljs-number { + color: #8cd0d3; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-attribute { + color: #efdcbc; +} + +.hljs-literal { + color: #efefaf; +} + +.hljs-subst { + color: #8f8f8f; +} + +.hljs-title, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-section, +.hljs-type { + color: #efef8f; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link { + color: #dca3a3; +} + +.hljs-deletion, +.hljs-string, +.hljs-built_in, +.hljs-builtin-name { + color: #cc9393; +} + +.hljs-addition, +.hljs-comment, +.hljs-quote, +.hljs-meta { + color: #7f9f7f; +} + + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/jstree.js b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/jstree.js new file mode 100644 index 00000000..0e59fc76 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/jstree.js @@ -0,0 +1,8681 @@ +/*globals jQuery, define, module, exports, require, window, document, postMessage */ +(function (factory) { + "use strict"; + if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } + else if(typeof module !== 'undefined' && module.exports) { + module.exports = factory(require('jquery')); + } + else { + factory(jQuery); + } +}(function ($, undefined) { + "use strict"; +/*! + * jsTree 3.3.12 + * http://jstree.com/ + * + * Copyright (c) 2014 Ivan Bozhanov (http://vakata.com) + * + * Licensed same as jquery - under the terms of the MIT License + * http://www.opensource.org/licenses/mit-license.php + */ +/*! + * if using jslint please allow for the jQuery global and use following options: + * jslint: loopfunc: true, browser: true, ass: true, bitwise: true, continue: true, nomen: true, plusplus: true, regexp: true, unparam: true, todo: true, white: true + */ +/*jshint -W083 */ + + // prevent another load? maybe there is a better way? + if($.jstree) { + return; + } + + /** + * ### jsTree core functionality + */ + + // internal variables + var instance_counter = 0, + ccp_node = false, + ccp_mode = false, + ccp_inst = false, + themes_loaded = [], + src = $('script:last').attr('src'), + document = window.document; // local variable is always faster to access then a global + + var setImmediate = window.setImmediate; + var Promise = window.Promise; + if (!setImmediate && Promise) { + // Good enough approximation of setImmediate + setImmediate = function (cb, arg) { + Promise.resolve(arg).then(cb); + }; + } + + /** + * holds all jstree related functions and variables, including the actual class and methods to create, access and manipulate instances. + * @name $.jstree + */ + $.jstree = { + /** + * specifies the jstree version in use + * @name $.jstree.version + */ + version : '3.3.12', + /** + * holds all the default options used when creating new instances + * @name $.jstree.defaults + */ + defaults : { + /** + * configure which plugins will be active on an instance. Should be an array of strings, where each element is a plugin name. The default is `[]` + * @name $.jstree.defaults.plugins + */ + plugins : [] + }, + /** + * stores all loaded jstree plugins (used internally) + * @name $.jstree.plugins + */ + plugins : {}, + path : src && src.indexOf('/') !== -1 ? src.replace(/\/[^\/]+$/,'') : '', + idregex : /[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g, + root : '#' + }; + + /** + * creates a jstree instance + * @name $.jstree.create(el [, options]) + * @param {DOMElement|jQuery|String} el the element to create the instance on, can be jQuery extended or a selector + * @param {Object} options options for this instance (extends `$.jstree.defaults`) + * @return {jsTree} the new instance + */ + $.jstree.create = function (el, options) { + var tmp = new $.jstree.core(++instance_counter), + opt = options; + options = $.extend(true, {}, $.jstree.defaults, options); + if(opt && opt.plugins) { + options.plugins = opt.plugins; + } + $.each(options.plugins, function (i, k) { + if(i !== 'core') { + tmp = tmp.plugin(k, options[k]); + } + }); + $(el).data('jstree', tmp); + tmp.init(el, options); + return tmp; + }; + /** + * remove all traces of jstree from the DOM and destroy all instances + * @name $.jstree.destroy() + */ + $.jstree.destroy = function () { + $('.jstree:jstree').jstree('destroy'); + $(document).off('.jstree'); + }; + /** + * the jstree class constructor, used only internally + * @private + * @name $.jstree.core(id) + * @param {Number} id this instance's index + */ + $.jstree.core = function (id) { + this._id = id; + this._cnt = 0; + this._wrk = null; + this._data = { + core : { + themes : { + name : false, + dots : false, + icons : false, + ellipsis : false + }, + selected : [], + last_error : {}, + working : false, + worker_queue : [], + focused : null + } + }; + }; + /** + * get a reference to an existing instance + * + * __Examples__ + * + * // provided a container with an ID of "tree", and a nested node with an ID of "branch" + * // all of there will return the same instance + * $.jstree.reference('tree'); + * $.jstree.reference('#tree'); + * $.jstree.reference($('#tree')); + * $.jstree.reference(document.getElementByID('tree')); + * $.jstree.reference('branch'); + * $.jstree.reference('#branch'); + * $.jstree.reference($('#branch')); + * $.jstree.reference(document.getElementByID('branch')); + * + * @name $.jstree.reference(needle) + * @param {DOMElement|jQuery|String} needle + * @return {jsTree|null} the instance or `null` if not found + */ + $.jstree.reference = function (needle) { + var tmp = null, + obj = null; + if(needle && needle.id && (!needle.tagName || !needle.nodeType)) { needle = needle.id; } + + if(!obj || !obj.length) { + try { obj = $(needle); } catch (ignore) { } + } + if(!obj || !obj.length) { + try { obj = $('#' + needle.replace($.jstree.idregex,'\\$&')); } catch (ignore) { } + } + if(obj && obj.length && (obj = obj.closest('.jstree')).length && (obj = obj.data('jstree'))) { + tmp = obj; + } + else { + $('.jstree').each(function () { + var inst = $(this).data('jstree'); + if(inst && inst._model.data[needle]) { + tmp = inst; + return false; + } + }); + } + return tmp; + }; + /** + * Create an instance, get an instance or invoke a command on a instance. + * + * If there is no instance associated with the current node a new one is created and `arg` is used to extend `$.jstree.defaults` for this new instance. There would be no return value (chaining is not broken). + * + * If there is an existing instance and `arg` is a string the command specified by `arg` is executed on the instance, with any additional arguments passed to the function. If the function returns a value it will be returned (chaining could break depending on function). + * + * If there is an existing instance and `arg` is not a string the instance itself is returned (similar to `$.jstree.reference`). + * + * In any other case - nothing is returned and chaining is not broken. + * + * __Examples__ + * + * $('#tree1').jstree(); // creates an instance + * $('#tree2').jstree({ plugins : [] }); // create an instance with some options + * $('#tree1').jstree('open_node', '#branch_1'); // call a method on an existing instance, passing additional arguments + * $('#tree2').jstree(); // get an existing instance (or create an instance) + * $('#tree2').jstree(true); // get an existing instance (will not create new instance) + * $('#branch_1').jstree().select_node('#branch_1'); // get an instance (using a nested element and call a method) + * + * @name $().jstree([arg]) + * @param {String|Object} arg + * @return {Mixed} + */ + $.fn.jstree = function (arg) { + // check for string argument + var is_method = (typeof arg === 'string'), + args = Array.prototype.slice.call(arguments, 1), + result = null; + if(arg === true && !this.length) { return false; } + this.each(function () { + // get the instance (if there is one) and method (if it exists) + var instance = $.jstree.reference(this), + method = is_method && instance ? instance[arg] : null; + // if calling a method, and method is available - execute on the instance + result = is_method && method ? + method.apply(instance, args) : + null; + // if there is no instance and no method is being called - create one + if(!instance && !is_method && (arg === undefined || $.isPlainObject(arg))) { + $.jstree.create(this, arg); + } + // if there is an instance and no method is called - return the instance + if( (instance && !is_method) || arg === true ) { + result = instance || false; + } + // if there was a method call which returned a result - break and return the value + if(result !== null && result !== undefined) { + return false; + } + }); + // if there was a method call with a valid return value - return that, otherwise continue the chain + return result !== null && result !== undefined ? + result : this; + }; + /** + * used to find elements containing an instance + * + * __Examples__ + * + * $('div:jstree').each(function () { + * $(this).jstree('destroy'); + * }); + * + * @name $(':jstree') + * @return {jQuery} + */ + $.expr.pseudos.jstree = $.expr.createPseudo(function(search) { + return function(a) { + return $(a).hasClass('jstree') && + $(a).data('jstree') !== undefined; + }; + }); + + /** + * stores all defaults for the core + * @name $.jstree.defaults.core + */ + $.jstree.defaults.core = { + /** + * data configuration + * + * If left as `false` the HTML inside the jstree container element is used to populate the tree (that should be an unordered list with list items). + * + * You can also pass in a HTML string or a JSON array here. + * + * It is possible to pass in a standard jQuery-like AJAX config and jstree will automatically determine if the response is JSON or HTML and use that to populate the tree. + * In addition to the standard jQuery ajax options here you can supply functions for `data` and `url`, the functions will be run in the current instance's scope and a param will be passed indicating which node is being loaded, the return value of those functions will be used. + * + * The last option is to specify a function, that function will receive the node being loaded as argument and a second param which is a function which should be called with the result. + * + * __Examples__ + * + * // AJAX + * $('#tree').jstree({ + * 'core' : { + * 'data' : { + * 'url' : '/get/children/', + * 'data' : function (node) { + * return { 'id' : node.id }; + * } + * } + * }); + * + * // direct data + * $('#tree').jstree({ + * 'core' : { + * 'data' : [ + * 'Simple root node', + * { + * 'id' : 'node_2', + * 'text' : 'Root node with options', + * 'state' : { 'opened' : true, 'selected' : true }, + * 'children' : [ { 'text' : 'Child 1' }, 'Child 2'] + * } + * ] + * } + * }); + * + * // function + * $('#tree').jstree({ + * 'core' : { + * 'data' : function (obj, callback) { + * callback.call(this, ['Root 1', 'Root 2']); + * } + * }); + * + * @name $.jstree.defaults.core.data + */ + data : false, + /** + * configure the various strings used throughout the tree + * + * You can use an object where the key is the string you need to replace and the value is your replacement. + * Another option is to specify a function which will be called with an argument of the needed string and should return the replacement. + * If left as `false` no replacement is made. + * + * __Examples__ + * + * $('#tree').jstree({ + * 'core' : { + * 'strings' : { + * 'Loading ...' : 'Please wait ...' + * } + * } + * }); + * + * @name $.jstree.defaults.core.strings + */ + strings : false, + /** + * determines what happens when a user tries to modify the structure of the tree + * If left as `false` all operations like create, rename, delete, move or copy are prevented. + * You can set this to `true` to allow all interactions or use a function to have better control. + * + * __Examples__ + * + * $('#tree').jstree({ + * 'core' : { + * 'check_callback' : function (operation, node, node_parent, node_position, more) { + * // operation can be 'create_node', 'rename_node', 'delete_node', 'move_node', 'copy_node' or 'edit' + * // in case of 'rename_node' node_position is filled with the new node name + * return operation === 'rename_node' ? true : false; + * } + * } + * }); + * + * @name $.jstree.defaults.core.check_callback + */ + check_callback : false, + /** + * a callback called with a single object parameter in the instance's scope when something goes wrong (operation prevented, ajax failed, etc) + * @name $.jstree.defaults.core.error + */ + error : $.noop, + /** + * the open / close animation duration in milliseconds - set this to `false` to disable the animation (default is `200`) + * @name $.jstree.defaults.core.animation + */ + animation : 200, + /** + * a boolean indicating if multiple nodes can be selected + * @name $.jstree.defaults.core.multiple + */ + multiple : true, + /** + * theme configuration object + * @name $.jstree.defaults.core.themes + */ + themes : { + /** + * the name of the theme to use (if left as `false` the default theme is used) + * @name $.jstree.defaults.core.themes.name + */ + name : false, + /** + * the URL of the theme's CSS file, leave this as `false` if you have manually included the theme CSS (recommended). You can set this to `true` too which will try to autoload the theme. + * @name $.jstree.defaults.core.themes.url + */ + url : false, + /** + * the location of all jstree themes - only used if `url` is set to `true` + * @name $.jstree.defaults.core.themes.dir + */ + dir : false, + /** + * a boolean indicating if connecting dots are shown + * @name $.jstree.defaults.core.themes.dots + */ + dots : true, + /** + * a boolean indicating if node icons are shown + * @name $.jstree.defaults.core.themes.icons + */ + icons : true, + /** + * a boolean indicating if node ellipsis should be shown - this only works with a fixed with on the container + * @name $.jstree.defaults.core.themes.ellipsis + */ + ellipsis : false, + /** + * a boolean indicating if the tree background is striped + * @name $.jstree.defaults.core.themes.stripes + */ + stripes : false, + /** + * a string (or boolean `false`) specifying the theme variant to use (if the theme supports variants) + * @name $.jstree.defaults.core.themes.variant + */ + variant : false, + /** + * a boolean specifying if a reponsive version of the theme should kick in on smaller screens (if the theme supports it). Defaults to `false`. + * @name $.jstree.defaults.core.themes.responsive + */ + responsive : false + }, + /** + * if left as `true` all parents of all selected nodes will be opened once the tree loads (so that all selected nodes are visible to the user) + * @name $.jstree.defaults.core.expand_selected_onload + */ + expand_selected_onload : true, + /** + * if left as `true` web workers will be used to parse incoming JSON data where possible, so that the UI will not be blocked by large requests. Workers are however about 30% slower. Defaults to `true` + * @name $.jstree.defaults.core.worker + */ + worker : true, + /** + * Force node text to plain text (and escape HTML). Defaults to `false` + * @name $.jstree.defaults.core.force_text + */ + force_text : false, + /** + * Should the node be toggled if the text is double clicked. Defaults to `true` + * @name $.jstree.defaults.core.dblclick_toggle + */ + dblclick_toggle : true, + /** + * Should the loaded nodes be part of the state. Defaults to `false` + * @name $.jstree.defaults.core.loaded_state + */ + loaded_state : false, + /** + * Should the last active node be focused when the tree container is blurred and the focused again. This helps working with screen readers. Defaults to `true` + * @name $.jstree.defaults.core.restore_focus + */ + restore_focus : true, + /** + * Force to compute and set "aria-setsize" and "aria-posinset" explicitly for each treeitem. + * Some browsers may compute incorrect elements position and produce wrong announcements for screen readers. Defaults to `false` + * @name $.jstree.defaults.core.compute_elements_positions + */ + compute_elements_positions : false, + /** + * Default keyboard shortcuts (an object where each key is the button name or combo - like 'enter', 'ctrl-space', 'p', etc and the value is the function to execute in the instance's scope) + * @name $.jstree.defaults.core.keyboard + */ + keyboard : { + 'ctrl-space': function (e) { + // aria defines space only with Ctrl + e.type = "click"; + $(e.currentTarget).trigger(e); + }, + 'enter': function (e) { + // enter + e.type = "click"; + $(e.currentTarget).trigger(e); + }, + 'left': function (e) { + // left + e.preventDefault(); + if(this.is_open(e.currentTarget)) { + this.close_node(e.currentTarget); + } + else { + var o = this.get_parent(e.currentTarget); + if(o && o.id !== $.jstree.root) { this.get_node(o, true).children('.jstree-anchor').trigger('focus'); } + } + }, + 'up': function (e) { + // up + e.preventDefault(); + var o = this.get_prev_dom(e.currentTarget); + if(o && o.length) { o.children('.jstree-anchor').trigger('focus'); } + }, + 'right': function (e) { + // right + e.preventDefault(); + if(this.is_closed(e.currentTarget)) { + this.open_node(e.currentTarget, function (o) { this.get_node(o, true).children('.jstree-anchor').trigger('focus'); }); + } + else if (this.is_open(e.currentTarget)) { + var o = this.get_node(e.currentTarget, true).children('.jstree-children')[0]; + if(o) { $(this._firstChild(o)).children('.jstree-anchor').trigger('focus'); } + } + }, + 'down': function (e) { + // down + e.preventDefault(); + var o = this.get_next_dom(e.currentTarget); + if(o && o.length) { o.children('.jstree-anchor').trigger('focus'); } + }, + '*': function (e) { + // aria defines * on numpad as open_all - not very common + this.open_all(); + }, + 'home': function (e) { + // home + e.preventDefault(); + var o = this._firstChild(this.get_container_ul()[0]); + if(o) { $(o).children('.jstree-anchor').filter(':visible').trigger('focus'); } + }, + 'end': function (e) { + // end + e.preventDefault(); + this.element.find('.jstree-anchor').filter(':visible').last().trigger('focus'); + }, + 'f2': function (e) { + // f2 - safe to include - if check_callback is false it will fail + e.preventDefault(); + this.edit(e.currentTarget); + } + } + }; + $.jstree.core.prototype = { + /** + * used to decorate an instance with a plugin. Used internally. + * @private + * @name plugin(deco [, opts]) + * @param {String} deco the plugin to decorate with + * @param {Object} opts options for the plugin + * @return {jsTree} + */ + plugin : function (deco, opts) { + var Child = $.jstree.plugins[deco]; + if(Child) { + this._data[deco] = {}; + Child.prototype = this; + return new Child(opts, this); + } + return this; + }, + /** + * initialize the instance. Used internally. + * @private + * @name init(el, optons) + * @param {DOMElement|jQuery|String} el the element we are transforming + * @param {Object} options options for this instance + * @trigger init.jstree, loading.jstree, loaded.jstree, ready.jstree, changed.jstree + */ + init : function (el, options) { + this._model = { + data : {}, + changed : [], + force_full_redraw : false, + redraw_timeout : false, + default_state : { + loaded : true, + opened : false, + selected : false, + disabled : false + } + }; + this._model.data[$.jstree.root] = { + id : $.jstree.root, + parent : null, + parents : [], + children : [], + children_d : [], + state : { loaded : false } + }; + + this.element = $(el).addClass('jstree jstree-' + this._id); + this.settings = options; + + this._data.core.ready = false; + this._data.core.loaded = false; + this._data.core.rtl = (this.element.css("direction") === "rtl"); + this.element[this._data.core.rtl ? 'addClass' : 'removeClass']("jstree-rtl"); + this.element.attr('role','tree'); + if(this.settings.core.multiple) { + this.element.attr('aria-multiselectable', true); + } + if(!this.element.attr('tabindex')) { + this.element.attr('tabindex','0'); + } + + this.bind(); + /** + * triggered after all events are bound + * @event + * @name init.jstree + */ + this.trigger("init"); + + this._data.core.original_container_html = this.element.find(" > ul > li").clone(true); + this._data.core.original_container_html + .find("li").addBack() + .contents().filter(function() { + return this.nodeType === 3 && (!this.nodeValue || /^\s+$/.test(this.nodeValue)); + }) + .remove(); + this.element.html("<"+"ul class='jstree-container-ul jstree-children' role='group'><"+"li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none'><"+"a class='jstree-anchor' role='treeitem' href='#'>" + this.get_string("Loading ...") + ""); + this.element.attr('aria-activedescendant','j' + this._id + '_loading'); + this._data.core.li_height = this.get_container_ul().children("li").first().outerHeight() || 24; + this._data.core.node = this._create_prototype_node(); + /** + * triggered after the loading text is shown and before loading starts + * @event + * @name loading.jstree + */ + this.trigger("loading"); + this.load_node($.jstree.root); + }, + /** + * destroy an instance + * @name destroy() + * @param {Boolean} keep_html if not set to `true` the container will be emptied, otherwise the current DOM elements will be kept intact + */ + destroy : function (keep_html) { + /** + * triggered before the tree is destroyed + * @event + * @name destroy.jstree + */ + this.trigger("destroy"); + if(this._wrk) { + try { + window.URL.revokeObjectURL(this._wrk); + this._wrk = null; + } + catch (ignore) { } + } + if(!keep_html) { this.element.empty(); } + this.teardown(); + }, + /** + * Create a prototype node + * @name _create_prototype_node() + * @return {DOMElement} + */ + _create_prototype_node : function () { + var _node = document.createElement('LI'), _temp1, _temp2; + _node.setAttribute('role', 'none'); + _temp1 = document.createElement('I'); + _temp1.className = 'jstree-icon jstree-ocl'; + _temp1.setAttribute('role', 'presentation'); + _node.appendChild(_temp1); + _temp1 = document.createElement('A'); + _temp1.className = 'jstree-anchor'; + _temp1.setAttribute('href','#'); + _temp1.setAttribute('tabindex','-1'); + _temp1.setAttribute('role', 'treeitem'); + _temp2 = document.createElement('I'); + _temp2.className = 'jstree-icon jstree-themeicon'; + _temp2.setAttribute('role', 'presentation'); + _temp1.appendChild(_temp2); + _node.appendChild(_temp1); + _temp1 = _temp2 = null; + + return _node; + }, + _kbevent_to_func : function (e) { + var keys = { + 8: "Backspace", 9: "Tab", 13: "Enter", 19: "Pause", 27: "Esc", + 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", 36: "Home", + 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "Print", 45: "Insert", + 46: "Delete", 96: "Numpad0", 97: "Numpad1", 98: "Numpad2", 99 : "Numpad3", + 100: "Numpad4", 101: "Numpad5", 102: "Numpad6", 103: "Numpad7", + 104: "Numpad8", 105: "Numpad9", '-13': "NumpadEnter", 112: "F1", + 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", + 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "Numlock", + 145: "Scrolllock", 16: 'Shift', 17: 'Ctrl', 18: 'Alt', + 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', + 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a', + 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', + 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o', + 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v', + 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.', + 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', + 219: '[', 220: '\\',221: ']', 222: "'", 111: '/', 106: '*', 173: '-' + }; + var parts = []; + if (e.ctrlKey) { parts.push('ctrl'); } + if (e.altKey) { parts.push('alt'); } + if (e.shiftKey) { parts.push('shift'); } + parts.push(keys[e.which] || e.which); + parts = parts.sort().join('-').toLowerCase(); + if (parts === 'shift-shift' || parts === 'ctrl-ctrl' || parts === 'alt-alt') { + return null; + } + + var kb = this.settings.core.keyboard, i, tmp; + for (i in kb) { + if (kb.hasOwnProperty(i)) { + tmp = i; + if (tmp !== '-' && tmp !== '+') { + tmp = tmp.replace('--', '-MINUS').replace('+-', '-MINUS').replace('++', '-PLUS').replace('-+', '-PLUS'); + tmp = tmp.split(/-|\+/).sort().join('-').replace('MINUS', '-').replace('PLUS', '+').toLowerCase(); + } + if (tmp === parts) { + return kb[i]; + } + } + } + return null; + }, + /** + * part of the destroying of an instance. Used internally. + * @private + * @name teardown() + */ + teardown : function () { + this.unbind(); + this.element + .removeClass('jstree') + .removeData('jstree') + .find("[class^='jstree']") + .addBack() + .attr("class", function () { return this.className.replace(/jstree[^ ]*|$/ig,''); }); + this.element = null; + }, + /** + * bind all events. Used internally. + * @private + * @name bind() + */ + bind : function () { + var word = '', + tout = null, + was_click = 0; + this.element + .on("dblclick.jstree", function (e) { + if(e.target.tagName && e.target.tagName.toLowerCase() === "input") { return true; } + if(document.selection && document.selection.empty) { + document.selection.empty(); + } + else { + if(window.getSelection) { + var sel = window.getSelection(); + try { + sel.removeAllRanges(); + sel.collapse(); + } catch (ignore) { } + } + } + }) + .on("mousedown.jstree", function (e) { + if(e.target === this.element[0]) { + e.preventDefault(); // prevent losing focus when clicking scroll arrows (FF, Chrome) + was_click = +(new Date()); // ie does not allow to prevent losing focus + } + }.bind(this)) + .on("mousedown.jstree", ".jstree-ocl", function (e) { + e.preventDefault(); // prevent any node inside from losing focus when clicking the open/close icon + }) + .on("click.jstree", ".jstree-ocl", function (e) { + this.toggle_node(e.target); + }.bind(this)) + .on("dblclick.jstree", ".jstree-anchor", function (e) { + if(e.target.tagName && e.target.tagName.toLowerCase() === "input") { return true; } + if(this.settings.core.dblclick_toggle) { + this.toggle_node(e.target); + } + }.bind(this)) + .on("click.jstree", ".jstree-anchor", function (e) { + e.preventDefault(); + if(e.currentTarget !== document.activeElement) { $(e.currentTarget).trigger('focus'); } + this.activate_node(e.currentTarget, e); + }.bind(this)) + .on('keydown.jstree', '.jstree-anchor', function (e) { + if(e.target.tagName && e.target.tagName.toLowerCase() === "input") { return true; } + if(this._data.core.rtl) { + if(e.which === 37) { e.which = 39; } + else if(e.which === 39) { e.which = 37; } + } + var f = this._kbevent_to_func(e); + if (f) { + var r = f.call(this, e); + if (r === false || r === true) { + return r; + } + } + }.bind(this)) + .on("load_node.jstree", function (e, data) { + if(data.status) { + if(data.node.id === $.jstree.root && !this._data.core.loaded) { + this._data.core.loaded = true; + if(this._firstChild(this.get_container_ul()[0])) { + this.element.attr('aria-activedescendant',this._firstChild(this.get_container_ul()[0]).id); + } + /** + * triggered after the root node is loaded for the first time + * @event + * @name loaded.jstree + */ + this.trigger("loaded"); + } + if(!this._data.core.ready) { + setTimeout(function() { + if(this.element && !this.get_container_ul().find('.jstree-loading').length) { + this._data.core.ready = true; + if(this._data.core.selected.length) { + if(this.settings.core.expand_selected_onload) { + var tmp = [], i, j; + for(i = 0, j = this._data.core.selected.length; i < j; i++) { + tmp = tmp.concat(this._model.data[this._data.core.selected[i]].parents); + } + tmp = $.vakata.array_unique(tmp); + for(i = 0, j = tmp.length; i < j; i++) { + this.open_node(tmp[i], false, 0); + } + } + this.trigger('changed', { 'action' : 'ready', 'selected' : this._data.core.selected }); + } + /** + * triggered after all nodes are finished loading + * @event + * @name ready.jstree + */ + this.trigger("ready"); + } + }.bind(this), 0); + } + } + }.bind(this)) + // quick searching when the tree is focused + .on('keypress.jstree', function (e) { + if(e.target.tagName && e.target.tagName.toLowerCase() === "input") { return true; } + if(tout) { clearTimeout(tout); } + tout = setTimeout(function () { + word = ''; + }, 500); + + var chr = String.fromCharCode(e.which).toLowerCase(), + col = this.element.find('.jstree-anchor').filter(':visible'), + ind = col.index(document.activeElement) || 0, + end = false; + word += chr; + + // match for whole word from current node down (including the current node) + if(word.length > 1) { + col.slice(ind).each(function (i, v) { + if($(v).text().toLowerCase().indexOf(word) === 0) { + $(v).trigger('focus'); + end = true; + return false; + } + }.bind(this)); + if(end) { return; } + + // match for whole word from the beginning of the tree + col.slice(0, ind).each(function (i, v) { + if($(v).text().toLowerCase().indexOf(word) === 0) { + $(v).trigger('focus'); + end = true; + return false; + } + }.bind(this)); + if(end) { return; } + } + // list nodes that start with that letter (only if word consists of a single char) + if(new RegExp('^' + chr.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') + '+$').test(word)) { + // search for the next node starting with that letter + col.slice(ind + 1).each(function (i, v) { + if($(v).text().toLowerCase().charAt(0) === chr) { + $(v).trigger('focus'); + end = true; + return false; + } + }.bind(this)); + if(end) { return; } + + // search from the beginning + col.slice(0, ind + 1).each(function (i, v) { + if($(v).text().toLowerCase().charAt(0) === chr) { + $(v).trigger('focus'); + end = true; + return false; + } + }.bind(this)); + if(end) { return; } + } + }.bind(this)) + // THEME RELATED + .on("init.jstree", function () { + var s = this.settings.core.themes; + this._data.core.themes.dots = s.dots; + this._data.core.themes.stripes = s.stripes; + this._data.core.themes.icons = s.icons; + this._data.core.themes.ellipsis = s.ellipsis; + this.set_theme(s.name || "default", s.url); + this.set_theme_variant(s.variant); + }.bind(this)) + .on("loading.jstree", function () { + this[ this._data.core.themes.dots ? "show_dots" : "hide_dots" ](); + this[ this._data.core.themes.icons ? "show_icons" : "hide_icons" ](); + this[ this._data.core.themes.stripes ? "show_stripes" : "hide_stripes" ](); + this[ this._data.core.themes.ellipsis ? "show_ellipsis" : "hide_ellipsis" ](); + }.bind(this)) + .on('blur.jstree', '.jstree-anchor', function (e) { + this._data.core.focused = null; + $(e.currentTarget).filter('.jstree-hovered').trigger('mouseleave'); + this.element.attr('tabindex', '0'); + }.bind(this)) + .on('focus.jstree', '.jstree-anchor', function (e) { + var tmp = this.get_node(e.currentTarget); + if(tmp && tmp.id) { + this._data.core.focused = tmp.id; + } + this.element.find('.jstree-hovered').not(e.currentTarget).trigger('mouseleave'); + $(e.currentTarget).trigger('mouseenter'); + this.element.attr('tabindex', '-1'); + }.bind(this)) + .on('focus.jstree', function () { + if(+(new Date()) - was_click > 500 && !this._data.core.focused && this.settings.core.restore_focus) { + was_click = 0; + var act = this.get_node(this.element.attr('aria-activedescendant'), true); + if(act) { + act.find('> .jstree-anchor').trigger('focus'); + } + } + }.bind(this)) + .on('mouseenter.jstree', '.jstree-anchor', function (e) { + this.hover_node(e.currentTarget); + }.bind(this)) + .on('mouseleave.jstree', '.jstree-anchor', function (e) { + this.dehover_node(e.currentTarget); + }.bind(this)); + }, + /** + * part of the destroying of an instance. Used internally. + * @private + * @name unbind() + */ + unbind : function () { + this.element.off('.jstree'); + $(document).off('.jstree-' + this._id); + }, + /** + * trigger an event. Used internally. + * @private + * @name trigger(ev [, data]) + * @param {String} ev the name of the event to trigger + * @param {Object} data additional data to pass with the event + */ + trigger : function (ev, data) { + if(!data) { + data = {}; + } + data.instance = this; + this.element.triggerHandler(ev.replace('.jstree','') + '.jstree', data); + }, + /** + * returns the jQuery extended instance container + * @name get_container() + * @return {jQuery} + */ + get_container : function () { + return this.element; + }, + /** + * returns the jQuery extended main UL node inside the instance container. Used internally. + * @private + * @name get_container_ul() + * @return {jQuery} + */ + get_container_ul : function () { + return this.element.children(".jstree-children").first(); + }, + /** + * gets string replacements (localization). Used internally. + * @private + * @name get_string(key) + * @param {String} key + * @return {String} + */ + get_string : function (key) { + var a = this.settings.core.strings; + if($.vakata.is_function(a)) { return a.call(this, key); } + if(a && a[key]) { return a[key]; } + return key; + }, + /** + * gets the first child of a DOM node. Used internally. + * @private + * @name _firstChild(dom) + * @param {DOMElement} dom + * @return {DOMElement} + */ + _firstChild : function (dom) { + dom = dom ? dom.firstChild : null; + while(dom !== null && dom.nodeType !== 1) { + dom = dom.nextSibling; + } + return dom; + }, + /** + * gets the next sibling of a DOM node. Used internally. + * @private + * @name _nextSibling(dom) + * @param {DOMElement} dom + * @return {DOMElement} + */ + _nextSibling : function (dom) { + dom = dom ? dom.nextSibling : null; + while(dom !== null && dom.nodeType !== 1) { + dom = dom.nextSibling; + } + return dom; + }, + /** + * gets the previous sibling of a DOM node. Used internally. + * @private + * @name _previousSibling(dom) + * @param {DOMElement} dom + * @return {DOMElement} + */ + _previousSibling : function (dom) { + dom = dom ? dom.previousSibling : null; + while(dom !== null && dom.nodeType !== 1) { + dom = dom.previousSibling; + } + return dom; + }, + /** + * get the JSON representation of a node (or the actual jQuery extended DOM node) by using any input (child DOM element, ID string, selector, etc) + * @name get_node(obj [, as_dom]) + * @param {mixed} obj + * @param {Boolean} as_dom + * @return {Object|jQuery} + */ + get_node : function (obj, as_dom) { + if(obj && obj.id) { + obj = obj.id; + } + if (obj instanceof $ && obj.length && obj[0].id) { + obj = obj[0].id; + } + var dom; + try { + if(this._model.data[obj]) { + obj = this._model.data[obj]; + } + else if(typeof obj === "string" && this._model.data[obj.replace(/^#/, '')]) { + obj = this._model.data[obj.replace(/^#/, '')]; + } + else if(typeof obj === "string" && (dom = $('#' + obj.replace($.jstree.idregex,'\\$&'), this.element)).length && this._model.data[dom.closest('.jstree-node').attr('id')]) { + obj = this._model.data[dom.closest('.jstree-node').attr('id')]; + } + else if((dom = this.element.find(obj)).length && this._model.data[dom.closest('.jstree-node').attr('id')]) { + obj = this._model.data[dom.closest('.jstree-node').attr('id')]; + } + else if((dom = this.element.find(obj)).length && dom.hasClass('jstree')) { + obj = this._model.data[$.jstree.root]; + } + else { + return false; + } + + if(as_dom) { + obj = obj.id === $.jstree.root ? this.element : $('#' + obj.id.replace($.jstree.idregex,'\\$&'), this.element); + } + return obj; + } catch (ex) { return false; } + }, + /** + * get the path to a node, either consisting of node texts, or of node IDs, optionally glued together (otherwise an array) + * @name get_path(obj [, glue, ids]) + * @param {mixed} obj the node + * @param {String} glue if you want the path as a string - pass the glue here (for example '/'), if a falsy value is supplied here, an array is returned + * @param {Boolean} ids if set to true build the path using ID, otherwise node text is used + * @return {mixed} + */ + get_path : function (obj, glue, ids) { + obj = obj.parents ? obj : this.get_node(obj); + if(!obj || obj.id === $.jstree.root || !obj.parents) { + return false; + } + var i, j, p = []; + p.push(ids ? obj.id : obj.text); + for(i = 0, j = obj.parents.length; i < j; i++) { + p.push(ids ? obj.parents[i] : this.get_text(obj.parents[i])); + } + p = p.reverse().slice(1); + return glue ? p.join(glue) : p; + }, + /** + * get the next visible node that is below the `obj` node. If `strict` is set to `true` only sibling nodes are returned. + * @name get_next_dom(obj [, strict]) + * @param {mixed} obj + * @param {Boolean} strict + * @return {jQuery} + */ + get_next_dom : function (obj, strict) { + var tmp; + obj = this.get_node(obj, true); + if(obj[0] === this.element[0]) { + tmp = this._firstChild(this.get_container_ul()[0]); + while (tmp && tmp.offsetHeight === 0) { + tmp = this._nextSibling(tmp); + } + return tmp ? $(tmp) : false; + } + if(!obj || !obj.length) { + return false; + } + if(strict) { + tmp = obj[0]; + do { + tmp = this._nextSibling(tmp); + } while (tmp && tmp.offsetHeight === 0); + return tmp ? $(tmp) : false; + } + if(obj.hasClass("jstree-open")) { + tmp = this._firstChild(obj.children('.jstree-children')[0]); + while (tmp && tmp.offsetHeight === 0) { + tmp = this._nextSibling(tmp); + } + if(tmp !== null) { + return $(tmp); + } + } + tmp = obj[0]; + do { + tmp = this._nextSibling(tmp); + } while (tmp && tmp.offsetHeight === 0); + if(tmp !== null) { + return $(tmp); + } + return obj.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first(); + }, + /** + * get the previous visible node that is above the `obj` node. If `strict` is set to `true` only sibling nodes are returned. + * @name get_prev_dom(obj [, strict]) + * @param {mixed} obj + * @param {Boolean} strict + * @return {jQuery} + */ + get_prev_dom : function (obj, strict) { + var tmp; + obj = this.get_node(obj, true); + if(obj[0] === this.element[0]) { + tmp = this.get_container_ul()[0].lastChild; + while (tmp && tmp.offsetHeight === 0) { + tmp = this._previousSibling(tmp); + } + return tmp ? $(tmp) : false; + } + if(!obj || !obj.length) { + return false; + } + if(strict) { + tmp = obj[0]; + do { + tmp = this._previousSibling(tmp); + } while (tmp && tmp.offsetHeight === 0); + return tmp ? $(tmp) : false; + } + tmp = obj[0]; + do { + tmp = this._previousSibling(tmp); + } while (tmp && tmp.offsetHeight === 0); + if(tmp !== null) { + obj = $(tmp); + while(obj.hasClass("jstree-open")) { + obj = obj.children(".jstree-children").first().children(".jstree-node:visible:last"); + } + return obj; + } + tmp = obj[0].parentNode.parentNode; + return tmp && tmp.className && tmp.className.indexOf('jstree-node') !== -1 ? $(tmp) : false; + }, + /** + * get the parent ID of a node + * @name get_parent(obj) + * @param {mixed} obj + * @return {String} + */ + get_parent : function (obj) { + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + return obj.parent; + }, + /** + * get a jQuery collection of all the children of a node (node must be rendered), returns false on error + * @name get_children_dom(obj) + * @param {mixed} obj + * @return {jQuery} + */ + get_children_dom : function (obj) { + obj = this.get_node(obj, true); + if(obj[0] === this.element[0]) { + return this.get_container_ul().children(".jstree-node"); + } + if(!obj || !obj.length) { + return false; + } + return obj.children(".jstree-children").children(".jstree-node"); + }, + /** + * checks if a node has children + * @name is_parent(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_parent : function (obj) { + obj = this.get_node(obj); + return obj && (obj.state.loaded === false || obj.children.length > 0); + }, + /** + * checks if a node is loaded (its children are available) + * @name is_loaded(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_loaded : function (obj) { + obj = this.get_node(obj); + return obj && obj.state.loaded; + }, + /** + * check if a node is currently loading (fetching children) + * @name is_loading(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_loading : function (obj) { + obj = this.get_node(obj); + return obj && obj.state && obj.state.loading; + }, + /** + * check if a node is opened + * @name is_open(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_open : function (obj) { + obj = this.get_node(obj); + return obj && obj.state.opened; + }, + /** + * check if a node is in a closed state + * @name is_closed(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_closed : function (obj) { + obj = this.get_node(obj); + return obj && this.is_parent(obj) && !obj.state.opened; + }, + /** + * check if a node has no children + * @name is_leaf(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_leaf : function (obj) { + return !this.is_parent(obj); + }, + /** + * loads a node (fetches its children using the `core.data` setting). Multiple nodes can be passed to by using an array. + * @name load_node(obj [, callback]) + * @param {mixed} obj + * @param {function} callback a function to be executed once loading is complete, the function is executed in the instance's scope and receives two arguments - the node and a boolean status + * @return {Boolean} + * @trigger load_node.jstree + */ + load_node : function (obj, callback) { + var k, l, i, j, c; + if($.vakata.is_array(obj)) { + this._load_nodes(obj.slice(), callback); + return true; + } + obj = this.get_node(obj); + if(!obj) { + if(callback) { callback.call(this, obj, false); } + return false; + } + // if(obj.state.loading) { } // the node is already loading - just wait for it to load and invoke callback? but if called implicitly it should be loaded again? + if(obj.state.loaded) { + obj.state.loaded = false; + for(i = 0, j = obj.parents.length; i < j; i++) { + this._model.data[obj.parents[i]].children_d = $.vakata.array_filter(this._model.data[obj.parents[i]].children_d, function (v) { + return $.inArray(v, obj.children_d) === -1; + }); + } + for(k = 0, l = obj.children_d.length; k < l; k++) { + if(this._model.data[obj.children_d[k]].state.selected) { + c = true; + } + delete this._model.data[obj.children_d[k]]; + } + if (c) { + this._data.core.selected = $.vakata.array_filter(this._data.core.selected, function (v) { + return $.inArray(v, obj.children_d) === -1; + }); + } + obj.children = []; + obj.children_d = []; + if(c) { + this.trigger('changed', { 'action' : 'load_node', 'node' : obj, 'selected' : this._data.core.selected }); + } + } + obj.state.failed = false; + obj.state.loading = true; + this.get_node(obj, true).addClass("jstree-loading").attr('aria-busy',true); + this._load_node(obj, function (status) { + obj = this._model.data[obj.id]; + obj.state.loading = false; + obj.state.loaded = status; + obj.state.failed = !obj.state.loaded; + var dom = this.get_node(obj, true), i = 0, j = 0, m = this._model.data, has_children = false; + for(i = 0, j = obj.children.length; i < j; i++) { + if(m[obj.children[i]] && !m[obj.children[i]].state.hidden) { + has_children = true; + break; + } + } + if(obj.state.loaded && dom && dom.length) { + dom.removeClass('jstree-closed jstree-open jstree-leaf'); + if (!has_children) { + dom.addClass('jstree-leaf'); + } + else { + if (obj.id !== '#') { + dom.addClass(obj.state.opened ? 'jstree-open' : 'jstree-closed'); + } + } + } + dom.removeClass("jstree-loading").attr('aria-busy',false); + /** + * triggered after a node is loaded + * @event + * @name load_node.jstree + * @param {Object} node the node that was loading + * @param {Boolean} status was the node loaded successfully + */ + this.trigger('load_node', { "node" : obj, "status" : status }); + if(callback) { + callback.call(this, obj, status); + } + }.bind(this)); + return true; + }, + /** + * load an array of nodes (will also load unavailable nodes as soon as they appear in the structure). Used internally. + * @private + * @name _load_nodes(nodes [, callback]) + * @param {array} nodes + * @param {function} callback a function to be executed once loading is complete, the function is executed in the instance's scope and receives one argument - the array passed to _load_nodes + */ + _load_nodes : function (nodes, callback, is_callback, force_reload) { + var r = true, + c = function () { this._load_nodes(nodes, callback, true); }, + m = this._model.data, i, j, tmp = []; + for(i = 0, j = nodes.length; i < j; i++) { + if(m[nodes[i]] && ( (!m[nodes[i]].state.loaded && !m[nodes[i]].state.failed) || (!is_callback && force_reload) )) { + if(!this.is_loading(nodes[i])) { + this.load_node(nodes[i], c); + } + r = false; + } + } + if(r) { + for(i = 0, j = nodes.length; i < j; i++) { + if(m[nodes[i]] && m[nodes[i]].state.loaded) { + tmp.push(nodes[i]); + } + } + if(callback && !callback.done) { + callback.call(this, tmp); + callback.done = true; + } + } + }, + /** + * loads all unloaded nodes + * @name load_all([obj, callback]) + * @param {mixed} obj the node to load recursively, omit to load all nodes in the tree + * @param {function} callback a function to be executed once loading all the nodes is complete, + * @trigger load_all.jstree + */ + load_all : function (obj, callback) { + if(!obj) { obj = $.jstree.root; } + obj = this.get_node(obj); + if(!obj) { return false; } + var to_load = [], + m = this._model.data, + c = m[obj.id].children_d, + i, j; + if(obj.state && !obj.state.loaded) { + to_load.push(obj.id); + } + for(i = 0, j = c.length; i < j; i++) { + if(m[c[i]] && m[c[i]].state && !m[c[i]].state.loaded) { + to_load.push(c[i]); + } + } + if(to_load.length) { + this._load_nodes(to_load, function () { + this.load_all(obj, callback); + }); + } + else { + /** + * triggered after a load_all call completes + * @event + * @name load_all.jstree + * @param {Object} node the recursively loaded node + */ + if(callback) { callback.call(this, obj); } + this.trigger('load_all', { "node" : obj }); + } + }, + /** + * handles the actual loading of a node. Used only internally. + * @private + * @name _load_node(obj [, callback]) + * @param {mixed} obj + * @param {function} callback a function to be executed once loading is complete, the function is executed in the instance's scope and receives one argument - a boolean status + * @return {Boolean} + */ + _load_node : function (obj, callback) { + var s = this.settings.core.data, t; + var notTextOrCommentNode = function notTextOrCommentNode () { + return this.nodeType !== 3 && this.nodeType !== 8; + }; + // use original HTML + if(!s) { + if(obj.id === $.jstree.root) { + return this._append_html_data(obj, this._data.core.original_container_html.clone(true), function (status) { + callback.call(this, status); + }); + } + else { + return callback.call(this, false); + } + // return callback.call(this, obj.id === $.jstree.root ? this._append_html_data(obj, this._data.core.original_container_html.clone(true)) : false); + } + if($.vakata.is_function(s)) { + return s.call(this, obj, function (d) { + if(d === false) { + callback.call(this, false); + } + else { + this[typeof d === 'string' ? '_append_html_data' : '_append_json_data'](obj, typeof d === 'string' ? $($.parseHTML(d)).filter(notTextOrCommentNode) : d, function (status) { + callback.call(this, status); + }); + } + // return d === false ? callback.call(this, false) : callback.call(this, this[typeof d === 'string' ? '_append_html_data' : '_append_json_data'](obj, typeof d === 'string' ? $(d) : d)); + }.bind(this)); + } + if(typeof s === 'object') { + if(s.url) { + s = $.extend(true, {}, s); + if($.vakata.is_function(s.url)) { + s.url = s.url.call(this, obj); + } + if($.vakata.is_function(s.data)) { + s.data = s.data.call(this, obj); + } + return $.ajax(s) + .done(function (d,t,x) { + var type = x.getResponseHeader('Content-Type'); + if((type && type.indexOf('json') !== -1) || typeof d === "object") { + return this._append_json_data(obj, d, function (status) { callback.call(this, status); }); + //return callback.call(this, this._append_json_data(obj, d)); + } + if((type && type.indexOf('html') !== -1) || typeof d === "string") { + return this._append_html_data(obj, $($.parseHTML(d)).filter(notTextOrCommentNode), function (status) { callback.call(this, status); }); + // return callback.call(this, this._append_html_data(obj, $(d))); + } + this._data.core.last_error = { 'error' : 'ajax', 'plugin' : 'core', 'id' : 'core_04', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id, 'xhr' : x }) }; + this.settings.core.error.call(this, this._data.core.last_error); + return callback.call(this, false); + }.bind(this)) + .fail(function (f) { + this._data.core.last_error = { 'error' : 'ajax', 'plugin' : 'core', 'id' : 'core_04', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id, 'xhr' : f }) }; + callback.call(this, false); + this.settings.core.error.call(this, this._data.core.last_error); + }.bind(this)); + } + if ($.vakata.is_array(s)) { + t = $.extend(true, [], s); + } else if ($.isPlainObject(s)) { + t = $.extend(true, {}, s); + } else { + t = s; + } + if(obj.id === $.jstree.root) { + return this._append_json_data(obj, t, function (status) { + callback.call(this, status); + }); + } + else { + this._data.core.last_error = { 'error' : 'nodata', 'plugin' : 'core', 'id' : 'core_05', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id }) }; + this.settings.core.error.call(this, this._data.core.last_error); + return callback.call(this, false); + } + //return callback.call(this, (obj.id === $.jstree.root ? this._append_json_data(obj, t) : false) ); + } + if(typeof s === 'string') { + if(obj.id === $.jstree.root) { + return this._append_html_data(obj, $($.parseHTML(s)).filter(notTextOrCommentNode), function (status) { + callback.call(this, status); + }); + } + else { + this._data.core.last_error = { 'error' : 'nodata', 'plugin' : 'core', 'id' : 'core_06', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id }) }; + this.settings.core.error.call(this, this._data.core.last_error); + return callback.call(this, false); + } + //return callback.call(this, (obj.id === $.jstree.root ? this._append_html_data(obj, $(s)) : false) ); + } + return callback.call(this, false); + }, + /** + * adds a node to the list of nodes to redraw. Used only internally. + * @private + * @name _node_changed(obj [, callback]) + * @param {mixed} obj + */ + _node_changed : function (obj) { + obj = this.get_node(obj); + if (obj && $.inArray(obj.id, this._model.changed) === -1) { + this._model.changed.push(obj.id); + } + }, + /** + * appends HTML content to the tree. Used internally. + * @private + * @name _append_html_data(obj, data) + * @param {mixed} obj the node to append to + * @param {String} data the HTML string to parse and append + * @trigger model.jstree, changed.jstree + */ + _append_html_data : function (dom, data, cb) { + dom = this.get_node(dom); + dom.children = []; + dom.children_d = []; + var dat = data.is('ul') ? data.children() : data, + par = dom.id, + chd = [], + dpc = [], + m = this._model.data, + p = m[par], + s = this._data.core.selected.length, + tmp, i, j; + dat.each(function (i, v) { + tmp = this._parse_model_from_html($(v), par, p.parents.concat()); + if(tmp) { + chd.push(tmp); + dpc.push(tmp); + if(m[tmp].children_d.length) { + dpc = dpc.concat(m[tmp].children_d); + } + } + }.bind(this)); + p.children = chd; + p.children_d = dpc; + for(i = 0, j = p.parents.length; i < j; i++) { + m[p.parents[i]].children_d = m[p.parents[i]].children_d.concat(dpc); + } + /** + * triggered when new data is inserted to the tree model + * @event + * @name model.jstree + * @param {Array} nodes an array of node IDs + * @param {String} parent the parent ID of the nodes + */ + this.trigger('model', { "nodes" : dpc, 'parent' : par }); + if(par !== $.jstree.root) { + this._node_changed(par); + this.redraw(); + } + else { + this.get_container_ul().children('.jstree-initial-node').remove(); + this.redraw(true); + } + if(this._data.core.selected.length !== s) { + this.trigger('changed', { 'action' : 'model', 'selected' : this._data.core.selected }); + } + cb.call(this, true); + }, + /** + * appends JSON content to the tree. Used internally. + * @private + * @name _append_json_data(obj, data) + * @param {mixed} obj the node to append to + * @param {String} data the JSON object to parse and append + * @param {Boolean} force_processing internal param - do not set + * @trigger model.jstree, changed.jstree + */ + _append_json_data : function (dom, data, cb, force_processing) { + if(this.element === null) { return; } + dom = this.get_node(dom); + dom.children = []; + dom.children_d = []; + // *%$@!!! + if(data.d) { + data = data.d; + if(typeof data === "string") { + data = JSON.parse(data); + } + } + if(!$.vakata.is_array(data)) { data = [data]; } + var w = null, + args = { + 'df' : this._model.default_state, + 'dat' : data, + 'par' : dom.id, + 'm' : this._model.data, + 't_id' : this._id, + 't_cnt' : this._cnt, + 'sel' : this._data.core.selected + }, + inst = this, + func = function (data, undefined) { + if(data.data) { data = data.data; } + var dat = data.dat, + par = data.par, + chd = [], + dpc = [], + add = [], + df = data.df, + t_id = data.t_id, + t_cnt = data.t_cnt, + m = data.m, + p = m[par], + sel = data.sel, + tmp, i, j, rslt, + parse_flat = function (d, p, ps) { + if(!ps) { ps = []; } + else { ps = ps.concat(); } + if(p) { ps.unshift(p); } + var tid = d.id.toString(), + i, j, c, e, + tmp = { + id : tid, + text : d.text || '', + icon : d.icon !== undefined ? d.icon : true, + parent : p, + parents : ps, + children : d.children || [], + children_d : d.children_d || [], + data : d.data, + state : { }, + li_attr : { id : false }, + a_attr : { href : '#' }, + original : false + }; + for(i in df) { + if(df.hasOwnProperty(i)) { + tmp.state[i] = df[i]; + } + } + if(d && d.data && d.data.jstree && d.data.jstree.icon) { + tmp.icon = d.data.jstree.icon; + } + if(tmp.icon === undefined || tmp.icon === null || tmp.icon === "") { + tmp.icon = true; + } + if(d && d.data) { + tmp.data = d.data; + if(d.data.jstree) { + for(i in d.data.jstree) { + if(d.data.jstree.hasOwnProperty(i)) { + tmp.state[i] = d.data.jstree[i]; + } + } + } + } + if(d && typeof d.state === 'object') { + for (i in d.state) { + if(d.state.hasOwnProperty(i)) { + tmp.state[i] = d.state[i]; + } + } + } + if(d && typeof d.li_attr === 'object') { + for (i in d.li_attr) { + if(d.li_attr.hasOwnProperty(i)) { + tmp.li_attr[i] = d.li_attr[i]; + } + } + } + if(!tmp.li_attr.id) { + tmp.li_attr.id = tid; + } + if(d && typeof d.a_attr === 'object') { + for (i in d.a_attr) { + if(d.a_attr.hasOwnProperty(i)) { + tmp.a_attr[i] = d.a_attr[i]; + } + } + } + if(d && d.children && d.children === true) { + tmp.state.loaded = false; + tmp.children = []; + tmp.children_d = []; + } + m[tmp.id] = tmp; + for(i = 0, j = tmp.children.length; i < j; i++) { + c = parse_flat(m[tmp.children[i]], tmp.id, ps); + e = m[c]; + tmp.children_d.push(c); + if(e.children_d.length) { + tmp.children_d = tmp.children_d.concat(e.children_d); + } + } + delete d.data; + delete d.children; + m[tmp.id].original = d; + if(tmp.state.selected) { + add.push(tmp.id); + } + return tmp.id; + }, + parse_nest = function (d, p, ps) { + if(!ps) { ps = []; } + else { ps = ps.concat(); } + if(p) { ps.unshift(p); } + var tid = false, i, j, c, e, tmp; + do { + tid = 'j' + t_id + '_' + (++t_cnt); + } while(m[tid]); + + tmp = { + id : false, + text : typeof d === 'string' ? d : '', + icon : typeof d === 'object' && d.icon !== undefined ? d.icon : true, + parent : p, + parents : ps, + children : [], + children_d : [], + data : null, + state : { }, + li_attr : { id : false }, + a_attr : { href : '#' }, + original : false + }; + for(i in df) { + if(df.hasOwnProperty(i)) { + tmp.state[i] = df[i]; + } + } + if(d && d.id) { tmp.id = d.id.toString(); } + if(d && d.text) { tmp.text = d.text; } + if(d && d.data && d.data.jstree && d.data.jstree.icon) { + tmp.icon = d.data.jstree.icon; + } + if(tmp.icon === undefined || tmp.icon === null || tmp.icon === "") { + tmp.icon = true; + } + if(d && d.data) { + tmp.data = d.data; + if(d.data.jstree) { + for(i in d.data.jstree) { + if(d.data.jstree.hasOwnProperty(i)) { + tmp.state[i] = d.data.jstree[i]; + } + } + } + } + if(d && typeof d.state === 'object') { + for (i in d.state) { + if(d.state.hasOwnProperty(i)) { + tmp.state[i] = d.state[i]; + } + } + } + if(d && typeof d.li_attr === 'object') { + for (i in d.li_attr) { + if(d.li_attr.hasOwnProperty(i)) { + tmp.li_attr[i] = d.li_attr[i]; + } + } + } + if(tmp.li_attr.id && !tmp.id) { + tmp.id = tmp.li_attr.id.toString(); + } + if(!tmp.id) { + tmp.id = tid; + } + if(!tmp.li_attr.id) { + tmp.li_attr.id = tmp.id; + } + if(d && typeof d.a_attr === 'object') { + for (i in d.a_attr) { + if(d.a_attr.hasOwnProperty(i)) { + tmp.a_attr[i] = d.a_attr[i]; + } + } + } + if(d && d.children && d.children.length) { + for(i = 0, j = d.children.length; i < j; i++) { + c = parse_nest(d.children[i], tmp.id, ps); + e = m[c]; + tmp.children.push(c); + if(e.children_d.length) { + tmp.children_d = tmp.children_d.concat(e.children_d); + } + } + tmp.children_d = tmp.children_d.concat(tmp.children); + } + if(d && d.children && d.children === true) { + tmp.state.loaded = false; + tmp.children = []; + tmp.children_d = []; + } + delete d.data; + delete d.children; + tmp.original = d; + m[tmp.id] = tmp; + if(tmp.state.selected) { + add.push(tmp.id); + } + return tmp.id; + }; + + if(dat.length && dat[0].id !== undefined && dat[0].parent !== undefined) { + // Flat JSON support (for easy import from DB): + // 1) convert to object (foreach) + for(i = 0, j = dat.length; i < j; i++) { + if(!dat[i].children) { + dat[i].children = []; + } + if(!dat[i].state) { + dat[i].state = {}; + } + m[dat[i].id.toString()] = dat[i]; + } + // 2) populate children (foreach) + for(i = 0, j = dat.length; i < j; i++) { + if (!m[dat[i].parent.toString()]) { + if (typeof inst !== "undefined") { + inst._data.core.last_error = { 'error' : 'parse', 'plugin' : 'core', 'id' : 'core_07', 'reason' : 'Node with invalid parent', 'data' : JSON.stringify({ 'id' : dat[i].id.toString(), 'parent' : dat[i].parent.toString() }) }; + inst.settings.core.error.call(inst, inst._data.core.last_error); + } + continue; + } + + m[dat[i].parent.toString()].children.push(dat[i].id.toString()); + // populate parent.children_d + p.children_d.push(dat[i].id.toString()); + } + // 3) normalize && populate parents and children_d with recursion + for(i = 0, j = p.children.length; i < j; i++) { + tmp = parse_flat(m[p.children[i]], par, p.parents.concat()); + dpc.push(tmp); + if(m[tmp].children_d.length) { + dpc = dpc.concat(m[tmp].children_d); + } + } + for(i = 0, j = p.parents.length; i < j; i++) { + m[p.parents[i]].children_d = m[p.parents[i]].children_d.concat(dpc); + } + // ?) three_state selection - p.state.selected && t - (if three_state foreach(dat => ch) -> foreach(parents) if(parent.selected) child.selected = true; + rslt = { + 'cnt' : t_cnt, + 'mod' : m, + 'sel' : sel, + 'par' : par, + 'dpc' : dpc, + 'add' : add + }; + } + else { + for(i = 0, j = dat.length; i < j; i++) { + tmp = parse_nest(dat[i], par, p.parents.concat()); + if(tmp) { + chd.push(tmp); + dpc.push(tmp); + if(m[tmp].children_d.length) { + dpc = dpc.concat(m[tmp].children_d); + } + } + } + p.children = chd; + p.children_d = dpc; + for(i = 0, j = p.parents.length; i < j; i++) { + m[p.parents[i]].children_d = m[p.parents[i]].children_d.concat(dpc); + } + rslt = { + 'cnt' : t_cnt, + 'mod' : m, + 'sel' : sel, + 'par' : par, + 'dpc' : dpc, + 'add' : add + }; + } + if(typeof window === 'undefined' || typeof window.document === 'undefined') { + postMessage(rslt); + } + else { + return rslt; + } + }, + rslt = function (rslt, worker) { + if(this.element === null) { return; } + this._cnt = rslt.cnt; + var i, m = this._model.data; + for (i in m) { + if (m.hasOwnProperty(i) && m[i].state && m[i].state.loading && rslt.mod[i]) { + rslt.mod[i].state.loading = true; + } + } + this._model.data = rslt.mod; // breaks the reference in load_node - careful + + if(worker) { + var j, a = rslt.add, r = rslt.sel, s = this._data.core.selected.slice(); + m = this._model.data; + // if selection was changed while calculating in worker + if(r.length !== s.length || $.vakata.array_unique(r.concat(s)).length !== r.length) { + // deselect nodes that are no longer selected + for(i = 0, j = r.length; i < j; i++) { + if($.inArray(r[i], a) === -1 && $.inArray(r[i], s) === -1) { + m[r[i]].state.selected = false; + } + } + // select nodes that were selected in the mean time + for(i = 0, j = s.length; i < j; i++) { + if($.inArray(s[i], r) === -1) { + m[s[i]].state.selected = true; + } + } + } + } + if(rslt.add.length) { + this._data.core.selected = this._data.core.selected.concat(rslt.add); + } + + this.trigger('model', { "nodes" : rslt.dpc, 'parent' : rslt.par }); + + if(rslt.par !== $.jstree.root) { + this._node_changed(rslt.par); + this.redraw(); + } + else { + // this.get_container_ul().children('.jstree-initial-node').remove(); + this.redraw(true); + } + if(rslt.add.length) { + this.trigger('changed', { 'action' : 'model', 'selected' : this._data.core.selected }); + } + + // If no worker, try to mimic worker behavioour, by invoking cb asynchronously + if (!worker && setImmediate) { + setImmediate(function(){ + cb.call(inst, true); + }); + } + else { + cb.call(inst, true); + } + }; + if(this.settings.core.worker && window.Blob && window.URL && window.Worker) { + try { + if(this._wrk === null) { + this._wrk = window.URL.createObjectURL( + new window.Blob( + ['self.onmessage = ' + func.toString()], + {type:"text/javascript"} + ) + ); + } + if(!this._data.core.working || force_processing) { + this._data.core.working = true; + w = new window.Worker(this._wrk); + w.onmessage = function (e) { + rslt.call(this, e.data, true); + try { w.terminate(); w = null; } catch(ignore) { } + if(this._data.core.worker_queue.length) { + this._append_json_data.apply(this, this._data.core.worker_queue.shift()); + } + else { + this._data.core.working = false; + } + }.bind(this); + if(!args.par) { + if(this._data.core.worker_queue.length) { + this._append_json_data.apply(this, this._data.core.worker_queue.shift()); + } + else { + this._data.core.working = false; + } + } + else { + w.postMessage(args); + } + } + else { + this._data.core.worker_queue.push([dom, data, cb, true]); + } + } + catch(e) { + rslt.call(this, func(args), false); + if(this._data.core.worker_queue.length) { + this._append_json_data.apply(this, this._data.core.worker_queue.shift()); + } + else { + this._data.core.working = false; + } + } + } + else { + rslt.call(this, func(args), false); + } + }, + /** + * parses a node from a jQuery object and appends them to the in memory tree model. Used internally. + * @private + * @name _parse_model_from_html(d [, p, ps]) + * @param {jQuery} d the jQuery object to parse + * @param {String} p the parent ID + * @param {Array} ps list of all parents + * @return {String} the ID of the object added to the model + */ + _parse_model_from_html : function (d, p, ps) { + if(!ps) { ps = []; } + else { ps = [].concat(ps); } + if(p) { ps.unshift(p); } + var c, e, m = this._model.data, + data = { + id : false, + text : false, + icon : true, + parent : p, + parents : ps, + children : [], + children_d : [], + data : null, + state : { }, + li_attr : { id : false }, + a_attr : { href : '#' }, + original : false + }, i, tmp, tid; + for(i in this._model.default_state) { + if(this._model.default_state.hasOwnProperty(i)) { + data.state[i] = this._model.default_state[i]; + } + } + tmp = $.vakata.attributes(d, true); + $.each(tmp, function (i, v) { + v = $.vakata.trim(v); + if(!v.length) { return true; } + data.li_attr[i] = v; + if(i === 'id') { + data.id = v.toString(); + } + }); + tmp = d.children('a').first(); + if(tmp.length) { + tmp = $.vakata.attributes(tmp, true); + $.each(tmp, function (i, v) { + v = $.vakata.trim(v); + if(v.length) { + data.a_attr[i] = v; + } + }); + } + tmp = d.children("a").first().length ? d.children("a").first().clone() : d.clone(); + tmp.children("ins, i, ul").remove(); + tmp = tmp.html(); + tmp = $('
').html(tmp); + data.text = this.settings.core.force_text ? tmp.text() : tmp.html(); + tmp = d.data(); + data.data = tmp ? $.extend(true, {}, tmp) : null; + data.state.opened = d.hasClass('jstree-open'); + data.state.selected = d.children('a').hasClass('jstree-clicked'); + data.state.disabled = d.children('a').hasClass('jstree-disabled'); + if(data.data && data.data.jstree) { + for(i in data.data.jstree) { + if(data.data.jstree.hasOwnProperty(i)) { + data.state[i] = data.data.jstree[i]; + } + } + } + tmp = d.children("a").children(".jstree-themeicon"); + if(tmp.length) { + data.icon = tmp.hasClass('jstree-themeicon-hidden') ? false : tmp.attr('rel'); + } + if(data.state.icon !== undefined) { + data.icon = data.state.icon; + } + if(data.icon === undefined || data.icon === null || data.icon === "") { + data.icon = true; + } + tmp = d.children("ul").children("li"); + do { + tid = 'j' + this._id + '_' + (++this._cnt); + } while(m[tid]); + data.id = data.li_attr.id ? data.li_attr.id.toString() : tid; + if(tmp.length) { + tmp.each(function (i, v) { + c = this._parse_model_from_html($(v), data.id, ps); + e = this._model.data[c]; + data.children.push(c); + if(e.children_d.length) { + data.children_d = data.children_d.concat(e.children_d); + } + }.bind(this)); + data.children_d = data.children_d.concat(data.children); + } + else { + if(d.hasClass('jstree-closed')) { + data.state.loaded = false; + } + } + if(data.li_attr['class']) { + data.li_attr['class'] = data.li_attr['class'].replace('jstree-closed','').replace('jstree-open',''); + } + if(data.a_attr['class']) { + data.a_attr['class'] = data.a_attr['class'].replace('jstree-clicked','').replace('jstree-disabled',''); + } + m[data.id] = data; + if(data.state.selected) { + this._data.core.selected.push(data.id); + } + return data.id; + }, + /** + * parses a node from a JSON object (used when dealing with flat data, which has no nesting of children, but has id and parent properties) and appends it to the in memory tree model. Used internally. + * @private + * @name _parse_model_from_flat_json(d [, p, ps]) + * @param {Object} d the JSON object to parse + * @param {String} p the parent ID + * @param {Array} ps list of all parents + * @return {String} the ID of the object added to the model + */ + _parse_model_from_flat_json : function (d, p, ps) { + if(!ps) { ps = []; } + else { ps = ps.concat(); } + if(p) { ps.unshift(p); } + var tid = d.id.toString(), + m = this._model.data, + df = this._model.default_state, + i, j, c, e, + tmp = { + id : tid, + text : d.text || '', + icon : d.icon !== undefined ? d.icon : true, + parent : p, + parents : ps, + children : d.children || [], + children_d : d.children_d || [], + data : d.data, + state : { }, + li_attr : { id : false }, + a_attr : { href : '#' }, + original : false + }; + for(i in df) { + if(df.hasOwnProperty(i)) { + tmp.state[i] = df[i]; + } + } + if(d && d.data && d.data.jstree && d.data.jstree.icon) { + tmp.icon = d.data.jstree.icon; + } + if(tmp.icon === undefined || tmp.icon === null || tmp.icon === "") { + tmp.icon = true; + } + if(d && d.data) { + tmp.data = d.data; + if(d.data.jstree) { + for(i in d.data.jstree) { + if(d.data.jstree.hasOwnProperty(i)) { + tmp.state[i] = d.data.jstree[i]; + } + } + } + } + if(d && typeof d.state === 'object') { + for (i in d.state) { + if(d.state.hasOwnProperty(i)) { + tmp.state[i] = d.state[i]; + } + } + } + if(d && typeof d.li_attr === 'object') { + for (i in d.li_attr) { + if(d.li_attr.hasOwnProperty(i)) { + tmp.li_attr[i] = d.li_attr[i]; + } + } + } + if(!tmp.li_attr.id) { + tmp.li_attr.id = tid; + } + if(d && typeof d.a_attr === 'object') { + for (i in d.a_attr) { + if(d.a_attr.hasOwnProperty(i)) { + tmp.a_attr[i] = d.a_attr[i]; + } + } + } + if(d && d.children && d.children === true) { + tmp.state.loaded = false; + tmp.children = []; + tmp.children_d = []; + } + m[tmp.id] = tmp; + for(i = 0, j = tmp.children.length; i < j; i++) { + c = this._parse_model_from_flat_json(m[tmp.children[i]], tmp.id, ps); + e = m[c]; + tmp.children_d.push(c); + if(e.children_d.length) { + tmp.children_d = tmp.children_d.concat(e.children_d); + } + } + delete d.data; + delete d.children; + m[tmp.id].original = d; + if(tmp.state.selected) { + this._data.core.selected.push(tmp.id); + } + return tmp.id; + }, + /** + * parses a node from a JSON object and appends it to the in memory tree model. Used internally. + * @private + * @name _parse_model_from_json(d [, p, ps]) + * @param {Object} d the JSON object to parse + * @param {String} p the parent ID + * @param {Array} ps list of all parents + * @return {String} the ID of the object added to the model + */ + _parse_model_from_json : function (d, p, ps) { + if(!ps) { ps = []; } + else { ps = ps.concat(); } + if(p) { ps.unshift(p); } + var tid = false, i, j, c, e, m = this._model.data, df = this._model.default_state, tmp; + do { + tid = 'j' + this._id + '_' + (++this._cnt); + } while(m[tid]); + + tmp = { + id : false, + text : typeof d === 'string' ? d : '', + icon : typeof d === 'object' && d.icon !== undefined ? d.icon : true, + parent : p, + parents : ps, + children : [], + children_d : [], + data : null, + state : { }, + li_attr : { id : false }, + a_attr : { href : '#' }, + original : false + }; + for(i in df) { + if(df.hasOwnProperty(i)) { + tmp.state[i] = df[i]; + } + } + if(d && d.id) { tmp.id = d.id.toString(); } + if(d && d.text) { tmp.text = d.text; } + if(d && d.data && d.data.jstree && d.data.jstree.icon) { + tmp.icon = d.data.jstree.icon; + } + if(tmp.icon === undefined || tmp.icon === null || tmp.icon === "") { + tmp.icon = true; + } + if(d && d.data) { + tmp.data = d.data; + if(d.data.jstree) { + for(i in d.data.jstree) { + if(d.data.jstree.hasOwnProperty(i)) { + tmp.state[i] = d.data.jstree[i]; + } + } + } + } + if(d && typeof d.state === 'object') { + for (i in d.state) { + if(d.state.hasOwnProperty(i)) { + tmp.state[i] = d.state[i]; + } + } + } + if(d && typeof d.li_attr === 'object') { + for (i in d.li_attr) { + if(d.li_attr.hasOwnProperty(i)) { + tmp.li_attr[i] = d.li_attr[i]; + } + } + } + if(tmp.li_attr.id && !tmp.id) { + tmp.id = tmp.li_attr.id.toString(); + } + if(!tmp.id) { + tmp.id = tid; + } + if(!tmp.li_attr.id) { + tmp.li_attr.id = tmp.id; + } + if(d && typeof d.a_attr === 'object') { + for (i in d.a_attr) { + if(d.a_attr.hasOwnProperty(i)) { + tmp.a_attr[i] = d.a_attr[i]; + } + } + } + if(d && d.children && d.children.length) { + for(i = 0, j = d.children.length; i < j; i++) { + c = this._parse_model_from_json(d.children[i], tmp.id, ps); + e = m[c]; + tmp.children.push(c); + if(e.children_d.length) { + tmp.children_d = tmp.children_d.concat(e.children_d); + } + } + tmp.children_d = tmp.children.concat(tmp.children_d); + } + if(d && d.children && d.children === true) { + tmp.state.loaded = false; + tmp.children = []; + tmp.children_d = []; + } + delete d.data; + delete d.children; + tmp.original = d; + m[tmp.id] = tmp; + if(tmp.state.selected) { + this._data.core.selected.push(tmp.id); + } + return tmp.id; + }, + /** + * redraws all nodes that need to be redrawn. Used internally. + * @private + * @name _redraw() + * @trigger redraw.jstree + */ + _redraw : function () { + var nodes = this._model.force_full_redraw ? this._model.data[$.jstree.root].children.concat([]) : this._model.changed.concat([]), + f = document.createElement('UL'), tmp, i, j, fe = this._data.core.focused; + for(i = 0, j = nodes.length; i < j; i++) { + tmp = this.redraw_node(nodes[i], true, this._model.force_full_redraw); + if(tmp && this._model.force_full_redraw) { + f.appendChild(tmp); + } + } + if(this._model.force_full_redraw) { + f.className = this.get_container_ul()[0].className; + f.setAttribute('role','group'); + this.element.empty().append(f); + //this.get_container_ul()[0].appendChild(f); + } + if(fe !== null && this.settings.core.restore_focus) { + tmp = this.get_node(fe, true); + if(tmp && tmp.length && tmp.children('.jstree-anchor')[0] !== document.activeElement) { + tmp.children('.jstree-anchor').trigger('focus'); + } + else { + this._data.core.focused = null; + } + } + this._model.force_full_redraw = false; + this._model.changed = []; + /** + * triggered after nodes are redrawn + * @event + * @name redraw.jstree + * @param {array} nodes the redrawn nodes + */ + this.trigger('redraw', { "nodes" : nodes }); + }, + /** + * redraws all nodes that need to be redrawn or optionally - the whole tree + * @name redraw([full]) + * @param {Boolean} full if set to `true` all nodes are redrawn. + */ + redraw : function (full) { + if(full) { + this._model.force_full_redraw = true; + } + //if(this._model.redraw_timeout) { + // clearTimeout(this._model.redraw_timeout); + //} + //this._model.redraw_timeout = setTimeout($.proxy(this._redraw, this),0); + this._redraw(); + }, + /** + * redraws a single node's children. Used internally. + * @private + * @name draw_children(node) + * @param {mixed} node the node whose children will be redrawn + */ + draw_children : function (node) { + var obj = this.get_node(node), + i = false, + j = false, + k = false, + d = document; + if(!obj) { return false; } + if(obj.id === $.jstree.root) { return this.redraw(true); } + node = this.get_node(node, true); + if(!node || !node.length) { return false; } // TODO: quick toggle + + node.children('.jstree-children').remove(); + node = node[0]; + if(obj.children.length && obj.state.loaded) { + k = d.createElement('UL'); + k.setAttribute('role', 'group'); + k.className = 'jstree-children'; + for(i = 0, j = obj.children.length; i < j; i++) { + k.appendChild(this.redraw_node(obj.children[i], true, true)); + } + node.appendChild(k); + } + }, + /** + * redraws a single node. Used internally. + * @private + * @name redraw_node(node, deep, is_callback, force_render) + * @param {mixed} node the node to redraw + * @param {Boolean} deep should child nodes be redrawn too + * @param {Boolean} is_callback is this a recursion call + * @param {Boolean} force_render should children of closed parents be drawn anyway + */ + redraw_node : function (node, deep, is_callback, force_render) { + var obj = this.get_node(node), + par = false, + ind = false, + old = false, + i = false, + j = false, + k = false, + c = '', + d = document, + m = this._model.data, + f = false, + s = false, + tmp = null, + t = 0, + l = 0, + has_children = false, + last_sibling = false; + if(!obj) { return false; } + if(obj.id === $.jstree.root) { return this.redraw(true); } + deep = deep || obj.children.length === 0; + node = !document.querySelector ? document.getElementById(obj.id) : this.element[0].querySelector('#' + ("0123456789".indexOf(obj.id[0]) !== -1 ? '\\3' + obj.id[0] + ' ' + obj.id.substr(1).replace($.jstree.idregex,'\\$&') : obj.id.replace($.jstree.idregex,'\\$&')) ); //, this.element); + if(!node) { + deep = true; + //node = d.createElement('LI'); + if(!is_callback) { + par = obj.parent !== $.jstree.root ? $('#' + obj.parent.replace($.jstree.idregex,'\\$&'), this.element)[0] : null; + if(par !== null && (!par || !m[obj.parent].state.opened)) { + return false; + } + ind = $.inArray(obj.id, par === null ? m[$.jstree.root].children : m[obj.parent].children); + } + } + else { + node = $(node); + if(!is_callback) { + par = node.parent().parent()[0]; + if(par === this.element[0]) { + par = null; + } + ind = node.index(); + } + // m[obj.id].data = node.data(); // use only node's data, no need to touch jquery storage + if(!deep && obj.children.length && !node.children('.jstree-children').length) { + deep = true; + } + if(!deep) { + old = node.children('.jstree-children')[0]; + } + f = node.children('.jstree-anchor')[0] === document.activeElement; + node.remove(); + //node = d.createElement('LI'); + //node = node[0]; + } + node = this._data.core.node.cloneNode(true); + // node is DOM, deep is boolean + + c = 'jstree-node '; + for(i in obj.li_attr) { + if(obj.li_attr.hasOwnProperty(i)) { + if(i === 'id') { continue; } + if(i !== 'class') { + node.setAttribute(i, obj.li_attr[i]); + } + else { + c += obj.li_attr[i]; + } + } + } + if(!obj.a_attr.id) { + obj.a_attr.id = obj.id + '_anchor'; + } + node.childNodes[1].setAttribute('aria-selected', !!obj.state.selected); + node.childNodes[1].setAttribute('aria-level', obj.parents.length); + if(this.settings.core.compute_elements_positions) { + node.childNodes[1].setAttribute('aria-setsize', m[obj.parent].children.length); + node.childNodes[1].setAttribute('aria-posinset', m[obj.parent].children.indexOf(obj.id) + 1); + } + if(obj.state.disabled) { + node.childNodes[1].setAttribute('aria-disabled', true); + } + + for(i = 0, j = obj.children.length; i < j; i++) { + if(!m[obj.children[i]].state.hidden) { + has_children = true; + break; + } + } + if(obj.parent !== null && m[obj.parent] && !obj.state.hidden) { + i = $.inArray(obj.id, m[obj.parent].children); + last_sibling = obj.id; + if(i !== -1) { + i++; + for(j = m[obj.parent].children.length; i < j; i++) { + if(!m[m[obj.parent].children[i]].state.hidden) { + last_sibling = m[obj.parent].children[i]; + } + if(last_sibling !== obj.id) { + break; + } + } + } + } + + if(obj.state.hidden) { + c += ' jstree-hidden'; + } + if (obj.state.loading) { + c += ' jstree-loading'; + } + if(obj.state.loaded && !has_children) { + c += ' jstree-leaf'; + } + else { + c += obj.state.opened && obj.state.loaded ? ' jstree-open' : ' jstree-closed'; + node.childNodes[1].setAttribute('aria-expanded', (obj.state.opened && obj.state.loaded) ); + } + if(last_sibling === obj.id) { + c += ' jstree-last'; + } + node.id = obj.id; + node.className = c; + c = ( obj.state.selected ? ' jstree-clicked' : '') + ( obj.state.disabled ? ' jstree-disabled' : ''); + for(j in obj.a_attr) { + if(obj.a_attr.hasOwnProperty(j)) { + if(j === 'href' && obj.a_attr[j] === '#') { continue; } + if(j !== 'class') { + node.childNodes[1].setAttribute(j, obj.a_attr[j]); + } + else { + c += ' ' + obj.a_attr[j]; + } + } + } + if(c.length) { + node.childNodes[1].className = 'jstree-anchor ' + c; + } + if((obj.icon && obj.icon !== true) || obj.icon === false) { + if(obj.icon === false) { + node.childNodes[1].childNodes[0].className += ' jstree-themeicon-hidden'; + } + else if(obj.icon.indexOf('/') === -1 && obj.icon.indexOf('.') === -1) { + node.childNodes[1].childNodes[0].className += ' ' + obj.icon + ' jstree-themeicon-custom'; + } + else { + node.childNodes[1].childNodes[0].style.backgroundImage = 'url("'+obj.icon+'")'; + node.childNodes[1].childNodes[0].style.backgroundPosition = 'center center'; + node.childNodes[1].childNodes[0].style.backgroundSize = 'auto'; + node.childNodes[1].childNodes[0].className += ' jstree-themeicon-custom'; + } + } + + if(this.settings.core.force_text) { + node.childNodes[1].appendChild(d.createTextNode(obj.text)); + } + else { + node.childNodes[1].innerHTML += obj.text; + } + + + if(deep && obj.children.length && (obj.state.opened || force_render) && obj.state.loaded) { + k = d.createElement('UL'); + k.setAttribute('role', 'group'); + k.className = 'jstree-children'; + for(i = 0, j = obj.children.length; i < j; i++) { + k.appendChild(this.redraw_node(obj.children[i], deep, true)); + } + node.appendChild(k); + } + if(old) { + node.appendChild(old); + } + if(!is_callback) { + // append back using par / ind + if(!par) { + par = this.element[0]; + } + for(i = 0, j = par.childNodes.length; i < j; i++) { + if(par.childNodes[i] && par.childNodes[i].className && par.childNodes[i].className.indexOf('jstree-children') !== -1) { + tmp = par.childNodes[i]; + break; + } + } + if(!tmp) { + tmp = d.createElement('UL'); + tmp.setAttribute('role', 'group'); + tmp.className = 'jstree-children'; + par.appendChild(tmp); + } + par = tmp; + + if(ind < par.childNodes.length) { + par.insertBefore(node, par.childNodes[ind]); + } + else { + par.appendChild(node); + } + if(f) { + t = this.element[0].scrollTop; + l = this.element[0].scrollLeft; + node.childNodes[1].focus(); + this.element[0].scrollTop = t; + this.element[0].scrollLeft = l; + } + } + if(obj.state.opened && !obj.state.loaded) { + obj.state.opened = false; + setTimeout(function () { + this.open_node(obj.id, false, 0); + }.bind(this), 0); + } + return node; + }, + /** + * opens a node, revealing its children. If the node is not loaded it will be loaded and opened once ready. + * @name open_node(obj [, callback, animation]) + * @param {mixed} obj the node to open + * @param {Function} callback a function to execute once the node is opened + * @param {Number} animation the animation duration in milliseconds when opening the node (overrides the `core.animation` setting). Use `false` for no animation. + * @trigger open_node.jstree, after_open.jstree, before_open.jstree + */ + open_node : function (obj, callback, animation) { + var t1, t2, d, t; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.open_node(obj[t1], callback, animation); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + animation = animation === undefined ? this.settings.core.animation : animation; + if(!this.is_closed(obj)) { + if(callback) { + callback.call(this, obj, false); + } + return false; + } + if(!this.is_loaded(obj)) { + if(this.is_loading(obj)) { + return setTimeout(function () { + this.open_node(obj, callback, animation); + }.bind(this), 500); + } + this.load_node(obj, function (o, ok) { + return ok ? this.open_node(o, callback, animation) : (callback ? callback.call(this, o, false) : false); + }); + } + else { + d = this.get_node(obj, true); + t = this; + if(d.length) { + if(animation && d.children(".jstree-children").length) { + d.children(".jstree-children").stop(true, true); + } + if(obj.children.length && !this._firstChild(d.children('.jstree-children')[0])) { + this.draw_children(obj); + //d = this.get_node(obj, true); + } + if(!animation) { + this.trigger('before_open', { "node" : obj }); + d[0].className = d[0].className.replace('jstree-closed', 'jstree-open'); + d[0].childNodes[1].setAttribute("aria-expanded", true); + } + else { + this.trigger('before_open', { "node" : obj }); + d + .children(".jstree-children").css("display","none").end() + .removeClass("jstree-closed").addClass("jstree-open") + .children('.jstree-anchor').attr("aria-expanded", true).end() + .children(".jstree-children").stop(true, true) + .slideDown(animation, function () { + this.style.display = ""; + if (t.element) { + t.trigger("after_open", { "node" : obj }); + } + }); + } + } + obj.state.opened = true; + if(callback) { + callback.call(this, obj, true); + } + if(!d.length) { + /** + * triggered when a node is about to be opened (if the node is supposed to be in the DOM, it will be, but it won't be visible yet) + * @event + * @name before_open.jstree + * @param {Object} node the opened node + */ + this.trigger('before_open', { "node" : obj }); + } + /** + * triggered when a node is opened (if there is an animation it will not be completed yet) + * @event + * @name open_node.jstree + * @param {Object} node the opened node + */ + this.trigger('open_node', { "node" : obj }); + if(!animation || !d.length) { + /** + * triggered when a node is opened and the animation is complete + * @event + * @name after_open.jstree + * @param {Object} node the opened node + */ + this.trigger("after_open", { "node" : obj }); + } + return true; + } + }, + /** + * opens every parent of a node (node should be loaded) + * @name _open_to(obj) + * @param {mixed} obj the node to reveal + * @private + */ + _open_to : function (obj) { + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + var i, j, p = obj.parents; + for(i = 0, j = p.length; i < j; i+=1) { + if(i !== $.jstree.root) { + this.open_node(p[i], false, 0); + } + } + return $('#' + obj.id.replace($.jstree.idregex,'\\$&'), this.element); + }, + /** + * closes a node, hiding its children + * @name close_node(obj [, animation]) + * @param {mixed} obj the node to close + * @param {Number} animation the animation duration in milliseconds when closing the node (overrides the `core.animation` setting). Use `false` for no animation. + * @trigger close_node.jstree, after_close.jstree + */ + close_node : function (obj, animation) { + var t1, t2, t, d; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.close_node(obj[t1], animation); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + if(this.is_closed(obj)) { + return false; + } + animation = animation === undefined ? this.settings.core.animation : animation; + t = this; + d = this.get_node(obj, true); + + obj.state.opened = false; + /** + * triggered when a node is closed (if there is an animation it will not be complete yet) + * @event + * @name close_node.jstree + * @param {Object} node the closed node + */ + this.trigger('close_node',{ "node" : obj }); + if(!d.length) { + /** + * triggered when a node is closed and the animation is complete + * @event + * @name after_close.jstree + * @param {Object} node the closed node + */ + this.trigger("after_close", { "node" : obj }); + } + else { + if(!animation) { + d[0].className = d[0].className.replace('jstree-open', 'jstree-closed'); + d.children('.jstree-anchor').attr("aria-expanded", false); + d.children('.jstree-children').remove(); + this.trigger("after_close", { "node" : obj }); + } + else { + d + .children(".jstree-children").attr("style","display:block !important").end() + .removeClass("jstree-open").addClass("jstree-closed") + .children('.jstree-anchor').attr("aria-expanded", false).end() + .children(".jstree-children").stop(true, true).slideUp(animation, function () { + this.style.display = ""; + d.children('.jstree-children').remove(); + if (t.element) { + t.trigger("after_close", { "node" : obj }); + } + }); + } + } + }, + /** + * toggles a node - closing it if it is open, opening it if it is closed + * @name toggle_node(obj) + * @param {mixed} obj the node to toggle + */ + toggle_node : function (obj) { + var t1, t2; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.toggle_node(obj[t1]); + } + return true; + } + if(this.is_closed(obj)) { + return this.open_node(obj); + } + if(this.is_open(obj)) { + return this.close_node(obj); + } + }, + /** + * opens all nodes within a node (or the tree), revealing their children. If the node is not loaded it will be loaded and opened once ready. + * @name open_all([obj, animation, original_obj]) + * @param {mixed} obj the node to open recursively, omit to open all nodes in the tree + * @param {Number} animation the animation duration in milliseconds when opening the nodes, the default is no animation + * @param {jQuery} reference to the node that started the process (internal use) + * @trigger open_all.jstree + */ + open_all : function (obj, animation, original_obj) { + if(!obj) { obj = $.jstree.root; } + obj = this.get_node(obj); + if(!obj) { return false; } + var dom = obj.id === $.jstree.root ? this.get_container_ul() : this.get_node(obj, true), i, j, _this; + if(!dom.length) { + for(i = 0, j = obj.children_d.length; i < j; i++) { + if(this.is_closed(this._model.data[obj.children_d[i]])) { + this._model.data[obj.children_d[i]].state.opened = true; + } + } + return this.trigger('open_all', { "node" : obj }); + } + original_obj = original_obj || dom; + _this = this; + dom = this.is_closed(obj) ? dom.find('.jstree-closed').addBack() : dom.find('.jstree-closed'); + dom.each(function () { + _this.open_node( + this, + function(node, status) { if(status && this.is_parent(node)) { this.open_all(node, animation, original_obj); } }, + animation || 0 + ); + }); + if(original_obj.find('.jstree-closed').length === 0) { + /** + * triggered when an `open_all` call completes + * @event + * @name open_all.jstree + * @param {Object} node the opened node + */ + this.trigger('open_all', { "node" : this.get_node(original_obj) }); + } + }, + /** + * closes all nodes within a node (or the tree), revealing their children + * @name close_all([obj, animation]) + * @param {mixed} obj the node to close recursively, omit to close all nodes in the tree + * @param {Number} animation the animation duration in milliseconds when closing the nodes, the default is no animation + * @trigger close_all.jstree + */ + close_all : function (obj, animation) { + if(!obj) { obj = $.jstree.root; } + obj = this.get_node(obj); + if(!obj) { return false; } + var dom = obj.id === $.jstree.root ? this.get_container_ul() : this.get_node(obj, true), + _this = this, i, j; + if(dom.length) { + dom = this.is_open(obj) ? dom.find('.jstree-open').addBack() : dom.find('.jstree-open'); + $(dom.get().reverse()).each(function () { _this.close_node(this, animation || 0); }); + } + for(i = 0, j = obj.children_d.length; i < j; i++) { + this._model.data[obj.children_d[i]].state.opened = false; + } + /** + * triggered when an `close_all` call completes + * @event + * @name close_all.jstree + * @param {Object} node the closed node + */ + this.trigger('close_all', { "node" : obj }); + }, + /** + * checks if a node is disabled (not selectable) + * @name is_disabled(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_disabled : function (obj) { + obj = this.get_node(obj); + return obj && obj.state && obj.state.disabled; + }, + /** + * enables a node - so that it can be selected + * @name enable_node(obj) + * @param {mixed} obj the node to enable + * @trigger enable_node.jstree + */ + enable_node : function (obj) { + var t1, t2; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.enable_node(obj[t1]); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + obj.state.disabled = false; + this.get_node(obj,true).children('.jstree-anchor').removeClass('jstree-disabled').attr('aria-disabled', false); + /** + * triggered when an node is enabled + * @event + * @name enable_node.jstree + * @param {Object} node the enabled node + */ + this.trigger('enable_node', { 'node' : obj }); + }, + /** + * disables a node - so that it can not be selected + * @name disable_node(obj) + * @param {mixed} obj the node to disable + * @trigger disable_node.jstree + */ + disable_node : function (obj) { + var t1, t2; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.disable_node(obj[t1]); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + obj.state.disabled = true; + this.get_node(obj,true).children('.jstree-anchor').addClass('jstree-disabled').attr('aria-disabled', true); + /** + * triggered when an node is disabled + * @event + * @name disable_node.jstree + * @param {Object} node the disabled node + */ + this.trigger('disable_node', { 'node' : obj }); + }, + /** + * determines if a node is hidden + * @name is_hidden(obj) + * @param {mixed} obj the node + */ + is_hidden : function (obj) { + obj = this.get_node(obj); + return obj.state.hidden === true; + }, + /** + * hides a node - it is still in the structure but will not be visible + * @name hide_node(obj) + * @param {mixed} obj the node to hide + * @param {Boolean} skip_redraw internal parameter controlling if redraw is called + * @trigger hide_node.jstree + */ + hide_node : function (obj, skip_redraw) { + var t1, t2; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.hide_node(obj[t1], true); + } + if (!skip_redraw) { + this.redraw(); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + if(!obj.state.hidden) { + obj.state.hidden = true; + this._node_changed(obj.parent); + if(!skip_redraw) { + this.redraw(); + } + /** + * triggered when an node is hidden + * @event + * @name hide_node.jstree + * @param {Object} node the hidden node + */ + this.trigger('hide_node', { 'node' : obj }); + } + }, + /** + * shows a node + * @name show_node(obj) + * @param {mixed} obj the node to show + * @param {Boolean} skip_redraw internal parameter controlling if redraw is called + * @trigger show_node.jstree + */ + show_node : function (obj, skip_redraw) { + var t1, t2; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.show_node(obj[t1], true); + } + if (!skip_redraw) { + this.redraw(); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + if(obj.state.hidden) { + obj.state.hidden = false; + this._node_changed(obj.parent); + if(!skip_redraw) { + this.redraw(); + } + /** + * triggered when an node is shown + * @event + * @name show_node.jstree + * @param {Object} node the shown node + */ + this.trigger('show_node', { 'node' : obj }); + } + }, + /** + * hides all nodes + * @name hide_all() + * @trigger hide_all.jstree + */ + hide_all : function (skip_redraw) { + var i, m = this._model.data, ids = []; + for(i in m) { + if(m.hasOwnProperty(i) && i !== $.jstree.root && !m[i].state.hidden) { + m[i].state.hidden = true; + ids.push(i); + } + } + this._model.force_full_redraw = true; + if(!skip_redraw) { + this.redraw(); + } + /** + * triggered when all nodes are hidden + * @event + * @name hide_all.jstree + * @param {Array} nodes the IDs of all hidden nodes + */ + this.trigger('hide_all', { 'nodes' : ids }); + return ids; + }, + /** + * shows all nodes + * @name show_all() + * @trigger show_all.jstree + */ + show_all : function (skip_redraw) { + var i, m = this._model.data, ids = []; + for(i in m) { + if(m.hasOwnProperty(i) && i !== $.jstree.root && m[i].state.hidden) { + m[i].state.hidden = false; + ids.push(i); + } + } + this._model.force_full_redraw = true; + if(!skip_redraw) { + this.redraw(); + } + /** + * triggered when all nodes are shown + * @event + * @name show_all.jstree + * @param {Array} nodes the IDs of all shown nodes + */ + this.trigger('show_all', { 'nodes' : ids }); + return ids; + }, + /** + * called when a node is selected by the user. Used internally. + * @private + * @name activate_node(obj, e) + * @param {mixed} obj the node + * @param {Object} e the related event + * @trigger activate_node.jstree, changed.jstree + */ + activate_node : function (obj, e) { + if(this.is_disabled(obj)) { + return false; + } + if(!e || typeof e !== 'object') { + e = {}; + } + + // ensure last_clicked is still in the DOM, make it fresh (maybe it was moved?) and make sure it is still selected, if not - make last_clicked the last selected node + this._data.core.last_clicked = this._data.core.last_clicked && this._data.core.last_clicked.id !== undefined ? this.get_node(this._data.core.last_clicked.id) : null; + if(this._data.core.last_clicked && !this._data.core.last_clicked.state.selected) { this._data.core.last_clicked = null; } + if(!this._data.core.last_clicked && this._data.core.selected.length) { this._data.core.last_clicked = this.get_node(this._data.core.selected[this._data.core.selected.length - 1]); } + + if(!this.settings.core.multiple || (!e.metaKey && !e.ctrlKey && !e.shiftKey) || (e.shiftKey && (!this._data.core.last_clicked || !this.get_parent(obj) || this.get_parent(obj) !== this._data.core.last_clicked.parent ) )) { + if(!this.settings.core.multiple && (e.metaKey || e.ctrlKey || e.shiftKey) && this.is_selected(obj)) { + this.deselect_node(obj, false, e); + } + else { + this.deselect_all(true); + this.select_node(obj, false, false, e); + this._data.core.last_clicked = this.get_node(obj); + } + } + else { + if(e.shiftKey) { + var o = this.get_node(obj).id, + l = this._data.core.last_clicked.id, + p = this.get_node(this._data.core.last_clicked.parent).children, + c = false, + i, j; + for(i = 0, j = p.length; i < j; i += 1) { + // separate IFs work whem o and l are the same + if(p[i] === o) { + c = !c; + } + if(p[i] === l) { + c = !c; + } + if(!this.is_disabled(p[i]) && (c || p[i] === o || p[i] === l)) { + if (!this.is_hidden(p[i])) { + this.select_node(p[i], true, false, e); + } + } + else { + this.deselect_node(p[i], true, e); + } + } + this.trigger('changed', { 'action' : 'select_node', 'node' : this.get_node(obj), 'selected' : this._data.core.selected, 'event' : e }); + } + else { + if(!this.is_selected(obj)) { + this.select_node(obj, false, false, e); + } + else { + this.deselect_node(obj, false, e); + } + } + } + /** + * triggered when an node is clicked or intercated with by the user + * @event + * @name activate_node.jstree + * @param {Object} node + * @param {Object} event the ooriginal event (if any) which triggered the call (may be an empty object) + */ + this.trigger('activate_node', { 'node' : this.get_node(obj), 'event' : e }); + }, + /** + * applies the hover state on a node, called when a node is hovered by the user. Used internally. + * @private + * @name hover_node(obj) + * @param {mixed} obj + * @trigger hover_node.jstree + */ + hover_node : function (obj) { + obj = this.get_node(obj, true); + if(!obj || !obj.length || obj.children('.jstree-hovered').length) { + return false; + } + var o = this.element.find('.jstree-hovered'), t = this.element; + if(o && o.length) { this.dehover_node(o); } + + obj.children('.jstree-anchor').addClass('jstree-hovered'); + /** + * triggered when an node is hovered + * @event + * @name hover_node.jstree + * @param {Object} node + */ + this.trigger('hover_node', { 'node' : this.get_node(obj) }); + setTimeout(function () { t.attr('aria-activedescendant', obj[0].id); }, 0); + }, + /** + * removes the hover state from a nodecalled when a node is no longer hovered by the user. Used internally. + * @private + * @name dehover_node(obj) + * @param {mixed} obj + * @trigger dehover_node.jstree + */ + dehover_node : function (obj) { + obj = this.get_node(obj, true); + if(!obj || !obj.length || !obj.children('.jstree-hovered').length) { + return false; + } + obj.children('.jstree-anchor').removeClass('jstree-hovered'); + /** + * triggered when an node is no longer hovered + * @event + * @name dehover_node.jstree + * @param {Object} node + */ + this.trigger('dehover_node', { 'node' : this.get_node(obj) }); + }, + /** + * select a node + * @name select_node(obj [, supress_event, prevent_open]) + * @param {mixed} obj an array can be used to select multiple nodes + * @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered + * @param {Boolean} prevent_open if set to `true` parents of the selected node won't be opened + * @trigger select_node.jstree, changed.jstree + */ + select_node : function (obj, supress_event, prevent_open, e) { + var dom, t1, t2, th; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.select_node(obj[t1], supress_event, prevent_open, e); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + dom = this.get_node(obj, true); + if(!obj.state.selected) { + obj.state.selected = true; + this._data.core.selected.push(obj.id); + if(!prevent_open) { + dom = this._open_to(obj); + } + if(dom && dom.length) { + dom.children('.jstree-anchor').addClass('jstree-clicked').attr('aria-selected', true); + } + /** + * triggered when an node is selected + * @event + * @name select_node.jstree + * @param {Object} node + * @param {Array} selected the current selection + * @param {Object} event the event (if any) that triggered this select_node + */ + this.trigger('select_node', { 'node' : obj, 'selected' : this._data.core.selected, 'event' : e }); + if(!supress_event) { + /** + * triggered when selection changes + * @event + * @name changed.jstree + * @param {Object} node + * @param {Object} action the action that caused the selection to change + * @param {Array} selected the current selection + * @param {Object} event the event (if any) that triggered this changed event + */ + this.trigger('changed', { 'action' : 'select_node', 'node' : obj, 'selected' : this._data.core.selected, 'event' : e }); + } + } + }, + /** + * deselect a node + * @name deselect_node(obj [, supress_event]) + * @param {mixed} obj an array can be used to deselect multiple nodes + * @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered + * @trigger deselect_node.jstree, changed.jstree + */ + deselect_node : function (obj, supress_event, e) { + var t1, t2, dom; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.deselect_node(obj[t1], supress_event, e); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + dom = this.get_node(obj, true); + if(obj.state.selected) { + obj.state.selected = false; + this._data.core.selected = $.vakata.array_remove_item(this._data.core.selected, obj.id); + if(dom.length) { + dom.children('.jstree-anchor').removeClass('jstree-clicked').attr('aria-selected', false); + } + /** + * triggered when an node is deselected + * @event + * @name deselect_node.jstree + * @param {Object} node + * @param {Array} selected the current selection + * @param {Object} event the event (if any) that triggered this deselect_node + */ + this.trigger('deselect_node', { 'node' : obj, 'selected' : this._data.core.selected, 'event' : e }); + if(!supress_event) { + this.trigger('changed', { 'action' : 'deselect_node', 'node' : obj, 'selected' : this._data.core.selected, 'event' : e }); + } + } + }, + /** + * select all nodes in the tree + * @name select_all([supress_event]) + * @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered + * @trigger select_all.jstree, changed.jstree + */ + select_all : function (supress_event) { + var tmp = this._data.core.selected.concat([]), i, j; + this._data.core.selected = this._model.data[$.jstree.root].children_d.concat(); + for(i = 0, j = this._data.core.selected.length; i < j; i++) { + if(this._model.data[this._data.core.selected[i]]) { + this._model.data[this._data.core.selected[i]].state.selected = true; + } + } + this.redraw(true); + /** + * triggered when all nodes are selected + * @event + * @name select_all.jstree + * @param {Array} selected the current selection + */ + this.trigger('select_all', { 'selected' : this._data.core.selected }); + if(!supress_event) { + this.trigger('changed', { 'action' : 'select_all', 'selected' : this._data.core.selected, 'old_selection' : tmp }); + } + }, + /** + * deselect all selected nodes + * @name deselect_all([supress_event]) + * @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered + * @trigger deselect_all.jstree, changed.jstree + */ + deselect_all : function (supress_event) { + var tmp = this._data.core.selected.concat([]), i, j; + for(i = 0, j = this._data.core.selected.length; i < j; i++) { + if(this._model.data[this._data.core.selected[i]]) { + this._model.data[this._data.core.selected[i]].state.selected = false; + } + } + this._data.core.selected = []; + this.element.find('.jstree-clicked').removeClass('jstree-clicked').attr('aria-selected', false); + /** + * triggered when all nodes are deselected + * @event + * @name deselect_all.jstree + * @param {Object} node the previous selection + * @param {Array} selected the current selection + */ + this.trigger('deselect_all', { 'selected' : this._data.core.selected, 'node' : tmp }); + if(!supress_event) { + this.trigger('changed', { 'action' : 'deselect_all', 'selected' : this._data.core.selected, 'old_selection' : tmp }); + } + }, + /** + * checks if a node is selected + * @name is_selected(obj) + * @param {mixed} obj + * @return {Boolean} + */ + is_selected : function (obj) { + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + return obj.state.selected; + }, + /** + * get an array of all selected nodes + * @name get_selected([full]) + * @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned + * @return {Array} + */ + get_selected : function (full) { + return full ? $.map(this._data.core.selected, function (i) { return this.get_node(i); }.bind(this)) : this._data.core.selected.slice(); + }, + /** + * get an array of all top level selected nodes (ignoring children of selected nodes) + * @name get_top_selected([full]) + * @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned + * @return {Array} + */ + get_top_selected : function (full) { + var tmp = this.get_selected(true), + obj = {}, i, j, k, l; + for(i = 0, j = tmp.length; i < j; i++) { + obj[tmp[i].id] = tmp[i]; + } + for(i = 0, j = tmp.length; i < j; i++) { + for(k = 0, l = tmp[i].children_d.length; k < l; k++) { + if(obj[tmp[i].children_d[k]]) { + delete obj[tmp[i].children_d[k]]; + } + } + } + tmp = []; + for(i in obj) { + if(obj.hasOwnProperty(i)) { + tmp.push(i); + } + } + return full ? $.map(tmp, function (i) { return this.get_node(i); }.bind(this)) : tmp; + }, + /** + * get an array of all bottom level selected nodes (ignoring selected parents) + * @name get_bottom_selected([full]) + * @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned + * @return {Array} + */ + get_bottom_selected : function (full) { + var tmp = this.get_selected(true), + obj = [], i, j; + for(i = 0, j = tmp.length; i < j; i++) { + if(!tmp[i].children.length) { + obj.push(tmp[i].id); + } + } + return full ? $.map(obj, function (i) { return this.get_node(i); }.bind(this)) : obj; + }, + /** + * gets the current state of the tree so that it can be restored later with `set_state(state)`. Used internally. + * @name get_state() + * @private + * @return {Object} + */ + get_state : function () { + var state = { + 'core' : { + 'open' : [], + 'loaded' : [], + 'scroll' : { + 'left' : this.element.scrollLeft(), + 'top' : this.element.scrollTop() + }, + /*! + 'themes' : { + 'name' : this.get_theme(), + 'icons' : this._data.core.themes.icons, + 'dots' : this._data.core.themes.dots + }, + */ + 'selected' : [] + } + }, i; + for(i in this._model.data) { + if(this._model.data.hasOwnProperty(i)) { + if(i !== $.jstree.root) { + if(this._model.data[i].state.loaded && this.settings.core.loaded_state) { + state.core.loaded.push(i); + } + if(this._model.data[i].state.opened) { + state.core.open.push(i); + } + if(this._model.data[i].state.selected) { + state.core.selected.push(i); + } + } + } + } + return state; + }, + /** + * sets the state of the tree. Used internally. + * @name set_state(state [, callback]) + * @private + * @param {Object} state the state to restore. Keep in mind this object is passed by reference and jstree will modify it. + * @param {Function} callback an optional function to execute once the state is restored. + * @trigger set_state.jstree + */ + set_state : function (state, callback) { + if(state) { + if(state.core && state.core.selected && state.core.initial_selection === undefined) { + state.core.initial_selection = this._data.core.selected.concat([]).sort().join(','); + } + if(state.core) { + var res, n, t, _this, i; + if(state.core.loaded) { + if(!this.settings.core.loaded_state || !$.vakata.is_array(state.core.loaded) || !state.core.loaded.length) { + delete state.core.loaded; + this.set_state(state, callback); + } + else { + this._load_nodes(state.core.loaded, function (nodes) { + delete state.core.loaded; + this.set_state(state, callback); + }); + } + return false; + } + if(state.core.open) { + if(!$.vakata.is_array(state.core.open) || !state.core.open.length) { + delete state.core.open; + this.set_state(state, callback); + } + else { + this._load_nodes(state.core.open, function (nodes) { + this.open_node(nodes, false, 0); + delete state.core.open; + this.set_state(state, callback); + }); + } + return false; + } + if(state.core.scroll) { + if(state.core.scroll && state.core.scroll.left !== undefined) { + this.element.scrollLeft(state.core.scroll.left); + } + if(state.core.scroll && state.core.scroll.top !== undefined) { + this.element.scrollTop(state.core.scroll.top); + } + delete state.core.scroll; + this.set_state(state, callback); + return false; + } + if(state.core.selected) { + _this = this; + if (state.core.initial_selection === undefined || + state.core.initial_selection === this._data.core.selected.concat([]).sort().join(',') + ) { + this.deselect_all(); + $.each(state.core.selected, function (i, v) { + _this.select_node(v, false, true); + }); + } + delete state.core.initial_selection; + delete state.core.selected; + this.set_state(state, callback); + return false; + } + for(i in state) { + if(state.hasOwnProperty(i) && i !== "core" && $.inArray(i, this.settings.plugins) === -1) { + delete state[i]; + } + } + if($.isEmptyObject(state.core)) { + delete state.core; + this.set_state(state, callback); + return false; + } + } + if($.isEmptyObject(state)) { + state = null; + if(callback) { callback.call(this); } + /** + * triggered when a `set_state` call completes + * @event + * @name set_state.jstree + */ + this.trigger('set_state'); + return false; + } + return true; + } + return false; + }, + /** + * refreshes the tree - all nodes are reloaded with calls to `load_node`. + * @name refresh() + * @param {Boolean} skip_loading an option to skip showing the loading indicator + * @param {Mixed} forget_state if set to `true` state will not be reapplied, if set to a function (receiving the current state as argument) the result of that function will be used as state + * @trigger refresh.jstree + */ + refresh : function (skip_loading, forget_state) { + this._data.core.state = forget_state === true ? {} : this.get_state(); + if(forget_state && $.vakata.is_function(forget_state)) { this._data.core.state = forget_state.call(this, this._data.core.state); } + this._cnt = 0; + this._model.data = {}; + this._model.data[$.jstree.root] = { + id : $.jstree.root, + parent : null, + parents : [], + children : [], + children_d : [], + state : { loaded : false } + }; + this._data.core.selected = []; + this._data.core.last_clicked = null; + this._data.core.focused = null; + + var c = this.get_container_ul()[0].className; + if(!skip_loading) { + this.element.html("<"+"ul class='"+c+"' role='group'><"+"li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none' id='j"+this._id+"_loading'><"+"a class='jstree-anchor' role='treeitem' href='#'>" + this.get_string("Loading ...") + ""); + this.element.attr('aria-activedescendant','j'+this._id+'_loading'); + } + this.load_node($.jstree.root, function (o, s) { + if(s) { + this.get_container_ul()[0].className = c; + if(this._firstChild(this.get_container_ul()[0])) { + this.element.attr('aria-activedescendant',this._firstChild(this.get_container_ul()[0]).id); + } + this.set_state($.extend(true, {}, this._data.core.state), function () { + /** + * triggered when a `refresh` call completes + * @event + * @name refresh.jstree + */ + this.trigger('refresh'); + }); + } + this._data.core.state = null; + }); + }, + /** + * refreshes a node in the tree (reload its children) all opened nodes inside that node are reloaded with calls to `load_node`. + * @name refresh_node(obj) + * @param {mixed} obj the node + * @trigger refresh_node.jstree + */ + refresh_node : function (obj) { + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + var opened = [], to_load = [], s = this._data.core.selected.concat([]); + to_load.push(obj.id); + if(obj.state.opened === true) { opened.push(obj.id); } + this.get_node(obj, true).find('.jstree-open').each(function() { to_load.push(this.id); opened.push(this.id); }); + this._load_nodes(to_load, function (nodes) { + this.open_node(opened, false, 0); + this.select_node(s); + /** + * triggered when a node is refreshed + * @event + * @name refresh_node.jstree + * @param {Object} node - the refreshed node + * @param {Array} nodes - an array of the IDs of the nodes that were reloaded + */ + this.trigger('refresh_node', { 'node' : obj, 'nodes' : nodes }); + }.bind(this), false, true); + }, + /** + * set (change) the ID of a node + * @name set_id(obj, id) + * @param {mixed} obj the node + * @param {String} id the new ID + * @return {Boolean} + * @trigger set_id.jstree + */ + set_id : function (obj, id) { + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + var i, j, m = this._model.data, old = obj.id; + id = id.toString(); + // update parents (replace current ID with new one in children and children_d) + m[obj.parent].children[$.inArray(obj.id, m[obj.parent].children)] = id; + for(i = 0, j = obj.parents.length; i < j; i++) { + m[obj.parents[i]].children_d[$.inArray(obj.id, m[obj.parents[i]].children_d)] = id; + } + // update children (replace current ID with new one in parent and parents) + for(i = 0, j = obj.children.length; i < j; i++) { + m[obj.children[i]].parent = id; + } + for(i = 0, j = obj.children_d.length; i < j; i++) { + m[obj.children_d[i]].parents[$.inArray(obj.id, m[obj.children_d[i]].parents)] = id; + } + i = $.inArray(obj.id, this._data.core.selected); + if(i !== -1) { this._data.core.selected[i] = id; } + // update model and obj itself (obj.id, this._model.data[KEY]) + i = this.get_node(obj.id, true); + if(i) { + i.attr('id', id); //.children('.jstree-anchor').attr('id', id + '_anchor').end().attr('aria-labelledby', id + '_anchor'); + if(this.element.attr('aria-activedescendant') === obj.id) { + this.element.attr('aria-activedescendant', id); + } + } + delete m[obj.id]; + obj.id = id; + obj.li_attr.id = id; + m[id] = obj; + /** + * triggered when a node id value is changed + * @event + * @name set_id.jstree + * @param {Object} node + * @param {String} old the old id + */ + this.trigger('set_id',{ "node" : obj, "new" : obj.id, "old" : old }); + return true; + }, + /** + * get the text value of a node + * @name get_text(obj) + * @param {mixed} obj the node + * @return {String} + */ + get_text : function (obj) { + obj = this.get_node(obj); + return (!obj || obj.id === $.jstree.root) ? false : obj.text; + }, + /** + * set the text value of a node. Used internally, please use `rename_node(obj, val)`. + * @private + * @name set_text(obj, val) + * @param {mixed} obj the node, you can pass an array to set the text on multiple nodes + * @param {String} val the new text value + * @return {Boolean} + * @trigger set_text.jstree + */ + set_text : function (obj, val) { + var t1, t2; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.set_text(obj[t1], val); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + obj.text = val; + if(this.get_node(obj, true).length) { + this.redraw_node(obj.id); + } + /** + * triggered when a node text value is changed + * @event + * @name set_text.jstree + * @param {Object} obj + * @param {String} text the new value + */ + this.trigger('set_text',{ "obj" : obj, "text" : val }); + return true; + }, + /** + * gets a JSON representation of a node (or the whole tree) + * @name get_json([obj, options]) + * @param {mixed} obj + * @param {Object} options + * @param {Boolean} options.no_state do not return state information + * @param {Boolean} options.no_id do not return ID + * @param {Boolean} options.no_children do not include children + * @param {Boolean} options.no_data do not include node data + * @param {Boolean} options.no_li_attr do not include LI attributes + * @param {Boolean} options.no_a_attr do not include A attributes + * @param {Boolean} options.flat return flat JSON instead of nested + * @return {Object} + */ + get_json : function (obj, options, flat) { + obj = this.get_node(obj || $.jstree.root); + if(!obj) { return false; } + if(options && options.flat && !flat) { flat = []; } + var tmp = { + 'id' : obj.id, + 'text' : obj.text, + 'icon' : this.get_icon(obj), + 'li_attr' : $.extend(true, {}, obj.li_attr), + 'a_attr' : $.extend(true, {}, obj.a_attr), + 'state' : {}, + 'data' : options && options.no_data ? false : $.extend(true, $.vakata.is_array(obj.data)?[]:{}, obj.data) + //( this.get_node(obj, true).length ? this.get_node(obj, true).data() : obj.data ), + }, i, j; + if(options && options.flat) { + tmp.parent = obj.parent; + } + else { + tmp.children = []; + } + if(!options || !options.no_state) { + for(i in obj.state) { + if(obj.state.hasOwnProperty(i)) { + tmp.state[i] = obj.state[i]; + } + } + } else { + delete tmp.state; + } + if(options && options.no_li_attr) { + delete tmp.li_attr; + } + if(options && options.no_a_attr) { + delete tmp.a_attr; + } + if(options && options.no_id) { + delete tmp.id; + if(tmp.li_attr && tmp.li_attr.id) { + delete tmp.li_attr.id; + } + if(tmp.a_attr && tmp.a_attr.id) { + delete tmp.a_attr.id; + } + } + if(options && options.flat && obj.id !== $.jstree.root) { + flat.push(tmp); + } + if(!options || !options.no_children) { + for(i = 0, j = obj.children.length; i < j; i++) { + if(options && options.flat) { + this.get_json(obj.children[i], options, flat); + } + else { + tmp.children.push(this.get_json(obj.children[i], options)); + } + } + } + return options && options.flat ? flat : (obj.id === $.jstree.root ? tmp.children : tmp); + }, + /** + * create a new node (do not confuse with load_node) + * @name create_node([par, node, pos, callback, is_loaded]) + * @param {mixed} par the parent node (to create a root node use either "#" (string) or `null`) + * @param {mixed} node the data for the new node (a valid JSON object, or a simple string with the name) + * @param {mixed} pos the index at which to insert the node, "first" and "last" are also supported, default is "last" + * @param {Function} callback a function to be called once the node is created + * @param {Boolean} is_loaded internal argument indicating if the parent node was succesfully loaded + * @return {String} the ID of the newly create node + * @trigger model.jstree, create_node.jstree + */ + create_node : function (par, node, pos, callback, is_loaded) { + if(par === null) { par = $.jstree.root; } + par = this.get_node(par); + if(!par) { return false; } + pos = pos === undefined ? "last" : pos; + if(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) { + return this.load_node(par, function () { this.create_node(par, node, pos, callback, true); }); + } + if(!node) { node = { "text" : this.get_string('New node') }; } + if(typeof node === "string") { + node = { "text" : node }; + } else { + node = $.extend(true, {}, node); + } + if(node.text === undefined) { node.text = this.get_string('New node'); } + var tmp, dpc, i, j; + + if(par.id === $.jstree.root) { + if(pos === "before") { pos = "first"; } + if(pos === "after") { pos = "last"; } + } + switch(pos) { + case "before": + tmp = this.get_node(par.parent); + pos = $.inArray(par.id, tmp.children); + par = tmp; + break; + case "after" : + tmp = this.get_node(par.parent); + pos = $.inArray(par.id, tmp.children) + 1; + par = tmp; + break; + case "inside": + case "first": + pos = 0; + break; + case "last": + pos = par.children.length; + break; + default: + if(!pos) { pos = 0; } + break; + } + if(pos > par.children.length) { pos = par.children.length; } + if(!node.id) { node.id = true; } + if(!this.check("create_node", node, par, pos)) { + this.settings.core.error.call(this, this._data.core.last_error); + return false; + } + if(node.id === true) { delete node.id; } + node = this._parse_model_from_json(node, par.id, par.parents.concat()); + if(!node) { return false; } + tmp = this.get_node(node); + dpc = []; + dpc.push(node); + dpc = dpc.concat(tmp.children_d); + this.trigger('model', { "nodes" : dpc, "parent" : par.id }); + + par.children_d = par.children_d.concat(dpc); + for(i = 0, j = par.parents.length; i < j; i++) { + this._model.data[par.parents[i]].children_d = this._model.data[par.parents[i]].children_d.concat(dpc); + } + node = tmp; + tmp = []; + for(i = 0, j = par.children.length; i < j; i++) { + tmp[i >= pos ? i+1 : i] = par.children[i]; + } + tmp[pos] = node.id; + par.children = tmp; + + this.redraw_node(par, true); + /** + * triggered when a node is created + * @event + * @name create_node.jstree + * @param {Object} node + * @param {String} parent the parent's ID + * @param {Number} position the position of the new node among the parent's children + */ + this.trigger('create_node', { "node" : this.get_node(node), "parent" : par.id, "position" : pos }); + if(callback) { callback.call(this, this.get_node(node)); } + return node.id; + }, + /** + * set the text value of a node + * @name rename_node(obj, val) + * @param {mixed} obj the node, you can pass an array to rename multiple nodes to the same name + * @param {String} val the new text value + * @return {Boolean} + * @trigger rename_node.jstree + */ + rename_node : function (obj, val) { + var t1, t2, old; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.rename_node(obj[t1], val); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + old = obj.text; + if(!this.check("rename_node", obj, this.get_parent(obj), val)) { + this.settings.core.error.call(this, this._data.core.last_error); + return false; + } + this.set_text(obj, val); // .apply(this, Array.prototype.slice.call(arguments)) + /** + * triggered when a node is renamed + * @event + * @name rename_node.jstree + * @param {Object} node + * @param {String} text the new value + * @param {String} old the old value + */ + this.trigger('rename_node', { "node" : obj, "text" : val, "old" : old }); + return true; + }, + /** + * remove a node + * @name delete_node(obj) + * @param {mixed} obj the node, you can pass an array to delete multiple nodes + * @return {Boolean} + * @trigger delete_node.jstree, changed.jstree + */ + delete_node : function (obj) { + var t1, t2, par, pos, tmp, i, j, k, l, c, top, lft; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.delete_node(obj[t1]); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + par = this.get_node(obj.parent); + pos = $.inArray(obj.id, par.children); + c = false; + if(!this.check("delete_node", obj, par, pos)) { + this.settings.core.error.call(this, this._data.core.last_error); + return false; + } + if(pos !== -1) { + par.children = $.vakata.array_remove(par.children, pos); + } + tmp = obj.children_d.concat([]); + tmp.push(obj.id); + for(i = 0, j = obj.parents.length; i < j; i++) { + this._model.data[obj.parents[i]].children_d = $.vakata.array_filter(this._model.data[obj.parents[i]].children_d, function (v) { + return $.inArray(v, tmp) === -1; + }); + } + for(k = 0, l = tmp.length; k < l; k++) { + if(this._model.data[tmp[k]].state.selected) { + c = true; + break; + } + } + if (c) { + this._data.core.selected = $.vakata.array_filter(this._data.core.selected, function (v) { + return $.inArray(v, tmp) === -1; + }); + } + /** + * triggered when a node is deleted + * @event + * @name delete_node.jstree + * @param {Object} node + * @param {String} parent the parent's ID + */ + this.trigger('delete_node', { "node" : obj, "parent" : par.id }); + if(c) { + this.trigger('changed', { 'action' : 'delete_node', 'node' : obj, 'selected' : this._data.core.selected, 'parent' : par.id }); + } + for(k = 0, l = tmp.length; k < l; k++) { + delete this._model.data[tmp[k]]; + } + if($.inArray(this._data.core.focused, tmp) !== -1) { + this._data.core.focused = null; + top = this.element[0].scrollTop; + lft = this.element[0].scrollLeft; + if(par.id === $.jstree.root) { + if (this._model.data[$.jstree.root].children[0]) { + this.get_node(this._model.data[$.jstree.root].children[0], true).children('.jstree-anchor').triger('focus'); + } + } + else { + this.get_node(par, true).children('.jstree-anchor').trigger('focus'); + } + this.element[0].scrollTop = top; + this.element[0].scrollLeft = lft; + } + this.redraw_node(par, true); + return true; + }, + /** + * check if an operation is premitted on the tree. Used internally. + * @private + * @name check(chk, obj, par, pos) + * @param {String} chk the operation to check, can be "create_node", "rename_node", "delete_node", "copy_node" or "move_node" + * @param {mixed} obj the node + * @param {mixed} par the parent + * @param {mixed} pos the position to insert at, or if "rename_node" - the new name + * @param {mixed} more some various additional information, for example if a "move_node" operations is triggered by DND this will be the hovered node + * @return {Boolean} + */ + check : function (chk, obj, par, pos, more) { + obj = obj && obj.id ? obj : this.get_node(obj); + par = par && par.id ? par : this.get_node(par); + var tmp = chk.match(/^move_node|copy_node|create_node$/i) ? par : obj, + chc = this.settings.core.check_callback; + if(chk === "move_node" || chk === "copy_node") { + if((!more || !more.is_multi) && (chk === "move_node" && $.inArray(obj.id, par.children) === pos)) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'core', 'id' : 'core_08', 'reason' : 'Moving node to its current position', 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) }; + return false; + } + if((!more || !more.is_multi) && (obj.id === par.id || (chk === "move_node" && $.inArray(obj.id, par.children) === pos) || $.inArray(par.id, obj.children_d) !== -1)) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'core', 'id' : 'core_01', 'reason' : 'Moving parent inside child', 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) }; + return false; + } + } + if(tmp && tmp.data) { tmp = tmp.data; } + if(tmp && tmp.functions && (tmp.functions[chk] === false || tmp.functions[chk] === true)) { + if(tmp.functions[chk] === false) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'core', 'id' : 'core_02', 'reason' : 'Node data prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) }; + } + return tmp.functions[chk]; + } + if(chc === false || ($.vakata.is_function(chc) && chc.call(this, chk, obj, par, pos, more) === false) || (chc && chc[chk] === false)) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'core', 'id' : 'core_03', 'reason' : 'User config for core.check_callback prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) }; + return false; + } + return true; + }, + /** + * get the last error + * @name last_error() + * @return {Object} + */ + last_error : function () { + return this._data.core.last_error; + }, + /** + * move a node to a new parent + * @name move_node(obj, par [, pos, callback, is_loaded]) + * @param {mixed} obj the node to move, pass an array to move multiple nodes + * @param {mixed} par the new parent + * @param {mixed} pos the position to insert at (besides integer values, "first" and "last" are supported, as well as "before" and "after"), defaults to integer `0` + * @param {function} callback a function to call once the move is completed, receives 3 arguments - the node, the new parent and the position + * @param {Boolean} is_loaded internal parameter indicating if the parent node has been loaded + * @param {Boolean} skip_redraw internal parameter indicating if the tree should be redrawn + * @param {Boolean} instance internal parameter indicating if the node comes from another instance + * @trigger move_node.jstree + */ + move_node : function (obj, par, pos, callback, is_loaded, skip_redraw, origin) { + var t1, t2, old_par, old_pos, new_par, old_ins, is_multi, dpc, tmp, i, j, k, l, p; + + par = this.get_node(par); + pos = pos === undefined ? 0 : pos; + if(!par) { return false; } + if(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) { + return this.load_node(par, function () { this.move_node(obj, par, pos, callback, true, false, origin); }); + } + + if($.vakata.is_array(obj)) { + if(obj.length === 1) { + obj = obj[0]; + } + else { + //obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + if((tmp = this.move_node(obj[t1], par, pos, callback, is_loaded, false, origin))) { + par = tmp; + pos = "after"; + } + } + this.redraw(); + return true; + } + } + obj = obj && obj.id ? obj : this.get_node(obj); + + if(!obj || obj.id === $.jstree.root) { return false; } + + old_par = (obj.parent || $.jstree.root).toString(); + new_par = (!pos.toString().match(/^(before|after)$/) || par.id === $.jstree.root) ? par : this.get_node(par.parent); + old_ins = origin ? origin : (this._model.data[obj.id] ? this : $.jstree.reference(obj.id)); + is_multi = !old_ins || !old_ins._id || (this._id !== old_ins._id); + old_pos = old_ins && old_ins._id && old_par && old_ins._model.data[old_par] && old_ins._model.data[old_par].children ? $.inArray(obj.id, old_ins._model.data[old_par].children) : -1; + if(old_ins && old_ins._id) { + obj = old_ins._model.data[obj.id]; + } + + if(is_multi) { + if((tmp = this.copy_node(obj, par, pos, callback, is_loaded, false, origin))) { + if(old_ins) { old_ins.delete_node(obj); } + return tmp; + } + return false; + } + //var m = this._model.data; + if(par.id === $.jstree.root) { + if(pos === "before") { pos = "first"; } + if(pos === "after") { pos = "last"; } + } + switch(pos) { + case "before": + pos = $.inArray(par.id, new_par.children); + break; + case "after" : + pos = $.inArray(par.id, new_par.children) + 1; + break; + case "inside": + case "first": + pos = 0; + break; + case "last": + pos = new_par.children.length; + break; + default: + if(!pos) { pos = 0; } + break; + } + if(pos > new_par.children.length) { pos = new_par.children.length; } + if(!this.check("move_node", obj, new_par, pos, { 'core' : true, 'origin' : origin, 'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id) })) { + this.settings.core.error.call(this, this._data.core.last_error); + return false; + } + if(obj.parent === new_par.id) { + dpc = new_par.children.concat(); + tmp = $.inArray(obj.id, dpc); + if(tmp !== -1) { + dpc = $.vakata.array_remove(dpc, tmp); + if(pos > tmp) { pos--; } + } + tmp = []; + for(i = 0, j = dpc.length; i < j; i++) { + tmp[i >= pos ? i+1 : i] = dpc[i]; + } + tmp[pos] = obj.id; + new_par.children = tmp; + this._node_changed(new_par.id); + this.redraw(new_par.id === $.jstree.root); + } + else { + // clean old parent and up + tmp = obj.children_d.concat(); + tmp.push(obj.id); + for(i = 0, j = obj.parents.length; i < j; i++) { + dpc = []; + p = old_ins._model.data[obj.parents[i]].children_d; + for(k = 0, l = p.length; k < l; k++) { + if($.inArray(p[k], tmp) === -1) { + dpc.push(p[k]); + } + } + old_ins._model.data[obj.parents[i]].children_d = dpc; + } + old_ins._model.data[old_par].children = $.vakata.array_remove_item(old_ins._model.data[old_par].children, obj.id); + + // insert into new parent and up + for(i = 0, j = new_par.parents.length; i < j; i++) { + this._model.data[new_par.parents[i]].children_d = this._model.data[new_par.parents[i]].children_d.concat(tmp); + } + dpc = []; + for(i = 0, j = new_par.children.length; i < j; i++) { + dpc[i >= pos ? i+1 : i] = new_par.children[i]; + } + dpc[pos] = obj.id; + new_par.children = dpc; + new_par.children_d.push(obj.id); + new_par.children_d = new_par.children_d.concat(obj.children_d); + + // update object + obj.parent = new_par.id; + tmp = new_par.parents.concat(); + tmp.unshift(new_par.id); + p = obj.parents.length; + obj.parents = tmp; + + // update object children + tmp = tmp.concat(); + for(i = 0, j = obj.children_d.length; i < j; i++) { + this._model.data[obj.children_d[i]].parents = this._model.data[obj.children_d[i]].parents.slice(0,p*-1); + Array.prototype.push.apply(this._model.data[obj.children_d[i]].parents, tmp); + } + + if(old_par === $.jstree.root || new_par.id === $.jstree.root) { + this._model.force_full_redraw = true; + } + if(!this._model.force_full_redraw) { + this._node_changed(old_par); + this._node_changed(new_par.id); + } + if(!skip_redraw) { + this.redraw(); + } + } + if(callback) { callback.call(this, obj, new_par, pos); } + /** + * triggered when a node is moved + * @event + * @name move_node.jstree + * @param {Object} node + * @param {String} parent the parent's ID + * @param {Number} position the position of the node among the parent's children + * @param {String} old_parent the old parent of the node + * @param {Number} old_position the old position of the node + * @param {Boolean} is_multi do the node and new parent belong to different instances + * @param {jsTree} old_instance the instance the node came from + * @param {jsTree} new_instance the instance of the new parent + */ + this.trigger('move_node', { "node" : obj, "parent" : new_par.id, "position" : pos, "old_parent" : old_par, "old_position" : old_pos, 'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id), 'old_instance' : old_ins, 'new_instance' : this }); + return obj.id; + }, + /** + * copy a node to a new parent + * @name copy_node(obj, par [, pos, callback, is_loaded]) + * @param {mixed} obj the node to copy, pass an array to copy multiple nodes + * @param {mixed} par the new parent + * @param {mixed} pos the position to insert at (besides integer values, "first" and "last" are supported, as well as "before" and "after"), defaults to integer `0` + * @param {function} callback a function to call once the move is completed, receives 3 arguments - the node, the new parent and the position + * @param {Boolean} is_loaded internal parameter indicating if the parent node has been loaded + * @param {Boolean} skip_redraw internal parameter indicating if the tree should be redrawn + * @param {Boolean} instance internal parameter indicating if the node comes from another instance + * @trigger model.jstree copy_node.jstree + */ + copy_node : function (obj, par, pos, callback, is_loaded, skip_redraw, origin) { + var t1, t2, dpc, tmp, i, j, node, old_par, new_par, old_ins, is_multi; + + par = this.get_node(par); + pos = pos === undefined ? 0 : pos; + if(!par) { return false; } + if(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) { + return this.load_node(par, function () { this.copy_node(obj, par, pos, callback, true, false, origin); }); + } + + if($.vakata.is_array(obj)) { + if(obj.length === 1) { + obj = obj[0]; + } + else { + //obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + if((tmp = this.copy_node(obj[t1], par, pos, callback, is_loaded, true, origin))) { + par = tmp; + pos = "after"; + } + } + this.redraw(); + return true; + } + } + obj = obj && obj.id ? obj : this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + + old_par = (obj.parent || $.jstree.root).toString(); + new_par = (!pos.toString().match(/^(before|after)$/) || par.id === $.jstree.root) ? par : this.get_node(par.parent); + old_ins = origin ? origin : (this._model.data[obj.id] ? this : $.jstree.reference(obj.id)); + is_multi = !old_ins || !old_ins._id || (this._id !== old_ins._id); + + if(old_ins && old_ins._id) { + obj = old_ins._model.data[obj.id]; + } + + if(par.id === $.jstree.root) { + if(pos === "before") { pos = "first"; } + if(pos === "after") { pos = "last"; } + } + switch(pos) { + case "before": + pos = $.inArray(par.id, new_par.children); + break; + case "after" : + pos = $.inArray(par.id, new_par.children) + 1; + break; + case "inside": + case "first": + pos = 0; + break; + case "last": + pos = new_par.children.length; + break; + default: + if(!pos) { pos = 0; } + break; + } + if(pos > new_par.children.length) { pos = new_par.children.length; } + if(!this.check("copy_node", obj, new_par, pos, { 'core' : true, 'origin' : origin, 'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id) })) { + this.settings.core.error.call(this, this._data.core.last_error); + return false; + } + node = old_ins ? old_ins.get_json(obj, { no_id : true, no_data : true, no_state : true }) : obj; + if(!node) { return false; } + if(node.id === true) { delete node.id; } + node = this._parse_model_from_json(node, new_par.id, new_par.parents.concat()); + if(!node) { return false; } + tmp = this.get_node(node); + if(obj && obj.state && obj.state.loaded === false) { tmp.state.loaded = false; } + dpc = []; + dpc.push(node); + dpc = dpc.concat(tmp.children_d); + this.trigger('model', { "nodes" : dpc, "parent" : new_par.id }); + + // insert into new parent and up + for(i = 0, j = new_par.parents.length; i < j; i++) { + this._model.data[new_par.parents[i]].children_d = this._model.data[new_par.parents[i]].children_d.concat(dpc); + } + dpc = []; + for(i = 0, j = new_par.children.length; i < j; i++) { + dpc[i >= pos ? i+1 : i] = new_par.children[i]; + } + dpc[pos] = tmp.id; + new_par.children = dpc; + new_par.children_d.push(tmp.id); + new_par.children_d = new_par.children_d.concat(tmp.children_d); + + if(new_par.id === $.jstree.root) { + this._model.force_full_redraw = true; + } + if(!this._model.force_full_redraw) { + this._node_changed(new_par.id); + } + if(!skip_redraw) { + this.redraw(new_par.id === $.jstree.root); + } + if(callback) { callback.call(this, tmp, new_par, pos); } + /** + * triggered when a node is copied + * @event + * @name copy_node.jstree + * @param {Object} node the copied node + * @param {Object} original the original node + * @param {String} parent the parent's ID + * @param {Number} position the position of the node among the parent's children + * @param {String} old_parent the old parent of the node + * @param {Number} old_position the position of the original node + * @param {Boolean} is_multi do the node and new parent belong to different instances + * @param {jsTree} old_instance the instance the node came from + * @param {jsTree} new_instance the instance of the new parent + */ + this.trigger('copy_node', { "node" : tmp, "original" : obj, "parent" : new_par.id, "position" : pos, "old_parent" : old_par, "old_position" : old_ins && old_ins._id && old_par && old_ins._model.data[old_par] && old_ins._model.data[old_par].children ? $.inArray(obj.id, old_ins._model.data[old_par].children) : -1,'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id), 'old_instance' : old_ins, 'new_instance' : this }); + return tmp.id; + }, + /** + * cut a node (a later call to `paste(obj)` would move the node) + * @name cut(obj) + * @param {mixed} obj multiple objects can be passed using an array + * @trigger cut.jstree + */ + cut : function (obj) { + if(!obj) { obj = this._data.core.selected.concat(); } + if(!$.vakata.is_array(obj)) { obj = [obj]; } + if(!obj.length) { return false; } + var tmp = [], o, t1, t2; + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + o = this.get_node(obj[t1]); + if(o && o.id && o.id !== $.jstree.root) { tmp.push(o); } + } + if(!tmp.length) { return false; } + ccp_node = tmp; + ccp_inst = this; + ccp_mode = 'move_node'; + /** + * triggered when nodes are added to the buffer for moving + * @event + * @name cut.jstree + * @param {Array} node + */ + this.trigger('cut', { "node" : obj }); + }, + /** + * copy a node (a later call to `paste(obj)` would copy the node) + * @name copy(obj) + * @param {mixed} obj multiple objects can be passed using an array + * @trigger copy.jstree + */ + copy : function (obj) { + if(!obj) { obj = this._data.core.selected.concat(); } + if(!$.vakata.is_array(obj)) { obj = [obj]; } + if(!obj.length) { return false; } + var tmp = [], o, t1, t2; + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + o = this.get_node(obj[t1]); + if(o && o.id && o.id !== $.jstree.root) { tmp.push(o); } + } + if(!tmp.length) { return false; } + ccp_node = tmp; + ccp_inst = this; + ccp_mode = 'copy_node'; + /** + * triggered when nodes are added to the buffer for copying + * @event + * @name copy.jstree + * @param {Array} node + */ + this.trigger('copy', { "node" : obj }); + }, + /** + * get the current buffer (any nodes that are waiting for a paste operation) + * @name get_buffer() + * @return {Object} an object consisting of `mode` ("copy_node" or "move_node"), `node` (an array of objects) and `inst` (the instance) + */ + get_buffer : function () { + return { 'mode' : ccp_mode, 'node' : ccp_node, 'inst' : ccp_inst }; + }, + /** + * check if there is something in the buffer to paste + * @name can_paste() + * @return {Boolean} + */ + can_paste : function () { + return ccp_mode !== false && ccp_node !== false; // && ccp_inst._model.data[ccp_node]; + }, + /** + * copy or move the previously cut or copied nodes to a new parent + * @name paste(obj [, pos]) + * @param {mixed} obj the new parent + * @param {mixed} pos the position to insert at (besides integer, "first" and "last" are supported), defaults to integer `0` + * @trigger paste.jstree + */ + paste : function (obj, pos) { + obj = this.get_node(obj); + if(!obj || !ccp_mode || !ccp_mode.match(/^(copy_node|move_node)$/) || !ccp_node) { return false; } + if(this[ccp_mode](ccp_node, obj, pos, false, false, false, ccp_inst)) { + /** + * triggered when paste is invoked + * @event + * @name paste.jstree + * @param {String} parent the ID of the receiving node + * @param {Array} node the nodes in the buffer + * @param {String} mode the performed operation - "copy_node" or "move_node" + */ + this.trigger('paste', { "parent" : obj.id, "node" : ccp_node, "mode" : ccp_mode }); + } + ccp_node = false; + ccp_mode = false; + ccp_inst = false; + }, + /** + * clear the buffer of previously copied or cut nodes + * @name clear_buffer() + * @trigger clear_buffer.jstree + */ + clear_buffer : function () { + ccp_node = false; + ccp_mode = false; + ccp_inst = false; + /** + * triggered when the copy / cut buffer is cleared + * @event + * @name clear_buffer.jstree + */ + this.trigger('clear_buffer'); + }, + /** + * put a node in edit mode (input field to rename the node) + * @name edit(obj [, default_text, callback]) + * @param {mixed} obj + * @param {String} default_text the text to populate the input with (if omitted or set to a non-string value the node's text value is used) + * @param {Function} callback a function to be called once the text box is blurred, it is called in the instance's scope and receives the node, a status parameter (true if the rename is successful, false otherwise), a boolean indicating if the user cancelled the edit and the original unescaped value provided by the user. You can also access the node's title using .text + */ + edit : function (obj, default_text, callback) { + var rtl, w, a, s, t, h1, h2, fn, tmp, cancel = false; + obj = this.get_node(obj); + if(!obj) { return false; } + if(!this.check("edit", obj, this.get_parent(obj))) { + this.settings.core.error.call(this, this._data.core.last_error); + return false; + } + tmp = obj; + default_text = typeof default_text === 'string' ? default_text : obj.text; + this.set_text(obj, ""); + obj = this._open_to(obj); + tmp.text = default_text; + + rtl = this._data.core.rtl; + w = this.element.width(); + this._data.core.focused = tmp.id; + a = obj.children('.jstree-anchor').trigger('focus'); + s = $(''); + /*! + oi = obj.children("i:visible"), + ai = a.children("i:visible"), + w1 = oi.width() * oi.length, + w2 = ai.width() * ai.length, + */ + t = default_text; + h1 = $("<"+"div>
", { css : { "position" : "absolute", "top" : "-200px", "left" : (rtl ? "0px" : "-1000px"), "visibility" : "hidden" } }).appendTo(document.body); + h2 = $("<"+"input />", { + "value" : t, + "class" : "jstree-rename-input", + // "size" : t.length, + "css" : { + "padding" : "0", + "border" : "1px solid silver", + "box-sizing" : "border-box", + "display" : "inline-block", + "height" : (this._data.core.li_height) + "px", + "lineHeight" : (this._data.core.li_height) + "px", + "width" : "150px" // will be set a bit further down + }, + "blur" : function (e) { + e.stopImmediatePropagation(); + e.preventDefault(); + var i = s.children(".jstree-rename-input"), + v = i.val(), + f = this.settings.core.force_text, + nv; + if(v === "") { v = t; } + h1.remove(); + s.replaceWith(a); + s.remove(); + t = f ? t : $('
').append($.parseHTML(t)).html(); + obj = this.get_node(obj); + this.set_text(obj, t); + nv = !!this.rename_node(obj, f ? $('
').text(v).text() : $('
').append($.parseHTML(v)).html()); + if(!nv) { + this.set_text(obj, t); // move this up? and fix #483 + } + this._data.core.focused = tmp.id; + setTimeout(function () { + var node = this.get_node(tmp.id, true); + if(node.length) { + this._data.core.focused = tmp.id; + node.children('.jstree-anchor').trigger('focus'); + } + }.bind(this), 0); + if(callback) { + callback.call(this, tmp, nv, cancel, v); + } + h2 = null; + }.bind(this), + "keydown" : function (e) { + var key = e.which; + if(key === 27) { + cancel = true; + this.value = t; + } + if(key === 27 || key === 13 || key === 37 || key === 38 || key === 39 || key === 40 || key === 32) { + e.stopImmediatePropagation(); + } + if(key === 27 || key === 13) { + e.preventDefault(); + this.blur(); + } + }, + "click" : function (e) { e.stopImmediatePropagation(); }, + "mousedown" : function (e) { e.stopImmediatePropagation(); }, + "keyup" : function (e) { + h2.width(Math.min(h1.text("pW" + this.value).width(),w)); + }, + "keypress" : function(e) { + if(e.which === 13) { return false; } + } + }); + fn = { + fontFamily : a.css('fontFamily') || '', + fontSize : a.css('fontSize') || '', + fontWeight : a.css('fontWeight') || '', + fontStyle : a.css('fontStyle') || '', + fontStretch : a.css('fontStretch') || '', + fontVariant : a.css('fontVariant') || '', + letterSpacing : a.css('letterSpacing') || '', + wordSpacing : a.css('wordSpacing') || '' + }; + s.attr('class', a.attr('class')).append(a.contents().clone()).append(h2); + a.replaceWith(s); + h1.css(fn); + h2.css(fn).width(Math.min(h1.text("pW" + h2[0].value).width(),w))[0].select(); + $(document).one('mousedown.jstree touchstart.jstree dnd_start.vakata', function (e) { + if (h2 && e.target !== h2) { + $(h2).trigger('blur'); + } + }); + }, + + + /** + * changes the theme + * @name set_theme(theme_name [, theme_url]) + * @param {String} theme_name the name of the new theme to apply + * @param {mixed} theme_url the location of the CSS file for this theme. Omit or set to `false` if you manually included the file. Set to `true` to autoload from the `core.themes.dir` directory. + * @trigger set_theme.jstree + */ + set_theme : function (theme_name, theme_url) { + if(!theme_name) { return false; } + if(theme_url === true) { + var dir = this.settings.core.themes.dir; + if(!dir) { dir = $.jstree.path + '/themes'; } + theme_url = dir + '/' + theme_name + '/style.css'; + } + if(theme_url && $.inArray(theme_url, themes_loaded) === -1) { + $('head').append('<'+'link rel="stylesheet" href="' + theme_url + '" type="text/css" />'); + themes_loaded.push(theme_url); + } + if(this._data.core.themes.name) { + this.element.removeClass('jstree-' + this._data.core.themes.name); + } + this._data.core.themes.name = theme_name; + this.element.addClass('jstree-' + theme_name); + this.element[this.settings.core.themes.responsive ? 'addClass' : 'removeClass' ]('jstree-' + theme_name + '-responsive'); + /** + * triggered when a theme is set + * @event + * @name set_theme.jstree + * @param {String} theme the new theme + */ + this.trigger('set_theme', { 'theme' : theme_name }); + }, + /** + * gets the name of the currently applied theme name + * @name get_theme() + * @return {String} + */ + get_theme : function () { return this._data.core.themes.name; }, + /** + * changes the theme variant (if the theme has variants) + * @name set_theme_variant(variant_name) + * @param {String|Boolean} variant_name the variant to apply (if `false` is used the current variant is removed) + */ + set_theme_variant : function (variant_name) { + if(this._data.core.themes.variant) { + this.element.removeClass('jstree-' + this._data.core.themes.name + '-' + this._data.core.themes.variant); + } + this._data.core.themes.variant = variant_name; + if(variant_name) { + this.element.addClass('jstree-' + this._data.core.themes.name + '-' + this._data.core.themes.variant); + } + }, + /** + * gets the name of the currently applied theme variant + * @name get_theme() + * @return {String} + */ + get_theme_variant : function () { return this._data.core.themes.variant; }, + /** + * shows a striped background on the container (if the theme supports it) + * @name show_stripes() + */ + show_stripes : function () { + this._data.core.themes.stripes = true; + this.get_container_ul().addClass("jstree-striped"); + /** + * triggered when stripes are shown + * @event + * @name show_stripes.jstree + */ + this.trigger('show_stripes'); + }, + /** + * hides the striped background on the container + * @name hide_stripes() + */ + hide_stripes : function () { + this._data.core.themes.stripes = false; + this.get_container_ul().removeClass("jstree-striped"); + /** + * triggered when stripes are hidden + * @event + * @name hide_stripes.jstree + */ + this.trigger('hide_stripes'); + }, + /** + * toggles the striped background on the container + * @name toggle_stripes() + */ + toggle_stripes : function () { if(this._data.core.themes.stripes) { this.hide_stripes(); } else { this.show_stripes(); } }, + /** + * shows the connecting dots (if the theme supports it) + * @name show_dots() + */ + show_dots : function () { + this._data.core.themes.dots = true; + this.get_container_ul().removeClass("jstree-no-dots"); + /** + * triggered when dots are shown + * @event + * @name show_dots.jstree + */ + this.trigger('show_dots'); + }, + /** + * hides the connecting dots + * @name hide_dots() + */ + hide_dots : function () { + this._data.core.themes.dots = false; + this.get_container_ul().addClass("jstree-no-dots"); + /** + * triggered when dots are hidden + * @event + * @name hide_dots.jstree + */ + this.trigger('hide_dots'); + }, + /** + * toggles the connecting dots + * @name toggle_dots() + */ + toggle_dots : function () { if(this._data.core.themes.dots) { this.hide_dots(); } else { this.show_dots(); } }, + /** + * show the node icons + * @name show_icons() + */ + show_icons : function () { + this._data.core.themes.icons = true; + this.get_container_ul().removeClass("jstree-no-icons"); + /** + * triggered when icons are shown + * @event + * @name show_icons.jstree + */ + this.trigger('show_icons'); + }, + /** + * hide the node icons + * @name hide_icons() + */ + hide_icons : function () { + this._data.core.themes.icons = false; + this.get_container_ul().addClass("jstree-no-icons"); + /** + * triggered when icons are hidden + * @event + * @name hide_icons.jstree + */ + this.trigger('hide_icons'); + }, + /** + * toggle the node icons + * @name toggle_icons() + */ + toggle_icons : function () { if(this._data.core.themes.icons) { this.hide_icons(); } else { this.show_icons(); } }, + /** + * show the node ellipsis + * @name show_icons() + */ + show_ellipsis : function () { + this._data.core.themes.ellipsis = true; + this.get_container_ul().addClass("jstree-ellipsis"); + /** + * triggered when ellisis is shown + * @event + * @name show_ellipsis.jstree + */ + this.trigger('show_ellipsis'); + }, + /** + * hide the node ellipsis + * @name hide_ellipsis() + */ + hide_ellipsis : function () { + this._data.core.themes.ellipsis = false; + this.get_container_ul().removeClass("jstree-ellipsis"); + /** + * triggered when ellisis is hidden + * @event + * @name hide_ellipsis.jstree + */ + this.trigger('hide_ellipsis'); + }, + /** + * toggle the node ellipsis + * @name toggle_icons() + */ + toggle_ellipsis : function () { if(this._data.core.themes.ellipsis) { this.hide_ellipsis(); } else { this.show_ellipsis(); } }, + /** + * set the node icon for a node + * @name set_icon(obj, icon) + * @param {mixed} obj + * @param {String} icon the new icon - can be a path to an icon or a className, if using an image that is in the current directory use a `./` prefix, otherwise it will be detected as a class + */ + set_icon : function (obj, icon) { + var t1, t2, dom, old; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.set_icon(obj[t1], icon); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + old = obj.icon; + obj.icon = icon === true || icon === null || icon === undefined || icon === '' ? true : icon; + dom = this.get_node(obj, true).children(".jstree-anchor").children(".jstree-themeicon"); + if(icon === false) { + dom.removeClass('jstree-themeicon-custom ' + old).css("background","").removeAttr("rel"); + this.hide_icon(obj); + } + else if(icon === true || icon === null || icon === undefined || icon === '') { + dom.removeClass('jstree-themeicon-custom ' + old).css("background","").removeAttr("rel"); + if(old === false) { this.show_icon(obj); } + } + else if(icon.indexOf("/") === -1 && icon.indexOf(".") === -1) { + dom.removeClass(old).css("background",""); + dom.addClass(icon + ' jstree-themeicon-custom').attr("rel",icon); + if(old === false) { this.show_icon(obj); } + } + else { + dom.removeClass(old).css("background",""); + dom.addClass('jstree-themeicon-custom').css("background", "url('" + icon + "') center center no-repeat").attr("rel",icon); + if(old === false) { this.show_icon(obj); } + } + return true; + }, + /** + * get the node icon for a node + * @name get_icon(obj) + * @param {mixed} obj + * @return {String} + */ + get_icon : function (obj) { + obj = this.get_node(obj); + return (!obj || obj.id === $.jstree.root) ? false : obj.icon; + }, + /** + * hide the icon on an individual node + * @name hide_icon(obj) + * @param {mixed} obj + */ + hide_icon : function (obj) { + var t1, t2; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.hide_icon(obj[t1]); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj === $.jstree.root) { return false; } + obj.icon = false; + this.get_node(obj, true).children(".jstree-anchor").children(".jstree-themeicon").addClass('jstree-themeicon-hidden'); + return true; + }, + /** + * show the icon on an individual node + * @name show_icon(obj) + * @param {mixed} obj + */ + show_icon : function (obj) { + var t1, t2, dom; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.show_icon(obj[t1]); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj === $.jstree.root) { return false; } + dom = this.get_node(obj, true); + obj.icon = dom.length ? dom.children(".jstree-anchor").children(".jstree-themeicon").attr('rel') : true; + if(!obj.icon) { obj.icon = true; } + dom.children(".jstree-anchor").children(".jstree-themeicon").removeClass('jstree-themeicon-hidden'); + return true; + } + }; + + // helpers + $.vakata = {}; + // collect attributes + $.vakata.attributes = function(node, with_values) { + node = $(node)[0]; + var attr = with_values ? {} : []; + if(node && node.attributes) { + $.each(node.attributes, function (i, v) { + if($.inArray(v.name.toLowerCase(),['style','contenteditable','hasfocus','tabindex']) !== -1) { return; } + if(v.value !== null && $.vakata.trim(v.value) !== '') { + if(with_values) { attr[v.name] = v.value; } + else { attr.push(v.name); } + } + }); + } + return attr; + }; + $.vakata.array_unique = function(array) { + var a = [], i, j, l, o = {}; + for(i = 0, l = array.length; i < l; i++) { + if(o[array[i]] === undefined) { + a.push(array[i]); + o[array[i]] = true; + } + } + return a; + }; + // remove item from array + $.vakata.array_remove = function(array, from) { + array.splice(from, 1); + return array; + //var rest = array.slice((to || from) + 1 || array.length); + //array.length = from < 0 ? array.length + from : from; + //array.push.apply(array, rest); + //return array; + }; + // remove item from array + $.vakata.array_remove_item = function(array, item) { + var tmp = $.inArray(item, array); + return tmp !== -1 ? $.vakata.array_remove(array, tmp) : array; + }; + $.vakata.array_filter = function(c,a,b,d,e) { + if (c.filter) { + return c.filter(a, b); + } + d=[]; + for (e in c) { + if (~~e+''===e+'' && e>=0 && a.call(b,c[e],+e,c)) { + d.push(c[e]); + } + } + return d; + }; + $.vakata.trim = function (text) { + return String.prototype.trim ? + String.prototype.trim.call(text.toString()) : + text.toString().replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + }; + $.vakata.is_function = function(obj) { + return typeof obj === "function" && typeof obj.nodeType !== "number"; + }; + $.vakata.is_array = Array.isArray || function (obj) { + return Object.prototype.toString.call(obj) === "[object Array]"; + }; + + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/Function/bind#polyfill + if (!Function.prototype.bind) { + Function.prototype.bind = function () { + var thatFunc = this, thatArg = arguments[0]; + var args = Array.prototype.slice.call(arguments, 1); + if (typeof thatFunc !== 'function') { + // closest thing possible to the ECMAScript 5 + // internal IsCallable function + throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); + } + return function(){ + var funcArgs = args.concat(Array.prototype.slice.call(arguments)); + return thatFunc.apply(thatArg, funcArgs); + }; + }; + } + + +/** + * ### Changed plugin + * + * This plugin adds more information to the `changed.jstree` event. The new data is contained in the `changed` event data property, and contains a lists of `selected` and `deselected` nodes. + */ + + $.jstree.plugins.changed = function (options, parent) { + var last = []; + this.trigger = function (ev, data) { + var i, j; + if(!data) { + data = {}; + } + if(ev.replace('.jstree','') === 'changed') { + data.changed = { selected : [], deselected : [] }; + var tmp = {}; + for(i = 0, j = last.length; i < j; i++) { + tmp[last[i]] = 1; + } + for(i = 0, j = data.selected.length; i < j; i++) { + if(!tmp[data.selected[i]]) { + data.changed.selected.push(data.selected[i]); + } + else { + tmp[data.selected[i]] = 2; + } + } + for(i = 0, j = last.length; i < j; i++) { + if(tmp[last[i]] === 1) { + data.changed.deselected.push(last[i]); + } + } + last = data.selected.slice(); + } + /** + * triggered when selection changes (the "changed" plugin enhances the original event with more data) + * @event + * @name changed.jstree + * @param {Object} node + * @param {Object} action the action that caused the selection to change + * @param {Array} selected the current selection + * @param {Object} changed an object containing two properties `selected` and `deselected` - both arrays of node IDs, which were selected or deselected since the last changed event + * @param {Object} event the event (if any) that triggered this changed event + * @plugin changed + */ + parent.trigger.call(this, ev, data); + }; + this.refresh = function (skip_loading, forget_state) { + last = []; + return parent.refresh.apply(this, arguments); + }; + }; + +/** + * ### Checkbox plugin + * + * This plugin renders checkbox icons in front of each node, making multiple selection much easier. + * It also supports tri-state behavior, meaning that if a node has a few of its children checked it will be rendered as undetermined, and state will be propagated up. + */ + + var _i = document.createElement('I'); + _i.className = 'jstree-icon jstree-checkbox'; + _i.setAttribute('role', 'presentation'); + /** + * stores all defaults for the checkbox plugin + * @name $.jstree.defaults.checkbox + * @plugin checkbox + */ + $.jstree.defaults.checkbox = { + /** + * a boolean indicating if checkboxes should be visible (can be changed at a later time using `show_checkboxes()` and `hide_checkboxes`). Defaults to `true`. + * @name $.jstree.defaults.checkbox.visible + * @plugin checkbox + */ + visible : true, + /** + * a boolean indicating if checkboxes should cascade down and have an undetermined state. Defaults to `true`. + * @name $.jstree.defaults.checkbox.three_state + * @plugin checkbox + */ + three_state : true, + /** + * a boolean indicating if clicking anywhere on the node should act as clicking on the checkbox. Defaults to `true`. + * @name $.jstree.defaults.checkbox.whole_node + * @plugin checkbox + */ + whole_node : true, + /** + * a boolean indicating if the selected style of a node should be kept, or removed. Defaults to `true`. + * @name $.jstree.defaults.checkbox.keep_selected_style + * @plugin checkbox + */ + keep_selected_style : true, + /** + * This setting controls how cascading and undetermined nodes are applied. + * If 'up' is in the string - cascading up is enabled, if 'down' is in the string - cascading down is enabled, if 'undetermined' is in the string - undetermined nodes will be used. + * If `three_state` is set to `true` this setting is automatically set to 'up+down+undetermined'. Defaults to ''. + * @name $.jstree.defaults.checkbox.cascade + * @plugin checkbox + */ + cascade : '', + /** + * This setting controls if checkbox are bound to the general tree selection or to an internal array maintained by the checkbox plugin. Defaults to `true`, only set to `false` if you know exactly what you are doing. + * @name $.jstree.defaults.checkbox.tie_selection + * @plugin checkbox + */ + tie_selection : true, + + /** + * This setting controls if cascading down affects disabled checkboxes + * @name $.jstree.defaults.checkbox.cascade_to_disabled + * @plugin checkbox + */ + cascade_to_disabled : true, + + /** + * This setting controls if cascading down affects hidden checkboxes + * @name $.jstree.defaults.checkbox.cascade_to_hidden + * @plugin checkbox + */ + cascade_to_hidden : true + }; + $.jstree.plugins.checkbox = function (options, parent) { + this.bind = function () { + parent.bind.call(this); + this._data.checkbox.uto = false; + this._data.checkbox.selected = []; + if(this.settings.checkbox.three_state) { + this.settings.checkbox.cascade = 'up+down+undetermined'; + } + this.element + .on("init.jstree", function () { + this._data.checkbox.visible = this.settings.checkbox.visible; + if(!this.settings.checkbox.keep_selected_style) { + this.element.addClass('jstree-checkbox-no-clicked'); + } + if(this.settings.checkbox.tie_selection) { + this.element.addClass('jstree-checkbox-selection'); + } + }.bind(this)) + .on("loading.jstree", function () { + this[ this._data.checkbox.visible ? 'show_checkboxes' : 'hide_checkboxes' ](); + }.bind(this)); + if(this.settings.checkbox.cascade.indexOf('undetermined') !== -1) { + this.element + .on('changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree', function () { + // only if undetermined is in setting + if(this._data.checkbox.uto) { clearTimeout(this._data.checkbox.uto); } + this._data.checkbox.uto = setTimeout(this._undetermined.bind(this), 50); + }.bind(this)); + } + if(!this.settings.checkbox.tie_selection) { + this.element + .on('model.jstree', function (e, data) { + var m = this._model.data, + p = m[data.parent], + dpc = data.nodes, + i, j; + for(i = 0, j = dpc.length; i < j; i++) { + m[dpc[i]].state.checked = m[dpc[i]].state.checked || (m[dpc[i]].original && m[dpc[i]].original.state && m[dpc[i]].original.state.checked); + if(m[dpc[i]].state.checked) { + this._data.checkbox.selected.push(dpc[i]); + } + } + }.bind(this)); + } + if(this.settings.checkbox.cascade.indexOf('up') !== -1 || this.settings.checkbox.cascade.indexOf('down') !== -1) { + this.element + .on('model.jstree', function (e, data) { + var m = this._model.data, + p = m[data.parent], + dpc = data.nodes, + chd = [], + c, i, j, k, l, tmp, s = this.settings.checkbox.cascade, t = this.settings.checkbox.tie_selection; + + if(s.indexOf('down') !== -1) { + // apply down + if(p.state[ t ? 'selected' : 'checked' ]) { + for(i = 0, j = dpc.length; i < j; i++) { + m[dpc[i]].state[ t ? 'selected' : 'checked' ] = true; + } + + this._data[ t ? 'core' : 'checkbox' ].selected = this._data[ t ? 'core' : 'checkbox' ].selected.concat(dpc); + } + else { + for(i = 0, j = dpc.length; i < j; i++) { + if(m[dpc[i]].state[ t ? 'selected' : 'checked' ]) { + for(k = 0, l = m[dpc[i]].children_d.length; k < l; k++) { + m[m[dpc[i]].children_d[k]].state[ t ? 'selected' : 'checked' ] = true; + } + this._data[ t ? 'core' : 'checkbox' ].selected = this._data[ t ? 'core' : 'checkbox' ].selected.concat(m[dpc[i]].children_d); + } + } + } + } + + if(s.indexOf('up') !== -1) { + // apply up + for(i = 0, j = p.children_d.length; i < j; i++) { + if(!m[p.children_d[i]].children.length) { + chd.push(m[p.children_d[i]].parent); + } + } + chd = $.vakata.array_unique(chd); + for(k = 0, l = chd.length; k < l; k++) { + p = m[chd[k]]; + while(p && p.id !== $.jstree.root) { + c = 0; + for(i = 0, j = p.children.length; i < j; i++) { + c += m[p.children[i]].state[ t ? 'selected' : 'checked' ]; + } + if(c === j) { + p.state[ t ? 'selected' : 'checked' ] = true; + this._data[ t ? 'core' : 'checkbox' ].selected.push(p.id); + tmp = this.get_node(p, true); + if(tmp && tmp.length) { + tmp.attr('aria-selected', true).children('.jstree-anchor').addClass( t ? 'jstree-clicked' : 'jstree-checked'); + } + } + else { + break; + } + p = this.get_node(p.parent); + } + } + } + + this._data[ t ? 'core' : 'checkbox' ].selected = $.vakata.array_unique(this._data[ t ? 'core' : 'checkbox' ].selected); + }.bind(this)) + .on(this.settings.checkbox.tie_selection ? 'select_node.jstree' : 'check_node.jstree', function (e, data) { + var self = this, + obj = data.node, + m = this._model.data, + par = this.get_node(obj.parent), + i, j, c, tmp, s = this.settings.checkbox.cascade, t = this.settings.checkbox.tie_selection, + sel = {}, cur = this._data[ t ? 'core' : 'checkbox' ].selected; + + for (i = 0, j = cur.length; i < j; i++) { + sel[cur[i]] = true; + } + + // apply down + if(s.indexOf('down') !== -1) { + //this._data[ t ? 'core' : 'checkbox' ].selected = $.vakata.array_unique(this._data[ t ? 'core' : 'checkbox' ].selected.concat(obj.children_d)); + var selectedIds = this._cascade_new_checked_state(obj.id, true); + var temp = obj.children_d.concat(obj.id); + for (i = 0, j = temp.length; i < j; i++) { + if (selectedIds.indexOf(temp[i]) > -1) { + sel[temp[i]] = true; + } + else { + delete sel[temp[i]]; + } + } + } + + // apply up + if(s.indexOf('up') !== -1) { + while(par && par.id !== $.jstree.root) { + c = 0; + for(i = 0, j = par.children.length; i < j; i++) { + c += m[par.children[i]].state[ t ? 'selected' : 'checked' ]; + } + if(c === j) { + par.state[ t ? 'selected' : 'checked' ] = true; + sel[par.id] = true; + //this._data[ t ? 'core' : 'checkbox' ].selected.push(par.id); + tmp = this.get_node(par, true); + if(tmp && tmp.length) { + tmp.attr('aria-selected', true).children('.jstree-anchor').addClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + } + else { + break; + } + par = this.get_node(par.parent); + } + } + + cur = []; + for (i in sel) { + if (sel.hasOwnProperty(i)) { + cur.push(i); + } + } + this._data[ t ? 'core' : 'checkbox' ].selected = cur; + }.bind(this)) + .on(this.settings.checkbox.tie_selection ? 'deselect_all.jstree' : 'uncheck_all.jstree', function (e, data) { + var obj = this.get_node($.jstree.root), + m = this._model.data, + i, j, tmp; + for(i = 0, j = obj.children_d.length; i < j; i++) { + tmp = m[obj.children_d[i]]; + if(tmp && tmp.original && tmp.original.state && tmp.original.state.undetermined) { + tmp.original.state.undetermined = false; + } + } + }.bind(this)) + .on(this.settings.checkbox.tie_selection ? 'deselect_node.jstree' : 'uncheck_node.jstree', function (e, data) { + var self = this, + obj = data.node, + dom = this.get_node(obj, true), + i, j, tmp, s = this.settings.checkbox.cascade, t = this.settings.checkbox.tie_selection, + cur = this._data[ t ? 'core' : 'checkbox' ].selected, sel = {}, + stillSelectedIds = [], + allIds = obj.children_d.concat(obj.id); + + // apply down + if(s.indexOf('down') !== -1) { + var selectedIds = this._cascade_new_checked_state(obj.id, false); + + cur = $.vakata.array_filter(cur, function(id) { + return allIds.indexOf(id) === -1 || selectedIds.indexOf(id) > -1; + }); + } + + // only apply up if cascade up is enabled and if this node is not selected + // (if all child nodes are disabled and cascade_to_disabled === false then this node will till be selected). + if(s.indexOf('up') !== -1 && cur.indexOf(obj.id) === -1) { + for(i = 0, j = obj.parents.length; i < j; i++) { + tmp = this._model.data[obj.parents[i]]; + tmp.state[ t ? 'selected' : 'checked' ] = false; + if(tmp && tmp.original && tmp.original.state && tmp.original.state.undetermined) { + tmp.original.state.undetermined = false; + } + tmp = this.get_node(obj.parents[i], true); + if(tmp && tmp.length) { + tmp.attr('aria-selected', false).children('.jstree-anchor').removeClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + } + + cur = $.vakata.array_filter(cur, function(id) { + return obj.parents.indexOf(id) === -1; + }); + } + + this._data[ t ? 'core' : 'checkbox' ].selected = cur; + }.bind(this)); + } + if(this.settings.checkbox.cascade.indexOf('up') !== -1) { + this.element + .on('delete_node.jstree', function (e, data) { + // apply up (whole handler) + var p = this.get_node(data.parent), + m = this._model.data, + i, j, c, tmp, t = this.settings.checkbox.tie_selection; + while(p && p.id !== $.jstree.root && !p.state[ t ? 'selected' : 'checked' ]) { + c = 0; + for(i = 0, j = p.children.length; i < j; i++) { + c += m[p.children[i]].state[ t ? 'selected' : 'checked' ]; + } + if(j > 0 && c === j) { + p.state[ t ? 'selected' : 'checked' ] = true; + this._data[ t ? 'core' : 'checkbox' ].selected.push(p.id); + tmp = this.get_node(p, true); + if(tmp && tmp.length) { + tmp.attr('aria-selected', true).children('.jstree-anchor').addClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + } + else { + break; + } + p = this.get_node(p.parent); + } + }.bind(this)) + .on('move_node.jstree', function (e, data) { + // apply up (whole handler) + var is_multi = data.is_multi, + old_par = data.old_parent, + new_par = this.get_node(data.parent), + m = this._model.data, + p, c, i, j, tmp, t = this.settings.checkbox.tie_selection; + if(!is_multi) { + p = this.get_node(old_par); + while(p && p.id !== $.jstree.root && !p.state[ t ? 'selected' : 'checked' ]) { + c = 0; + for(i = 0, j = p.children.length; i < j; i++) { + c += m[p.children[i]].state[ t ? 'selected' : 'checked' ]; + } + if(j > 0 && c === j) { + p.state[ t ? 'selected' : 'checked' ] = true; + this._data[ t ? 'core' : 'checkbox' ].selected.push(p.id); + tmp = this.get_node(p, true); + if(tmp && tmp.length) { + tmp.attr('aria-selected', true).children('.jstree-anchor').addClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + } + else { + break; + } + p = this.get_node(p.parent); + } + } + p = new_par; + while(p && p.id !== $.jstree.root) { + c = 0; + for(i = 0, j = p.children.length; i < j; i++) { + c += m[p.children[i]].state[ t ? 'selected' : 'checked' ]; + } + if(c === j) { + if(!p.state[ t ? 'selected' : 'checked' ]) { + p.state[ t ? 'selected' : 'checked' ] = true; + this._data[ t ? 'core' : 'checkbox' ].selected.push(p.id); + tmp = this.get_node(p, true); + if(tmp && tmp.length) { + tmp.attr('aria-selected', true).children('.jstree-anchor').addClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + } + } + else { + if(p.state[ t ? 'selected' : 'checked' ]) { + p.state[ t ? 'selected' : 'checked' ] = false; + this._data[ t ? 'core' : 'checkbox' ].selected = $.vakata.array_remove_item(this._data[ t ? 'core' : 'checkbox' ].selected, p.id); + tmp = this.get_node(p, true); + if(tmp && tmp.length) { + tmp.attr('aria-selected', false).children('.jstree-anchor').removeClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + } + else { + break; + } + } + p = this.get_node(p.parent); + } + }.bind(this)); + } + }; + /** + * get an array of all nodes whose state is "undetermined" + * @name get_undetermined([full]) + * @param {boolean} full: if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned + * @return {Array} + * @plugin checkbox + */ + this.get_undetermined = function (full) { + if (this.settings.checkbox.cascade.indexOf('undetermined') === -1) { + return []; + } + var i, j, k, l, o = {}, m = this._model.data, t = this.settings.checkbox.tie_selection, s = this._data[ t ? 'core' : 'checkbox' ].selected, p = [], tt = this, r = []; + for(i = 0, j = s.length; i < j; i++) { + if(m[s[i]] && m[s[i]].parents) { + for(k = 0, l = m[s[i]].parents.length; k < l; k++) { + if(o[m[s[i]].parents[k]] !== undefined) { + break; + } + if(m[s[i]].parents[k] !== $.jstree.root) { + o[m[s[i]].parents[k]] = true; + p.push(m[s[i]].parents[k]); + } + } + } + } + // attempt for server side undetermined state + this.element.find('.jstree-closed').not(':has(.jstree-children)') + .each(function () { + var tmp = tt.get_node(this), tmp2; + + if(!tmp) { return; } + + if(!tmp.state.loaded) { + if(tmp.original && tmp.original.state && tmp.original.state.undetermined && tmp.original.state.undetermined === true) { + if(o[tmp.id] === undefined && tmp.id !== $.jstree.root) { + o[tmp.id] = true; + p.push(tmp.id); + } + for(k = 0, l = tmp.parents.length; k < l; k++) { + if(o[tmp.parents[k]] === undefined && tmp.parents[k] !== $.jstree.root) { + o[tmp.parents[k]] = true; + p.push(tmp.parents[k]); + } + } + } + } + else { + for(i = 0, j = tmp.children_d.length; i < j; i++) { + tmp2 = m[tmp.children_d[i]]; + if(!tmp2.state.loaded && tmp2.original && tmp2.original.state && tmp2.original.state.undetermined && tmp2.original.state.undetermined === true) { + if(o[tmp2.id] === undefined && tmp2.id !== $.jstree.root) { + o[tmp2.id] = true; + p.push(tmp2.id); + } + for(k = 0, l = tmp2.parents.length; k < l; k++) { + if(o[tmp2.parents[k]] === undefined && tmp2.parents[k] !== $.jstree.root) { + o[tmp2.parents[k]] = true; + p.push(tmp2.parents[k]); + } + } + } + } + } + }); + for (i = 0, j = p.length; i < j; i++) { + if(!m[p[i]].state[ t ? 'selected' : 'checked' ]) { + r.push(full ? m[p[i]] : p[i]); + } + } + return r; + }; + /** + * set the undetermined state where and if necessary. Used internally. + * @private + * @name _undetermined() + * @plugin checkbox + */ + this._undetermined = function () { + if(this.element === null) { return; } + var p = this.get_undetermined(false), i, j, s; + + this.element.find('.jstree-undetermined').removeClass('jstree-undetermined'); + for (i = 0, j = p.length; i < j; i++) { + s = this.get_node(p[i], true); + if(s && s.length) { + s.children('.jstree-anchor').children('.jstree-checkbox').addClass('jstree-undetermined'); + } + } + }; + this.redraw_node = function(obj, deep, is_callback, force_render) { + obj = parent.redraw_node.apply(this, arguments); + if(obj) { + var i, j, tmp = null, icon = null; + for(i = 0, j = obj.childNodes.length; i < j; i++) { + if(obj.childNodes[i] && obj.childNodes[i].className && obj.childNodes[i].className.indexOf("jstree-anchor") !== -1) { + tmp = obj.childNodes[i]; + break; + } + } + if(tmp) { + if(!this.settings.checkbox.tie_selection && this._model.data[obj.id].state.checked) { tmp.className += ' jstree-checked'; } + icon = _i.cloneNode(false); + if(this._model.data[obj.id].state.checkbox_disabled) { icon.className += ' jstree-checkbox-disabled'; } + tmp.insertBefore(icon, tmp.childNodes[0]); + } + } + if(!is_callback && this.settings.checkbox.cascade.indexOf('undetermined') !== -1) { + if(this._data.checkbox.uto) { clearTimeout(this._data.checkbox.uto); } + this._data.checkbox.uto = setTimeout(this._undetermined.bind(this), 50); + } + return obj; + }; + /** + * show the node checkbox icons + * @name show_checkboxes() + * @plugin checkbox + */ + this.show_checkboxes = function () { this._data.core.themes.checkboxes = true; this.get_container_ul().removeClass("jstree-no-checkboxes"); }; + /** + * hide the node checkbox icons + * @name hide_checkboxes() + * @plugin checkbox + */ + this.hide_checkboxes = function () { this._data.core.themes.checkboxes = false; this.get_container_ul().addClass("jstree-no-checkboxes"); }; + /** + * toggle the node icons + * @name toggle_checkboxes() + * @plugin checkbox + */ + this.toggle_checkboxes = function () { if(this._data.core.themes.checkboxes) { this.hide_checkboxes(); } else { this.show_checkboxes(); } }; + /** + * checks if a node is in an undetermined state + * @name is_undetermined(obj) + * @param {mixed} obj + * @return {Boolean} + */ + this.is_undetermined = function (obj) { + obj = this.get_node(obj); + var s = this.settings.checkbox.cascade, i, j, t = this.settings.checkbox.tie_selection, d = this._data[ t ? 'core' : 'checkbox' ].selected, m = this._model.data; + if(!obj || obj.state[ t ? 'selected' : 'checked' ] === true || s.indexOf('undetermined') === -1 || (s.indexOf('down') === -1 && s.indexOf('up') === -1)) { + return false; + } + if(!obj.state.loaded && obj.original.state.undetermined === true) { + return true; + } + for(i = 0, j = obj.children_d.length; i < j; i++) { + if($.inArray(obj.children_d[i], d) !== -1 || (!m[obj.children_d[i]].state.loaded && m[obj.children_d[i]].original.state.undetermined)) { + return true; + } + } + return false; + }; + /** + * disable a node's checkbox + * @name disable_checkbox(obj) + * @param {mixed} obj an array can be used too + * @trigger disable_checkbox.jstree + * @plugin checkbox + */ + this.disable_checkbox = function (obj) { + var t1, t2, dom; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.disable_checkbox(obj[t1]); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + dom = this.get_node(obj, true); + if(!obj.state.checkbox_disabled) { + obj.state.checkbox_disabled = true; + if(dom && dom.length) { + dom.children('.jstree-anchor').children('.jstree-checkbox').addClass('jstree-checkbox-disabled'); + } + /** + * triggered when an node's checkbox is disabled + * @event + * @name disable_checkbox.jstree + * @param {Object} node + * @plugin checkbox + */ + this.trigger('disable_checkbox', { 'node' : obj }); + } + }; + /** + * enable a node's checkbox + * @name enable_checkbox(obj) + * @param {mixed} obj an array can be used too + * @trigger enable_checkbox.jstree + * @plugin checkbox + */ + this.enable_checkbox = function (obj) { + var t1, t2, dom; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.enable_checkbox(obj[t1]); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + dom = this.get_node(obj, true); + if(obj.state.checkbox_disabled) { + obj.state.checkbox_disabled = false; + if(dom && dom.length) { + dom.children('.jstree-anchor').children('.jstree-checkbox').removeClass('jstree-checkbox-disabled'); + } + /** + * triggered when an node's checkbox is enabled + * @event + * @name enable_checkbox.jstree + * @param {Object} node + * @plugin checkbox + */ + this.trigger('enable_checkbox', { 'node' : obj }); + } + }; + + this.activate_node = function (obj, e) { + if($(e.target).hasClass('jstree-checkbox-disabled')) { + return false; + } + if(this.settings.checkbox.tie_selection && (this.settings.checkbox.whole_node || $(e.target).hasClass('jstree-checkbox'))) { + e.ctrlKey = true; + } + if(this.settings.checkbox.tie_selection || (!this.settings.checkbox.whole_node && !$(e.target).hasClass('jstree-checkbox'))) { + return parent.activate_node.call(this, obj, e); + } + if(this.is_disabled(obj)) { + return false; + } + if(this.is_checked(obj)) { + this.uncheck_node(obj, e); + } + else { + this.check_node(obj, e); + } + this.trigger('activate_node', { 'node' : this.get_node(obj) }); + }; + + /** + * Cascades checked state to a node and all its descendants. This function does NOT affect hidden and disabled nodes (or their descendants). + * However if these unaffected nodes are already selected their ids will be included in the returned array. + * @private + * @name _cascade_new_checked_state(id, checkedState) + * @param {string} id the node ID + * @param {bool} checkedState should the nodes be checked or not + * @returns {Array} Array of all node id's (in this tree branch) that are checked. + */ + this._cascade_new_checked_state = function (id, checkedState) { + var self = this; + var t = this.settings.checkbox.tie_selection; + var node = this._model.data[id]; + var selectedNodeIds = []; + var selectedChildrenIds = [], i, j, selectedChildIds; + + if ( + (this.settings.checkbox.cascade_to_disabled || !node.state.disabled) && + (this.settings.checkbox.cascade_to_hidden || !node.state.hidden) + ) { + //First try and check/uncheck the children + if (node.children) { + for (i = 0, j = node.children.length; i < j; i++) { + var childId = node.children[i]; + selectedChildIds = self._cascade_new_checked_state(childId, checkedState); + selectedNodeIds = selectedNodeIds.concat(selectedChildIds); + if (selectedChildIds.indexOf(childId) > -1) { + selectedChildrenIds.push(childId); + } + } + } + + var dom = self.get_node(node, true); + + //A node's state is undetermined if some but not all of it's children are checked/selected . + var undetermined = selectedChildrenIds.length > 0 && selectedChildrenIds.length < node.children.length; + + if(node.original && node.original.state && node.original.state.undetermined) { + node.original.state.undetermined = undetermined; + } + + //If a node is undetermined then remove selected class + if (undetermined) { + node.state[ t ? 'selected' : 'checked' ] = false; + dom.attr('aria-selected', false).children('.jstree-anchor').removeClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + //Otherwise, if the checkedState === true (i.e. the node is being checked now) and all of the node's children are checked (if it has any children), + //check the node and style it correctly. + else if (checkedState && selectedChildrenIds.length === node.children.length) { + node.state[ t ? 'selected' : 'checked' ] = checkedState; + selectedNodeIds.push(node.id); + + dom.attr('aria-selected', true).children('.jstree-anchor').addClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + else { + node.state[ t ? 'selected' : 'checked' ] = false; + dom.attr('aria-selected', false).children('.jstree-anchor').removeClass(t ? 'jstree-clicked' : 'jstree-checked'); + } + } + else { + selectedChildIds = this.get_checked_descendants(id); + + if (node.state[ t ? 'selected' : 'checked' ]) { + selectedChildIds.push(node.id); + } + + selectedNodeIds = selectedNodeIds.concat(selectedChildIds); + } + + return selectedNodeIds; + }; + + /** + * Gets ids of nodes selected in branch (of tree) specified by id (does not include the node specified by id) + * @name get_checked_descendants(obj) + * @param {string} id the node ID + * @return {Array} array of IDs + * @plugin checkbox + */ + this.get_checked_descendants = function (id) { + var self = this; + var t = self.settings.checkbox.tie_selection; + var node = self._model.data[id]; + + return $.vakata.array_filter(node.children_d, function(_id) { + return self._model.data[_id].state[ t ? 'selected' : 'checked' ]; + }); + }; + + /** + * check a node (only if tie_selection in checkbox settings is false, otherwise select_node will be called internally) + * @name check_node(obj) + * @param {mixed} obj an array can be used to check multiple nodes + * @trigger check_node.jstree + * @plugin checkbox + */ + this.check_node = function (obj, e) { + if(this.settings.checkbox.tie_selection) { return this.select_node(obj, false, true, e); } + var dom, t1, t2, th; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.check_node(obj[t1], e); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + dom = this.get_node(obj, true); + if(!obj.state.checked) { + obj.state.checked = true; + this._data.checkbox.selected.push(obj.id); + if(dom && dom.length) { + dom.children('.jstree-anchor').addClass('jstree-checked'); + } + /** + * triggered when an node is checked (only if tie_selection in checkbox settings is false) + * @event + * @name check_node.jstree + * @param {Object} node + * @param {Array} selected the current selection + * @param {Object} event the event (if any) that triggered this check_node + * @plugin checkbox + */ + this.trigger('check_node', { 'node' : obj, 'selected' : this._data.checkbox.selected, 'event' : e }); + } + }; + /** + * uncheck a node (only if tie_selection in checkbox settings is false, otherwise deselect_node will be called internally) + * @name uncheck_node(obj) + * @param {mixed} obj an array can be used to uncheck multiple nodes + * @trigger uncheck_node.jstree + * @plugin checkbox + */ + this.uncheck_node = function (obj, e) { + if(this.settings.checkbox.tie_selection) { return this.deselect_node(obj, false, e); } + var t1, t2, dom; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.uncheck_node(obj[t1], e); + } + return true; + } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { + return false; + } + dom = this.get_node(obj, true); + if(obj.state.checked) { + obj.state.checked = false; + this._data.checkbox.selected = $.vakata.array_remove_item(this._data.checkbox.selected, obj.id); + if(dom.length) { + dom.children('.jstree-anchor').removeClass('jstree-checked'); + } + /** + * triggered when an node is unchecked (only if tie_selection in checkbox settings is false) + * @event + * @name uncheck_node.jstree + * @param {Object} node + * @param {Array} selected the current selection + * @param {Object} event the event (if any) that triggered this uncheck_node + * @plugin checkbox + */ + this.trigger('uncheck_node', { 'node' : obj, 'selected' : this._data.checkbox.selected, 'event' : e }); + } + }; + + /** + * checks all nodes in the tree (only if tie_selection in checkbox settings is false, otherwise select_all will be called internally) + * @name check_all() + * @trigger check_all.jstree, changed.jstree + * @plugin checkbox + */ + this.check_all = function () { + if(this.settings.checkbox.tie_selection) { return this.select_all(); } + var tmp = this._data.checkbox.selected.concat([]), i, j; + this._data.checkbox.selected = this._model.data[$.jstree.root].children_d.concat(); + for(i = 0, j = this._data.checkbox.selected.length; i < j; i++) { + if(this._model.data[this._data.checkbox.selected[i]]) { + this._model.data[this._data.checkbox.selected[i]].state.checked = true; + } + } + this.redraw(true); + /** + * triggered when all nodes are checked (only if tie_selection in checkbox settings is false) + * @event + * @name check_all.jstree + * @param {Array} selected the current selection + * @plugin checkbox + */ + this.trigger('check_all', { 'selected' : this._data.checkbox.selected }); + }; + /** + * uncheck all checked nodes (only if tie_selection in checkbox settings is false, otherwise deselect_all will be called internally) + * @name uncheck_all() + * @trigger uncheck_all.jstree + * @plugin checkbox + */ + this.uncheck_all = function () { + if(this.settings.checkbox.tie_selection) { return this.deselect_all(); } + var tmp = this._data.checkbox.selected.concat([]), i, j; + for(i = 0, j = this._data.checkbox.selected.length; i < j; i++) { + if(this._model.data[this._data.checkbox.selected[i]]) { + this._model.data[this._data.checkbox.selected[i]].state.checked = false; + } + } + this._data.checkbox.selected = []; + this.element.find('.jstree-checked').removeClass('jstree-checked'); + /** + * triggered when all nodes are unchecked (only if tie_selection in checkbox settings is false) + * @event + * @name uncheck_all.jstree + * @param {Object} node the previous selection + * @param {Array} selected the current selection + * @plugin checkbox + */ + this.trigger('uncheck_all', { 'selected' : this._data.checkbox.selected, 'node' : tmp }); + }; + /** + * checks if a node is checked (if tie_selection is on in the settings this function will return the same as is_selected) + * @name is_checked(obj) + * @param {mixed} obj + * @return {Boolean} + * @plugin checkbox + */ + this.is_checked = function (obj) { + if(this.settings.checkbox.tie_selection) { return this.is_selected(obj); } + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + return obj.state.checked; + }; + /** + * get an array of all checked nodes (if tie_selection is on in the settings this function will return the same as get_selected) + * @name get_checked([full]) + * @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned + * @return {Array} + * @plugin checkbox + */ + this.get_checked = function (full) { + if(this.settings.checkbox.tie_selection) { return this.get_selected(full); } + return full ? $.map(this._data.checkbox.selected, function (i) { return this.get_node(i); }.bind(this)) : this._data.checkbox.selected.slice(); + }; + /** + * get an array of all top level checked nodes (ignoring children of checked nodes) (if tie_selection is on in the settings this function will return the same as get_top_selected) + * @name get_top_checked([full]) + * @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned + * @return {Array} + * @plugin checkbox + */ + this.get_top_checked = function (full) { + if(this.settings.checkbox.tie_selection) { return this.get_top_selected(full); } + var tmp = this.get_checked(true), + obj = {}, i, j, k, l; + for(i = 0, j = tmp.length; i < j; i++) { + obj[tmp[i].id] = tmp[i]; + } + for(i = 0, j = tmp.length; i < j; i++) { + for(k = 0, l = tmp[i].children_d.length; k < l; k++) { + if(obj[tmp[i].children_d[k]]) { + delete obj[tmp[i].children_d[k]]; + } + } + } + tmp = []; + for(i in obj) { + if(obj.hasOwnProperty(i)) { + tmp.push(i); + } + } + return full ? $.map(tmp, function (i) { return this.get_node(i); }.bind(this)) : tmp; + }; + /** + * get an array of all bottom level checked nodes (ignoring selected parents) (if tie_selection is on in the settings this function will return the same as get_bottom_selected) + * @name get_bottom_checked([full]) + * @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned + * @return {Array} + * @plugin checkbox + */ + this.get_bottom_checked = function (full) { + if(this.settings.checkbox.tie_selection) { return this.get_bottom_selected(full); } + var tmp = this.get_checked(true), + obj = [], i, j; + for(i = 0, j = tmp.length; i < j; i++) { + if(!tmp[i].children.length) { + obj.push(tmp[i].id); + } + } + return full ? $.map(obj, function (i) { return this.get_node(i); }.bind(this)) : obj; + }; + this.load_node = function (obj, callback) { + var k, l, i, j, c, tmp; + if(!$.vakata.is_array(obj) && !this.settings.checkbox.tie_selection) { + tmp = this.get_node(obj); + if(tmp && tmp.state.loaded) { + for(k = 0, l = tmp.children_d.length; k < l; k++) { + if(this._model.data[tmp.children_d[k]].state.checked) { + c = true; + this._data.checkbox.selected = $.vakata.array_remove_item(this._data.checkbox.selected, tmp.children_d[k]); + } + } + } + } + return parent.load_node.apply(this, arguments); + }; + this.get_state = function () { + var state = parent.get_state.apply(this, arguments); + if(this.settings.checkbox.tie_selection) { return state; } + state.checkbox = this._data.checkbox.selected.slice(); + return state; + }; + this.set_state = function (state, callback) { + var res = parent.set_state.apply(this, arguments); + if(res && state.checkbox) { + if(!this.settings.checkbox.tie_selection) { + this.uncheck_all(); + var _this = this; + $.each(state.checkbox, function (i, v) { + _this.check_node(v); + }); + } + delete state.checkbox; + this.set_state(state, callback); + return false; + } + return res; + }; + this.refresh = function (skip_loading, forget_state) { + if(this.settings.checkbox.tie_selection) { + this._data.checkbox.selected = []; + } + return parent.refresh.apply(this, arguments); + }; + }; + + // include the checkbox plugin by default + // $.jstree.defaults.plugins.push("checkbox"); + + +/** + * ### Conditionalselect plugin + * + * This plugin allows defining a callback to allow or deny node selection by user input (activate node method). + */ + + /** + * a callback (function) which is invoked in the instance's scope and receives two arguments - the node and the event that triggered the `activate_node` call. Returning false prevents working with the node, returning true allows invoking activate_node. Defaults to returning `true`. + * @name $.jstree.defaults.checkbox.visible + * @plugin checkbox + */ + $.jstree.defaults.conditionalselect = function () { return true; }; + $.jstree.plugins.conditionalselect = function (options, parent) { + // own function + this.activate_node = function (obj, e) { + if(this.settings.conditionalselect.call(this, this.get_node(obj), e)) { + return parent.activate_node.call(this, obj, e); + } + }; + }; + + +/** + * ### Contextmenu plugin + * + * Shows a context menu when a node is right-clicked. + */ + + /** + * stores all defaults for the contextmenu plugin + * @name $.jstree.defaults.contextmenu + * @plugin contextmenu + */ + $.jstree.defaults.contextmenu = { + /** + * a boolean indicating if the node should be selected when the context menu is invoked on it. Defaults to `true`. + * @name $.jstree.defaults.contextmenu.select_node + * @plugin contextmenu + */ + select_node : true, + /** + * a boolean indicating if the menu should be shown aligned with the node. Defaults to `true`, otherwise the mouse coordinates are used. + * @name $.jstree.defaults.contextmenu.show_at_node + * @plugin contextmenu + */ + show_at_node : true, + /** + * an object of actions, or a function that accepts a node and a callback function and calls the callback function with an object of actions available for that node (you can also return the items too). + * + * Each action consists of a key (a unique name) and a value which is an object with the following properties (only label and action are required). Once a menu item is activated the `action` function will be invoked with an object containing the following keys: item - the contextmenu item definition as seen below, reference - the DOM node that was used (the tree node), element - the contextmenu DOM element, position - an object with x/y properties indicating the position of the menu. + * + * * `separator_before` - a boolean indicating if there should be a separator before this item + * * `separator_after` - a boolean indicating if there should be a separator after this item + * * `_disabled` - a boolean indicating if this action should be disabled + * * `label` - a string - the name of the action (could be a function returning a string) + * * `title` - a string - an optional tooltip for the item + * * `action` - a function to be executed if this item is chosen, the function will receive + * * `icon` - a string, can be a path to an icon or a className, if using an image that is in the current directory use a `./` prefix, otherwise it will be detected as a class + * * `shortcut` - keyCode which will trigger the action if the menu is open (for example `113` for rename, which equals F2) + * * `shortcut_label` - shortcut label (like for example `F2` for rename) + * * `submenu` - an object with the same structure as $.jstree.defaults.contextmenu.items which can be used to create a submenu - each key will be rendered as a separate option in a submenu that will appear once the current item is hovered + * + * @name $.jstree.defaults.contextmenu.items + * @plugin contextmenu + */ + items : function (o, cb) { // Could be an object directly + return { + "create" : { + "separator_before" : false, + "separator_after" : true, + "_disabled" : false, //(this.check("create_node", data.reference, {}, "last")), + "label" : "Create", + "action" : function (data) { + var inst = $.jstree.reference(data.reference), + obj = inst.get_node(data.reference); + inst.create_node(obj, {}, "last", function (new_node) { + try { + inst.edit(new_node); + } catch (ex) { + setTimeout(function () { inst.edit(new_node); },0); + } + }); + } + }, + "rename" : { + "separator_before" : false, + "separator_after" : false, + "_disabled" : false, //(this.check("rename_node", data.reference, this.get_parent(data.reference), "")), + "label" : "Rename", + /*! + "shortcut" : 113, + "shortcut_label" : 'F2', + "icon" : "glyphicon glyphicon-leaf", + */ + "action" : function (data) { + var inst = $.jstree.reference(data.reference), + obj = inst.get_node(data.reference); + inst.edit(obj); + } + }, + "remove" : { + "separator_before" : false, + "icon" : false, + "separator_after" : false, + "_disabled" : false, //(this.check("delete_node", data.reference, this.get_parent(data.reference), "")), + "label" : "Delete", + "action" : function (data) { + var inst = $.jstree.reference(data.reference), + obj = inst.get_node(data.reference); + if(inst.is_selected(obj)) { + inst.delete_node(inst.get_selected()); + } + else { + inst.delete_node(obj); + } + } + }, + "ccp" : { + "separator_before" : true, + "icon" : false, + "separator_after" : false, + "label" : "Edit", + "action" : false, + "submenu" : { + "cut" : { + "separator_before" : false, + "separator_after" : false, + "label" : "Cut", + "action" : function (data) { + var inst = $.jstree.reference(data.reference), + obj = inst.get_node(data.reference); + if(inst.is_selected(obj)) { + inst.cut(inst.get_top_selected()); + } + else { + inst.cut(obj); + } + } + }, + "copy" : { + "separator_before" : false, + "icon" : false, + "separator_after" : false, + "label" : "Copy", + "action" : function (data) { + var inst = $.jstree.reference(data.reference), + obj = inst.get_node(data.reference); + if(inst.is_selected(obj)) { + inst.copy(inst.get_top_selected()); + } + else { + inst.copy(obj); + } + } + }, + "paste" : { + "separator_before" : false, + "icon" : false, + "_disabled" : function (data) { + return !$.jstree.reference(data.reference).can_paste(); + }, + "separator_after" : false, + "label" : "Paste", + "action" : function (data) { + var inst = $.jstree.reference(data.reference), + obj = inst.get_node(data.reference); + inst.paste(obj); + } + } + } + } + }; + } + }; + + $.jstree.plugins.contextmenu = function (options, parent) { + this.bind = function () { + parent.bind.call(this); + + var last_ts = 0, cto = null, ex, ey; + this.element + .on("init.jstree loading.jstree ready.jstree", function () { + this.get_container_ul().addClass('jstree-contextmenu'); + }.bind(this)) + .on("contextmenu.jstree", ".jstree-anchor", function (e, data) { + if (e.target.tagName.toLowerCase() === 'input') { + return; + } + e.preventDefault(); + last_ts = e.ctrlKey ? +new Date() : 0; + if(data || cto) { + last_ts = (+new Date()) + 10000; + } + if(cto) { + clearTimeout(cto); + } + if(!this.is_loading(e.currentTarget)) { + this.show_contextmenu(e.currentTarget, e.pageX, e.pageY, e); + } + }.bind(this)) + .on("click.jstree", ".jstree-anchor", function (e) { + if(this._data.contextmenu.visible && (!last_ts || (+new Date()) - last_ts > 250)) { // work around safari & macOS ctrl+click + $.vakata.context.hide(); + } + last_ts = 0; + }.bind(this)) + .on("touchstart.jstree", ".jstree-anchor", function (e) { + if(!e.originalEvent || !e.originalEvent.changedTouches || !e.originalEvent.changedTouches[0]) { + return; + } + ex = e.originalEvent.changedTouches[0].clientX; + ey = e.originalEvent.changedTouches[0].clientY; + cto = setTimeout(function () { + $(e.currentTarget).trigger('contextmenu', true); + }, 750); + }) + .on('touchmove.vakata.jstree', function (e) { + if(cto && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0] && (Math.abs(ex - e.originalEvent.changedTouches[0].clientX) > 10 || Math.abs(ey - e.originalEvent.changedTouches[0].clientY) > 10)) { + clearTimeout(cto); + $.vakata.context.hide(); + } + }) + .on('touchend.vakata.jstree', function (e) { + if(cto) { + clearTimeout(cto); + } + }); + + /*! + if(!('oncontextmenu' in document.body) && ('ontouchstart' in document.body)) { + var el = null, tm = null; + this.element + .on("touchstart", ".jstree-anchor", function (e) { + el = e.currentTarget; + tm = +new Date(); + $(document).one("touchend", function (e) { + e.target = document.elementFromPoint(e.originalEvent.targetTouches[0].pageX - window.pageXOffset, e.originalEvent.targetTouches[0].pageY - window.pageYOffset); + e.currentTarget = e.target; + tm = ((+(new Date())) - tm); + if(e.target === el && tm > 600 && tm < 1000) { + e.preventDefault(); + $(el).trigger('contextmenu', e); + } + el = null; + tm = null; + }); + }); + } + */ + $(document).on("context_hide.vakata.jstree", function (e, data) { + this._data.contextmenu.visible = false; + $(data.reference).removeClass('jstree-context'); + }.bind(this)); + }; + this.teardown = function () { + if(this._data.contextmenu.visible) { + $.vakata.context.hide(); + } + $(document).off("context_hide.vakata.jstree"); + parent.teardown.call(this); + }; + + /** + * prepare and show the context menu for a node + * @name show_contextmenu(obj [, x, y]) + * @param {mixed} obj the node + * @param {Number} x the x-coordinate relative to the document to show the menu at + * @param {Number} y the y-coordinate relative to the document to show the menu at + * @param {Object} e the event if available that triggered the contextmenu + * @plugin contextmenu + * @trigger show_contextmenu.jstree + */ + this.show_contextmenu = function (obj, x, y, e) { + obj = this.get_node(obj); + if(!obj || obj.id === $.jstree.root) { return false; } + var s = this.settings.contextmenu, + d = this.get_node(obj, true), + a = d.children(".jstree-anchor"), + o = false, + i = false; + if(s.show_at_node || x === undefined || y === undefined) { + o = a.offset(); + x = o.left; + y = o.top + this._data.core.li_height; + } + if(this.settings.contextmenu.select_node && !this.is_selected(obj)) { + this.activate_node(obj, e); + } + + i = s.items; + if($.vakata.is_function(i)) { + i = i.call(this, obj, function (i) { + this._show_contextmenu(obj, x, y, i); + }.bind(this)); + } + if($.isPlainObject(i)) { + this._show_contextmenu(obj, x, y, i); + } + }; + /** + * show the prepared context menu for a node + * @name _show_contextmenu(obj, x, y, i) + * @param {mixed} obj the node + * @param {Number} x the x-coordinate relative to the document to show the menu at + * @param {Number} y the y-coordinate relative to the document to show the menu at + * @param {Number} i the object of items to show + * @plugin contextmenu + * @trigger show_contextmenu.jstree + * @private + */ + this._show_contextmenu = function (obj, x, y, i) { + var d = this.get_node(obj, true), + a = d.children(".jstree-anchor"); + $(document).one("context_show.vakata.jstree", function (e, data) { + var cls = 'jstree-contextmenu jstree-' + this.get_theme() + '-contextmenu'; + $(data.element).addClass(cls); + a.addClass('jstree-context'); + }.bind(this)); + this._data.contextmenu.visible = true; + $.vakata.context.show(a, { 'x' : x, 'y' : y }, i); + /** + * triggered when the contextmenu is shown for a node + * @event + * @name show_contextmenu.jstree + * @param {Object} node the node + * @param {Number} x the x-coordinate of the menu relative to the document + * @param {Number} y the y-coordinate of the menu relative to the document + * @plugin contextmenu + */ + this.trigger('show_contextmenu', { "node" : obj, "x" : x, "y" : y }); + }; + }; + + // contextmenu helper + (function ($) { + var right_to_left = false, + vakata_context = { + element : false, + reference : false, + position_x : 0, + position_y : 0, + items : [], + html : "", + is_visible : false + }; + + $.vakata.context = { + settings : { + hide_onmouseleave : 0, + icons : true + }, + _trigger : function (event_name) { + $(document).triggerHandler("context_" + event_name + ".vakata", { + "reference" : vakata_context.reference, + "element" : vakata_context.element, + "position" : { + "x" : vakata_context.position_x, + "y" : vakata_context.position_y + } + }); + }, + _execute : function (i) { + i = vakata_context.items[i]; + return i && (!i._disabled || ($.vakata.is_function(i._disabled) && !i._disabled({ "item" : i, "reference" : vakata_context.reference, "element" : vakata_context.element }))) && i.action ? i.action.call(null, { + "item" : i, + "reference" : vakata_context.reference, + "element" : vakata_context.element, + "position" : { + "x" : vakata_context.position_x, + "y" : vakata_context.position_y + } + }) : false; + }, + _parse : function (o, is_callback) { + if(!o) { return false; } + if(!is_callback) { + vakata_context.html = ""; + vakata_context.items = []; + } + var str = "", + sep = false, + tmp; + + if(is_callback) { str += "<"+"ul>"; } + $.each(o, function (i, val) { + if(!val) { return true; } + vakata_context.items.push(val); + if(!sep && val.separator_before) { + str += "<"+"li class='vakata-context-separator'><"+"a href='#' " + ($.vakata.context.settings.icons ? '' : 'class="vakata-context-no-icons"') + "> <"+"/a><"+"/li>"; + } + sep = false; + str += "<"+"li class='" + (val._class || "") + (val._disabled === true || ($.vakata.is_function(val._disabled) && val._disabled({ "item" : val, "reference" : vakata_context.reference, "element" : vakata_context.element })) ? " vakata-contextmenu-disabled " : "") + "' "+(val.shortcut?" data-shortcut='"+val.shortcut+"' ":'')+">"; + str += "<"+"a href='#' rel='" + (vakata_context.items.length - 1) + "' " + (val.title ? "title='" + val.title + "'" : "") + ">"; + if($.vakata.context.settings.icons) { + str += "<"+"i "; + if(val.icon) { + if(val.icon.indexOf("/") !== -1 || val.icon.indexOf(".") !== -1) { str += " style='background:url(\"" + val.icon + "\") center center no-repeat' "; } + else { str += " class='" + val.icon + "' "; } + } + str += "><"+"/i><"+"span class='vakata-contextmenu-sep'> <"+"/span>"; + } + str += ($.vakata.is_function(val.label) ? val.label({ "item" : i, "reference" : vakata_context.reference, "element" : vakata_context.element }) : val.label) + (val.shortcut?' '+ (val.shortcut_label || '') +'':'') + "<"+"/a>"; + if(val.submenu) { + tmp = $.vakata.context._parse(val.submenu, true); + if(tmp) { str += tmp; } + } + str += "<"+"/li>"; + if(val.separator_after) { + str += "<"+"li class='vakata-context-separator'><"+"a href='#' " + ($.vakata.context.settings.icons ? '' : 'class="vakata-context-no-icons"') + "> <"+"/a><"+"/li>"; + sep = true; + } + }); + str = str.replace(/
  • <\/li\>$/,""); + if(is_callback) { str += ""; } + /** + * triggered on the document when the contextmenu is parsed (HTML is built) + * @event + * @plugin contextmenu + * @name context_parse.vakata + * @param {jQuery} reference the element that was right clicked + * @param {jQuery} element the DOM element of the menu itself + * @param {Object} position the x & y coordinates of the menu + */ + if(!is_callback) { vakata_context.html = str; $.vakata.context._trigger("parse"); } + return str.length > 10 ? str : false; + }, + _show_submenu : function (o) { + o = $(o); + if(!o.length || !o.children("ul").length) { return; } + var e = o.children("ul"), + xl = o.offset().left, + x = xl + o.outerWidth(), + y = o.offset().top, + w = e.width(), + h = e.height(), + dw = $(window).width() + $(window).scrollLeft(), + dh = $(window).height() + $(window).scrollTop(); + // може да се спести е една проверка - дали няма някой от класовете вече нагоре + if(right_to_left) { + o[x - (w + 10 + o.outerWidth()) < 0 ? "addClass" : "removeClass"]("vakata-context-left"); + } + else { + o[x + w > dw && xl > dw - x ? "addClass" : "removeClass"]("vakata-context-right"); + } + if(y + h + 10 > dh) { + e.css("bottom","-1px"); + } + + //if does not fit - stick it to the side + if (o.hasClass('vakata-context-right')) { + if (xl < w) { + e.css("margin-right", xl - w); + } + } else { + if (dw - x < w) { + e.css("margin-left", dw - x - w); + } + } + + e.show(); + }, + show : function (reference, position, data) { + var o, e, x, y, w, h, dw, dh, cond = true; + if(vakata_context.element && vakata_context.element.length) { + vakata_context.element.width(''); + } + switch(cond) { + case (!position && !reference): + return false; + case (!!position && !!reference): + vakata_context.reference = reference; + vakata_context.position_x = position.x; + vakata_context.position_y = position.y; + break; + case (!position && !!reference): + vakata_context.reference = reference; + o = reference.offset(); + vakata_context.position_x = o.left + reference.outerHeight(); + vakata_context.position_y = o.top; + break; + case (!!position && !reference): + vakata_context.position_x = position.x; + vakata_context.position_y = position.y; + break; + } + if(!!reference && !data && $(reference).data('vakata_contextmenu')) { + data = $(reference).data('vakata_contextmenu'); + } + if($.vakata.context._parse(data)) { + vakata_context.element.html(vakata_context.html); + } + if(vakata_context.items.length) { + vakata_context.element.appendTo(document.body); + e = vakata_context.element; + x = vakata_context.position_x; + y = vakata_context.position_y; + w = e.width(); + h = e.height(); + dw = $(window).width() + $(window).scrollLeft(); + dh = $(window).height() + $(window).scrollTop(); + if(right_to_left) { + x -= (e.outerWidth() - $(reference).outerWidth()); + if(x < $(window).scrollLeft() + 20) { + x = $(window).scrollLeft() + 20; + } + } + if(x + w + 20 > dw) { + x = dw - (w + 20); + } + if(y + h + 20 > dh) { + y = dh - (h + 20); + } + + vakata_context.element + .css({ "left" : x, "top" : y }) + .show() + .find('a').first().trigger('focus').parent().addClass("vakata-context-hover"); + vakata_context.is_visible = true; + /** + * triggered on the document when the contextmenu is shown + * @event + * @plugin contextmenu + * @name context_show.vakata + * @param {jQuery} reference the element that was right clicked + * @param {jQuery} element the DOM element of the menu itself + * @param {Object} position the x & y coordinates of the menu + */ + $.vakata.context._trigger("show"); + } + }, + hide : function () { + if(vakata_context.is_visible) { + vakata_context.element.hide().find("ul").hide().end().find(':focus').trigger('blur').end().detach(); + vakata_context.is_visible = false; + /** + * triggered on the document when the contextmenu is hidden + * @event + * @plugin contextmenu + * @name context_hide.vakata + * @param {jQuery} reference the element that was right clicked + * @param {jQuery} element the DOM element of the menu itself + * @param {Object} position the x & y coordinates of the menu + */ + $.vakata.context._trigger("hide"); + } + } + }; + $(function () { + right_to_left = $(document.body).css("direction") === "rtl"; + var to = false; + + vakata_context.element = $("
      "); + vakata_context.element + .on("mouseenter", "li", function (e) { + e.stopImmediatePropagation(); + + if($.contains(this, e.relatedTarget)) { + // премахнато заради delegate mouseleave по-долу + // $(this).find(".vakata-context-hover").removeClass("vakata-context-hover"); + return; + } + + if(to) { clearTimeout(to); } + vakata_context.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(); + + $(this) + .siblings().find("ul").hide().end().end() + .parentsUntil(".vakata-context", "li").addBack().addClass("vakata-context-hover"); + $.vakata.context._show_submenu(this); + }) + // тестово - дали не натоварва? + .on("mouseleave", "li", function (e) { + if($.contains(this, e.relatedTarget)) { return; } + $(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover"); + }) + .on("mouseleave", function (e) { + $(this).find(".vakata-context-hover").removeClass("vakata-context-hover"); + if($.vakata.context.settings.hide_onmouseleave) { + to = setTimeout( + (function (t) { + return function () { $.vakata.context.hide(); }; + }(this)), $.vakata.context.settings.hide_onmouseleave); + } + }) + .on("click", "a", function (e) { + e.preventDefault(); + //}) + //.on("mouseup", "a", function (e) { + if(!$(this).trigger('blur').parent().hasClass("vakata-context-disabled") && $.vakata.context._execute($(this).attr("rel")) !== false) { + $.vakata.context.hide(); + } + }) + .on('keydown', 'a', function (e) { + var o = null; + switch(e.which) { + case 13: + case 32: + e.type = "click"; + e.preventDefault(); + $(e.currentTarget).trigger(e); + break; + case 37: + if(vakata_context.is_visible) { + vakata_context.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children('a').trigger('focus'); + e.stopImmediatePropagation(); + e.preventDefault(); + } + break; + case 38: + if(vakata_context.is_visible) { + o = vakata_context.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first(); + if(!o.length) { o = vakata_context.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last(); } + o.addClass("vakata-context-hover").children('a').trigger('focus'); + e.stopImmediatePropagation(); + e.preventDefault(); + } + break; + case 39: + if(vakata_context.is_visible) { + vakata_context.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children('a').trigger('focus'); + e.stopImmediatePropagation(); + e.preventDefault(); + } + break; + case 40: + if(vakata_context.is_visible) { + o = vakata_context.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first(); + if(!o.length) { o = vakata_context.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first(); } + o.addClass("vakata-context-hover").children('a').trigger('focus'); + e.stopImmediatePropagation(); + e.preventDefault(); + } + break; + case 27: + $.vakata.context.hide(); + e.preventDefault(); + break; + default: + //console.log(e.which); + break; + } + }) + .on('keydown', function (e) { + e.preventDefault(); + var a = vakata_context.element.find('.vakata-contextmenu-shortcut-' + e.which).parent(); + if(a.parent().not('.vakata-context-disabled')) { + a.trigger('click'); + } + }); + + $(document) + .on("mousedown.vakata.jstree", function (e) { + if(vakata_context.is_visible && vakata_context.element[0] !== e.target && !$.contains(vakata_context.element[0], e.target)) { + $.vakata.context.hide(); + } + }) + .on("context_show.vakata.jstree", function (e, data) { + vakata_context.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"); + if(right_to_left) { + vakata_context.element.addClass("vakata-context-rtl").css("direction", "rtl"); + } + // also apply a RTL class? + vakata_context.element.find("ul").hide().end(); + }); + }); + }($)); + // $.jstree.defaults.plugins.push("contextmenu"); + + +/** + * ### Drag'n'drop plugin + * + * Enables dragging and dropping of nodes in the tree, resulting in a move or copy operations. + */ + + /** + * stores all defaults for the drag'n'drop plugin + * @name $.jstree.defaults.dnd + * @plugin dnd + */ + $.jstree.defaults.dnd = { + /** + * a boolean indicating if a copy should be possible while dragging (by pressint the meta key or Ctrl). Defaults to `true`. + * @name $.jstree.defaults.dnd.copy + * @plugin dnd + */ + copy : true, + /** + * a number indicating how long a node should remain hovered while dragging to be opened. Defaults to `500`. + * @name $.jstree.defaults.dnd.open_timeout + * @plugin dnd + */ + open_timeout : 500, + /** + * a function invoked each time a node is about to be dragged, invoked in the tree's scope and receives the nodes about to be dragged as an argument (array) and the event that started the drag - return `false` to prevent dragging + * @name $.jstree.defaults.dnd.is_draggable + * @plugin dnd + */ + is_draggable : true, + /** + * a boolean indicating if checks should constantly be made while the user is dragging the node (as opposed to checking only on drop), default is `true` + * @name $.jstree.defaults.dnd.check_while_dragging + * @plugin dnd + */ + check_while_dragging : true, + /** + * a boolean indicating if nodes from this tree should only be copied with dnd (as opposed to moved), default is `false` + * @name $.jstree.defaults.dnd.always_copy + * @plugin dnd + */ + always_copy : false, + /** + * when dropping a node "inside", this setting indicates the position the node should go to - it can be an integer or a string: "first" (same as 0) or "last", default is `0` + * @name $.jstree.defaults.dnd.inside_pos + * @plugin dnd + */ + inside_pos : 0, + /** + * when starting the drag on a node that is selected this setting controls if all selected nodes are dragged or only the single node, default is `true`, which means all selected nodes are dragged when the drag is started on a selected node + * @name $.jstree.defaults.dnd.drag_selection + * @plugin dnd + */ + drag_selection : true, + /** + * controls whether dnd works on touch devices. If left as boolean true dnd will work the same as in desktop browsers, which in some cases may impair scrolling. If set to boolean false dnd will not work on touch devices. There is a special third option - string "selected" which means only selected nodes can be dragged on touch devices. + * @name $.jstree.defaults.dnd.touch + * @plugin dnd + */ + touch : true, + /** + * controls whether items can be dropped anywhere on the node, not just on the anchor, by default only the node anchor is a valid drop target. Works best with the wholerow plugin. If enabled on mobile depending on the interface it might be hard for the user to cancel the drop, since the whole tree container will be a valid drop target. + * @name $.jstree.defaults.dnd.large_drop_target + * @plugin dnd + */ + large_drop_target : false, + /** + * controls whether a drag can be initiated from any part of the node and not just the text/icon part, works best with the wholerow plugin. Keep in mind it can cause problems with tree scrolling on mobile depending on the interface - in that case set the touch option to "selected". + * @name $.jstree.defaults.dnd.large_drag_target + * @plugin dnd + */ + large_drag_target : false, + /** + * controls whether use HTML5 dnd api instead of classical. That will allow better integration of dnd events with other HTML5 controls. + * @reference http://caniuse.com/#feat=dragndrop + * @name $.jstree.defaults.dnd.use_html5 + * @plugin dnd + */ + use_html5: false + }; + var drg, elm; + // TODO: now check works by checking for each node individually, how about max_children, unique, etc? + $.jstree.plugins.dnd = function (options, parent) { + this.init = function (el, options) { + parent.init.call(this, el, options); + this.settings.dnd.use_html5 = this.settings.dnd.use_html5 && ('draggable' in document.createElement('span')); + }; + this.bind = function () { + parent.bind.call(this); + + this.element + .on(this.settings.dnd.use_html5 ? 'dragstart.jstree' : 'mousedown.jstree touchstart.jstree', this.settings.dnd.large_drag_target ? '.jstree-node' : '.jstree-anchor', function (e) { + if(this.settings.dnd.large_drag_target && $(e.target).closest('.jstree-node')[0] !== e.currentTarget) { + return true; + } + if(e.type === "touchstart" && (!this.settings.dnd.touch || (this.settings.dnd.touch === 'selected' && !$(e.currentTarget).closest('.jstree-node').children('.jstree-anchor').hasClass('jstree-clicked')))) { + return true; + } + var obj = this.get_node(e.target), + mlt = this.is_selected(obj) && this.settings.dnd.drag_selection ? this.get_top_selected().length : 1, + txt = (mlt > 1 ? mlt + ' ' + this.get_string('nodes') : this.get_text(e.currentTarget)); + if(this.settings.core.force_text) { + txt = $.vakata.html.escape(txt); + } + if(obj && obj.id && obj.id !== $.jstree.root && (e.which === 1 || e.type === "touchstart" || e.type === "dragstart") && + (this.settings.dnd.is_draggable === true || ($.vakata.is_function(this.settings.dnd.is_draggable) && this.settings.dnd.is_draggable.call(this, (mlt > 1 ? this.get_top_selected(true) : [obj]), e))) + ) { + drg = { 'jstree' : true, 'origin' : this, 'obj' : this.get_node(obj,true), 'nodes' : mlt > 1 ? this.get_top_selected() : [obj.id] }; + elm = e.currentTarget; + if (this.settings.dnd.use_html5) { + $.vakata.dnd._trigger('start', e, { 'helper': $(), 'element': elm, 'data': drg }); + } else { + this.element.trigger('mousedown.jstree'); + return $.vakata.dnd.start(e, drg, '
      ' + txt + '+
      '); + } + } + }.bind(this)); + if (this.settings.dnd.use_html5) { + this.element + .on('dragover.jstree', function (e) { + e.preventDefault(); + $.vakata.dnd._trigger('move', e, { 'helper': $(), 'element': elm, 'data': drg }); + return false; + }) + //.on('dragenter.jstree', this.settings.dnd.large_drop_target ? '.jstree-node' : '.jstree-anchor', $.proxy(function (e) { + // e.preventDefault(); + // $.vakata.dnd._trigger('move', e, { 'helper': $(), 'element': elm, 'data': drg }); + // return false; + // }, this)) + .on('drop.jstree', function (e) { + e.preventDefault(); + $.vakata.dnd._trigger('stop', e, { 'helper': $(), 'element': elm, 'data': drg }); + return false; + }.bind(this)); + } + }; + this.redraw_node = function(obj, deep, callback, force_render) { + obj = parent.redraw_node.apply(this, arguments); + if (obj && this.settings.dnd.use_html5) { + if (this.settings.dnd.large_drag_target) { + obj.setAttribute('draggable', true); + } else { + var i, j, tmp = null; + for(i = 0, j = obj.childNodes.length; i < j; i++) { + if(obj.childNodes[i] && obj.childNodes[i].className && obj.childNodes[i].className.indexOf("jstree-anchor") !== -1) { + tmp = obj.childNodes[i]; + break; + } + } + if(tmp) { + tmp.setAttribute('draggable', true); + } + } + } + return obj; + }; + }; + + $(function() { + // bind only once for all instances + var lastmv = false, + laster = false, + lastev = false, + opento = false, + marker = $('
       
      ').hide(); //.appendTo('body'); + + $(document) + .on('dragover.vakata.jstree', function (e) { + if (elm) { + $.vakata.dnd._trigger('move', e, { 'helper': $(), 'element': elm, 'data': drg }); + } + }) + .on('drop.vakata.jstree', function (e) { + if (elm) { + $.vakata.dnd._trigger('stop', e, { 'helper': $(), 'element': elm, 'data': drg }); + elm = null; + drg = null; + } + }) + .on('dnd_start.vakata.jstree', function (e, data) { + lastmv = false; + lastev = false; + if(!data || !data.data || !data.data.jstree) { return; } + marker.appendTo(document.body); //.show(); + }) + .on('dnd_move.vakata.jstree', function (e, data) { + var isDifferentNode = data.event.target !== lastev.target; + if(opento) { + if (!data.event || data.event.type !== 'dragover' || isDifferentNode) { + clearTimeout(opento); + } + } + if(!data || !data.data || !data.data.jstree) { return; } + + // if we are hovering the marker image do nothing (can happen on "inside" drags) + if(data.event.target.id && data.event.target.id === 'jstree-marker') { + return; + } + lastev = data.event; + + var ins = $.jstree.reference(data.event.target), + ref = false, + off = false, + rel = false, + tmp, l, t, h, p, i, o, ok, t1, t2, op, ps, pr, ip, tm, is_copy, pn, c; + // if we are over an instance + if(ins && ins._data && ins._data.dnd) { + marker.attr('class', 'jstree-' + ins.get_theme() + ( ins.settings.core.themes.responsive ? ' jstree-dnd-responsive' : '' )); + is_copy = data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey))); + data.helper + .children().attr('class', 'jstree-' + ins.get_theme() + ' jstree-' + ins.get_theme() + '-' + ins.get_theme_variant() + ' ' + ( ins.settings.core.themes.responsive ? ' jstree-dnd-responsive' : '' )) + .find('.jstree-copy').first()[ is_copy ? 'show' : 'hide' ](); + + // if are hovering the container itself add a new root node + //console.log(data.event); + if( (data.event.target === ins.element[0] || data.event.target === ins.get_container_ul()[0]) && ins.get_container_ul().children().length === 0) { + ok = true; + for(t1 = 0, t2 = data.data.nodes.length; t1 < t2; t1++) { + ok = ok && ins.check( (data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey)) ) ? "copy_node" : "move_node"), (data.data.origin && data.data.origin !== ins ? data.data.origin.get_node(data.data.nodes[t1]) : data.data.nodes[t1]), $.jstree.root, 'last', { 'dnd' : true, 'ref' : ins.get_node($.jstree.root), 'pos' : 'i', 'origin' : data.data.origin, 'is_multi' : (data.data.origin && data.data.origin !== ins), 'is_foreign' : (!data.data.origin) }); + if(!ok) { break; } + } + if(ok) { + lastmv = { 'ins' : ins, 'par' : $.jstree.root, 'pos' : 'last' }; + marker.hide(); + data.helper.find('.jstree-icon').first().removeClass('jstree-er').addClass('jstree-ok'); + if (data.event.originalEvent && data.event.originalEvent.dataTransfer) { + data.event.originalEvent.dataTransfer.dropEffect = is_copy ? 'copy' : 'move'; + } + return; + } + } + else { + // if we are hovering a tree node + ref = ins.settings.dnd.large_drop_target ? $(data.event.target).closest('.jstree-node').children('.jstree-anchor') : $(data.event.target).closest('.jstree-anchor'); + if(ref && ref.length && ref.parent().is('.jstree-closed, .jstree-open, .jstree-leaf')) { + off = ref.offset(); + rel = (data.event.pageY !== undefined ? data.event.pageY : data.event.originalEvent.pageY) - off.top; + h = ref.outerHeight(); + if(rel < h / 3) { + o = ['b', 'i', 'a']; + } + else if(rel > h - h / 3) { + o = ['a', 'i', 'b']; + } + else { + o = rel > h / 2 ? ['i', 'a', 'b'] : ['i', 'b', 'a']; + } + $.each(o, function (j, v) { + switch(v) { + case 'b': + l = off.left - 6; + t = off.top; + p = ins.get_parent(ref); + i = ref.parent().index(); + c = 'jstree-below'; + break; + case 'i': + ip = ins.settings.dnd.inside_pos; + tm = ins.get_node(ref.parent()); + l = off.left - 2; + t = off.top + h / 2 + 1; + p = tm.id; + i = ip === 'first' ? 0 : (ip === 'last' ? tm.children.length : Math.min(ip, tm.children.length)); + c = 'jstree-inside'; + break; + case 'a': + l = off.left - 6; + t = off.top + h; + p = ins.get_parent(ref); + i = ref.parent().index() + 1; + c = 'jstree-above'; + break; + } + ok = true; + for(t1 = 0, t2 = data.data.nodes.length; t1 < t2; t1++) { + op = data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey))) ? "copy_node" : "move_node"; + ps = i; + if(op === "move_node" && v === 'a' && (data.data.origin && data.data.origin === ins) && p === ins.get_parent(data.data.nodes[t1])) { + pr = ins.get_node(p); + if(ps > $.inArray(data.data.nodes[t1], pr.children)) { + ps -= 1; + } + } + ok = ok && ( (ins && ins.settings && ins.settings.dnd && ins.settings.dnd.check_while_dragging === false) || ins.check(op, (data.data.origin && data.data.origin !== ins ? data.data.origin.get_node(data.data.nodes[t1]) : data.data.nodes[t1]), p, ps, { 'dnd' : true, 'ref' : ins.get_node(ref.parent()), 'pos' : v, 'origin' : data.data.origin, 'is_multi' : (data.data.origin && data.data.origin !== ins), 'is_foreign' : (!data.data.origin) }) ); + if(!ok) { + if(ins && ins.last_error) { laster = ins.last_error(); } + break; + } + } + if(v === 'i' && ref.parent().is('.jstree-closed') && ins.settings.dnd.open_timeout) { + if (!data.event || data.event.type !== 'dragover' || isDifferentNode) { + if (opento) { clearTimeout(opento); } + opento = setTimeout((function (x, z) { return function () { x.open_node(z); }; }(ins, ref)), ins.settings.dnd.open_timeout); + } + } + if(ok) { + pn = ins.get_node(p, true); + if (!pn.hasClass('.jstree-dnd-parent')) { + $('.jstree-dnd-parent').removeClass('jstree-dnd-parent'); + pn.addClass('jstree-dnd-parent'); + } + lastmv = { 'ins' : ins, 'par' : p, 'pos' : v === 'i' && ip === 'last' && i === 0 && !ins.is_loaded(tm) ? 'last' : i }; + marker.css({ 'left' : l + 'px', 'top' : t + 'px' }).show(); + marker.removeClass('jstree-above jstree-inside jstree-below').addClass(c); + data.helper.find('.jstree-icon').first().removeClass('jstree-er').addClass('jstree-ok'); + if (data.event.originalEvent && data.event.originalEvent.dataTransfer) { + data.event.originalEvent.dataTransfer.dropEffect = is_copy ? 'copy' : 'move'; + } + laster = {}; + o = true; + return false; + } + }); + if(o === true) { return; } + } + } + } + $('.jstree-dnd-parent').removeClass('jstree-dnd-parent'); + lastmv = false; + data.helper.find('.jstree-icon').removeClass('jstree-ok').addClass('jstree-er'); + if (data.event.originalEvent && data.event.originalEvent.dataTransfer) { + //data.event.originalEvent.dataTransfer.dropEffect = 'none'; + } + marker.hide(); + }) + .on('dnd_scroll.vakata.jstree', function (e, data) { + if(!data || !data.data || !data.data.jstree) { return; } + marker.hide(); + lastmv = false; + lastev = false; + data.helper.find('.jstree-icon').first().removeClass('jstree-ok').addClass('jstree-er'); + }) + .on('dnd_stop.vakata.jstree', function (e, data) { + $('.jstree-dnd-parent').removeClass('jstree-dnd-parent'); + if(opento) { clearTimeout(opento); } + if(!data || !data.data || !data.data.jstree) { return; } + marker.hide().detach(); + var i, j, nodes = []; + if(lastmv) { + for(i = 0, j = data.data.nodes.length; i < j; i++) { + nodes[i] = data.data.origin ? data.data.origin.get_node(data.data.nodes[i]) : data.data.nodes[i]; + } + lastmv.ins[ data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey))) ? 'copy_node' : 'move_node' ](nodes, lastmv.par, lastmv.pos, false, false, false, data.data.origin); + } + else { + i = $(data.event.target).closest('.jstree'); + if(i.length && laster && laster.error && laster.error === 'check') { + i = i.jstree(true); + if(i) { + i.settings.core.error.call(this, laster); + } + } + } + lastev = false; + lastmv = false; + }) + .on('keyup.jstree keydown.jstree', function (e, data) { + data = $.vakata.dnd._get(); + if(data && data.data && data.data.jstree) { + if (e.type === "keyup" && e.which === 27) { + if (opento) { clearTimeout(opento); } + lastmv = false; + laster = false; + lastev = false; + opento = false; + marker.hide().detach(); + $.vakata.dnd._clean(); + } else { + data.helper.find('.jstree-copy').first()[ data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (e.metaKey || e.ctrlKey))) ? 'show' : 'hide' ](); + if(lastev) { + lastev.metaKey = e.metaKey; + lastev.ctrlKey = e.ctrlKey; + $.vakata.dnd._trigger('move', lastev); + } + } + } + }); + }); + + // helpers + (function ($) { + $.vakata.html = { + div : $('
      '), + escape : function (str) { + return $.vakata.html.div.text(str).html(); + }, + strip : function (str) { + return $.vakata.html.div.empty().append($.parseHTML(str)).text(); + } + }; + // private variable + var vakata_dnd = { + element : false, + target : false, + is_down : false, + is_drag : false, + helper : false, + helper_w: 0, + data : false, + init_x : 0, + init_y : 0, + scroll_l: 0, + scroll_t: 0, + scroll_e: false, + scroll_i: false, + is_touch: false + }; + $.vakata.dnd = { + settings : { + scroll_speed : 10, + scroll_proximity : 20, + helper_left : 5, + helper_top : 10, + threshold : 5, + threshold_touch : 10 + }, + _trigger : function (event_name, e, data) { + if (data === undefined) { + data = $.vakata.dnd._get(); + } + data.event = e; + $(document).triggerHandler("dnd_" + event_name + ".vakata", data); + }, + _get : function () { + return { + "data" : vakata_dnd.data, + "element" : vakata_dnd.element, + "helper" : vakata_dnd.helper + }; + }, + _clean : function () { + if(vakata_dnd.helper) { vakata_dnd.helper.remove(); } + if(vakata_dnd.scroll_i) { clearInterval(vakata_dnd.scroll_i); vakata_dnd.scroll_i = false; } + vakata_dnd = { + element : false, + target : false, + is_down : false, + is_drag : false, + helper : false, + helper_w: 0, + data : false, + init_x : 0, + init_y : 0, + scroll_l: 0, + scroll_t: 0, + scroll_e: false, + scroll_i: false, + is_touch: false + }; + elm = null; + $(document).off("mousemove.vakata.jstree touchmove.vakata.jstree", $.vakata.dnd.drag); + $(document).off("mouseup.vakata.jstree touchend.vakata.jstree", $.vakata.dnd.stop); + }, + _scroll : function (init_only) { + if(!vakata_dnd.scroll_e || (!vakata_dnd.scroll_l && !vakata_dnd.scroll_t)) { + if(vakata_dnd.scroll_i) { clearInterval(vakata_dnd.scroll_i); vakata_dnd.scroll_i = false; } + return false; + } + if(!vakata_dnd.scroll_i) { + vakata_dnd.scroll_i = setInterval($.vakata.dnd._scroll, 100); + return false; + } + if(init_only === true) { return false; } + + var i = vakata_dnd.scroll_e.scrollTop(), + j = vakata_dnd.scroll_e.scrollLeft(); + vakata_dnd.scroll_e.scrollTop(i + vakata_dnd.scroll_t * $.vakata.dnd.settings.scroll_speed); + vakata_dnd.scroll_e.scrollLeft(j + vakata_dnd.scroll_l * $.vakata.dnd.settings.scroll_speed); + if(i !== vakata_dnd.scroll_e.scrollTop() || j !== vakata_dnd.scroll_e.scrollLeft()) { + /** + * triggered on the document when a drag causes an element to scroll + * @event + * @plugin dnd + * @name dnd_scroll.vakata + * @param {Mixed} data any data supplied with the call to $.vakata.dnd.start + * @param {DOM} element the DOM element being dragged + * @param {jQuery} helper the helper shown next to the mouse + * @param {jQuery} event the element that is scrolling + */ + $.vakata.dnd._trigger("scroll", vakata_dnd.scroll_e); + } + }, + start : function (e, data, html) { + if(e.type === "touchstart" && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0]) { + e.pageX = e.originalEvent.changedTouches[0].pageX; + e.pageY = e.originalEvent.changedTouches[0].pageY; + e.target = document.elementFromPoint(e.originalEvent.changedTouches[0].pageX - window.pageXOffset, e.originalEvent.changedTouches[0].pageY - window.pageYOffset); + } + if(vakata_dnd.is_drag) { $.vakata.dnd.stop({}); } + try { + e.currentTarget.unselectable = "on"; + e.currentTarget.onselectstart = function() { return false; }; + if(e.currentTarget.style) { + e.currentTarget.style.touchAction = "none"; + e.currentTarget.style.msTouchAction = "none"; + e.currentTarget.style.MozUserSelect = "none"; + } + } catch(ignore) { } + vakata_dnd.init_x = e.pageX; + vakata_dnd.init_y = e.pageY; + vakata_dnd.data = data; + vakata_dnd.is_down = true; + vakata_dnd.element = e.currentTarget; + vakata_dnd.target = e.target; + vakata_dnd.is_touch = e.type === "touchstart"; + if(html !== false) { + vakata_dnd.helper = $("
      ").html(html).css({ + "display" : "block", + "margin" : "0", + "padding" : "0", + "position" : "absolute", + "top" : "-2000px", + "lineHeight" : "16px", + "zIndex" : "10000" + }); + } + $(document).on("mousemove.vakata.jstree touchmove.vakata.jstree", $.vakata.dnd.drag); + $(document).on("mouseup.vakata.jstree touchend.vakata.jstree", $.vakata.dnd.stop); + return false; + }, + drag : function (e) { + if(e.type === "touchmove" && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0]) { + e.pageX = e.originalEvent.changedTouches[0].pageX; + e.pageY = e.originalEvent.changedTouches[0].pageY; + e.target = document.elementFromPoint(e.originalEvent.changedTouches[0].pageX - window.pageXOffset, e.originalEvent.changedTouches[0].pageY - window.pageYOffset); + } + if(!vakata_dnd.is_down) { return; } + if(!vakata_dnd.is_drag) { + if( + Math.abs(e.pageX - vakata_dnd.init_x) > (vakata_dnd.is_touch ? $.vakata.dnd.settings.threshold_touch : $.vakata.dnd.settings.threshold) || + Math.abs(e.pageY - vakata_dnd.init_y) > (vakata_dnd.is_touch ? $.vakata.dnd.settings.threshold_touch : $.vakata.dnd.settings.threshold) + ) { + if(vakata_dnd.helper) { + vakata_dnd.helper.appendTo(document.body); + vakata_dnd.helper_w = vakata_dnd.helper.outerWidth(); + } + vakata_dnd.is_drag = true; + $(vakata_dnd.target).one('click.vakata', false); + /** + * triggered on the document when a drag starts + * @event + * @plugin dnd + * @name dnd_start.vakata + * @param {Mixed} data any data supplied with the call to $.vakata.dnd.start + * @param {DOM} element the DOM element being dragged + * @param {jQuery} helper the helper shown next to the mouse + * @param {Object} event the event that caused the start (probably mousemove) + */ + $.vakata.dnd._trigger("start", e); + } + else { return; } + } + + var d = false, w = false, + dh = false, wh = false, + dw = false, ww = false, + dt = false, dl = false, + ht = false, hl = false; + + vakata_dnd.scroll_t = 0; + vakata_dnd.scroll_l = 0; + vakata_dnd.scroll_e = false; + $($(e.target).parentsUntil("body").addBack().get().reverse()) + .filter(function () { + return (/^auto|scroll$/).test($(this).css("overflow")) && + (this.scrollHeight > this.offsetHeight || this.scrollWidth > this.offsetWidth); + }) + .each(function () { + var t = $(this), o = t.offset(); + if(this.scrollHeight > this.offsetHeight) { + if(o.top + t.height() - e.pageY < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_t = 1; } + if(e.pageY - o.top < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_t = -1; } + } + if(this.scrollWidth > this.offsetWidth) { + if(o.left + t.width() - e.pageX < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_l = 1; } + if(e.pageX - o.left < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_l = -1; } + } + if(vakata_dnd.scroll_t || vakata_dnd.scroll_l) { + vakata_dnd.scroll_e = $(this); + return false; + } + }); + + if(!vakata_dnd.scroll_e) { + d = $(document); w = $(window); + dh = d.height(); wh = w.height(); + dw = d.width(); ww = w.width(); + dt = d.scrollTop(); dl = d.scrollLeft(); + if(dh > wh && e.pageY - dt < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_t = -1; } + if(dh > wh && wh - (e.pageY - dt) < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_t = 1; } + if(dw > ww && e.pageX - dl < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_l = -1; } + if(dw > ww && ww - (e.pageX - dl) < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_l = 1; } + if(vakata_dnd.scroll_t || vakata_dnd.scroll_l) { + vakata_dnd.scroll_e = d; + } + } + if(vakata_dnd.scroll_e) { $.vakata.dnd._scroll(true); } + + if(vakata_dnd.helper) { + ht = parseInt(e.pageY + $.vakata.dnd.settings.helper_top, 10); + hl = parseInt(e.pageX + $.vakata.dnd.settings.helper_left, 10); + if(dh && ht + 25 > dh) { ht = dh - 50; } + if(dw && hl + vakata_dnd.helper_w > dw) { hl = dw - (vakata_dnd.helper_w + 2); } + vakata_dnd.helper.css({ + left : hl + "px", + top : ht + "px" + }); + } + /** + * triggered on the document when a drag is in progress + * @event + * @plugin dnd + * @name dnd_move.vakata + * @param {Mixed} data any data supplied with the call to $.vakata.dnd.start + * @param {DOM} element the DOM element being dragged + * @param {jQuery} helper the helper shown next to the mouse + * @param {Object} event the event that caused this to trigger (most likely mousemove) + */ + $.vakata.dnd._trigger("move", e); + return false; + }, + stop : function (e) { + if(e.type === "touchend" && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0]) { + e.pageX = e.originalEvent.changedTouches[0].pageX; + e.pageY = e.originalEvent.changedTouches[0].pageY; + e.target = document.elementFromPoint(e.originalEvent.changedTouches[0].pageX - window.pageXOffset, e.originalEvent.changedTouches[0].pageY - window.pageYOffset); + } + if(vakata_dnd.is_drag) { + /** + * triggered on the document when a drag stops (the dragged element is dropped) + * @event + * @plugin dnd + * @name dnd_stop.vakata + * @param {Mixed} data any data supplied with the call to $.vakata.dnd.start + * @param {DOM} element the DOM element being dragged + * @param {jQuery} helper the helper shown next to the mouse + * @param {Object} event the event that caused the stop + */ + if (e.target !== vakata_dnd.target) { + $(vakata_dnd.target).off('click.vakata'); + } + $.vakata.dnd._trigger("stop", e); + } + else { + if(e.type === "touchend" && e.target === vakata_dnd.target) { + var to = setTimeout(function () { $(e.target).trigger('click'); }, 100); + $(e.target).one('click', function() { if(to) { clearTimeout(to); } }); + } + } + $.vakata.dnd._clean(); + return false; + } + }; + }($)); + + // include the dnd plugin by default + // $.jstree.defaults.plugins.push("dnd"); + + +/** + * ### Massload plugin + * + * Adds massload functionality to jsTree, so that multiple nodes can be loaded in a single request (only useful with lazy loading). + */ + + /** + * massload configuration + * + * It is possible to set this to a standard jQuery-like AJAX config. + * In addition to the standard jQuery ajax options here you can supply functions for `data` and `url`, the functions will be run in the current instance's scope and a param will be passed indicating which node IDs need to be loaded, the return value of those functions will be used. + * + * You can also set this to a function, that function will receive the node IDs being loaded as argument and a second param which is a function (callback) which should be called with the result. + * + * Both the AJAX and the function approach rely on the same return value - an object where the keys are the node IDs, and the value is the children of that node as an array. + * + * { + * "id1" : [{ "text" : "Child of ID1", "id" : "c1" }, { "text" : "Another child of ID1", "id" : "c2" }], + * "id2" : [{ "text" : "Child of ID2", "id" : "c3" }] + * } + * + * @name $.jstree.defaults.massload + * @plugin massload + */ + $.jstree.defaults.massload = null; + $.jstree.plugins.massload = function (options, parent) { + this.init = function (el, options) { + this._data.massload = {}; + parent.init.call(this, el, options); + }; + this._load_nodes = function (nodes, callback, is_callback, force_reload) { + var s = this.settings.massload, + toLoad = [], + m = this._model.data, + i, j, dom; + if (!is_callback) { + for(i = 0, j = nodes.length; i < j; i++) { + if(!m[nodes[i]] || ( (!m[nodes[i]].state.loaded && !m[nodes[i]].state.failed) || force_reload) ) { + toLoad.push(nodes[i]); + dom = this.get_node(nodes[i], true); + if (dom && dom.length) { + dom.addClass("jstree-loading").attr('aria-busy',true); + } + } + } + this._data.massload = {}; + if (toLoad.length) { + if($.vakata.is_function(s)) { + return s.call(this, toLoad, function (data) { + var i, j; + if(data) { + for(i in data) { + if(data.hasOwnProperty(i)) { + this._data.massload[i] = data[i]; + } + } + } + for(i = 0, j = nodes.length; i < j; i++) { + dom = this.get_node(nodes[i], true); + if (dom && dom.length) { + dom.removeClass("jstree-loading").attr('aria-busy',false); + } + } + parent._load_nodes.call(this, nodes, callback, is_callback, force_reload); + }.bind(this)); + } + if(typeof s === 'object' && s && s.url) { + s = $.extend(true, {}, s); + if($.vakata.is_function(s.url)) { + s.url = s.url.call(this, toLoad); + } + if($.vakata.is_function(s.data)) { + s.data = s.data.call(this, toLoad); + } + return $.ajax(s) + .done(function (data,t,x) { + var i, j; + if(data) { + for(i in data) { + if(data.hasOwnProperty(i)) { + this._data.massload[i] = data[i]; + } + } + } + for(i = 0, j = nodes.length; i < j; i++) { + dom = this.get_node(nodes[i], true); + if (dom && dom.length) { + dom.removeClass("jstree-loading").attr('aria-busy',false); + } + } + parent._load_nodes.call(this, nodes, callback, is_callback, force_reload); + }.bind(this)) + .fail(function (f) { + parent._load_nodes.call(this, nodes, callback, is_callback, force_reload); + }.bind(this)); + } + } + } + return parent._load_nodes.call(this, nodes, callback, is_callback, force_reload); + }; + this._load_node = function (obj, callback) { + var data = this._data.massload[obj.id], + rslt = null, dom; + if(data) { + rslt = this[typeof data === 'string' ? '_append_html_data' : '_append_json_data']( + obj, + typeof data === 'string' ? $($.parseHTML(data)).filter(function () { return this.nodeType !== 3; }) : data, + function (status) { callback.call(this, status); } + ); + dom = this.get_node(obj.id, true); + if (dom && dom.length) { + dom.removeClass("jstree-loading").attr('aria-busy',false); + } + delete this._data.massload[obj.id]; + return rslt; + } + return parent._load_node.call(this, obj, callback); + }; + }; + + +/** + * ### Search plugin + * + * Adds search functionality to jsTree. + */ + + /** + * stores all defaults for the search plugin + * @name $.jstree.defaults.search + * @plugin search + */ + $.jstree.defaults.search = { + /** + * a jQuery-like AJAX config, which jstree uses if a server should be queried for results. + * + * A `str` (which is the search string) parameter will be added with the request, an optional `inside` parameter will be added if the search is limited to a node id. The expected result is a JSON array with nodes that need to be opened so that matching nodes will be revealed. + * Leave this setting as `false` to not query the server. You can also set this to a function, which will be invoked in the instance's scope and receive 3 parameters - the search string, the callback to call with the array of nodes to load, and the optional node ID to limit the search to + * @name $.jstree.defaults.search.ajax + * @plugin search + */ + ajax : false, + /** + * Indicates if the search should be fuzzy or not (should `chnd3` match `child node 3`). Default is `false`. + * @name $.jstree.defaults.search.fuzzy + * @plugin search + */ + fuzzy : false, + /** + * Indicates if the search should be case sensitive. Default is `false`. + * @name $.jstree.defaults.search.case_sensitive + * @plugin search + */ + case_sensitive : false, + /** + * Indicates if the tree should be filtered (by default) to show only matching nodes (keep in mind this can be a heavy on large trees in old browsers). + * This setting can be changed at runtime when calling the search method. Default is `false`. + * @name $.jstree.defaults.search.show_only_matches + * @plugin search + */ + show_only_matches : false, + /** + * Indicates if the children of matched element are shown (when show_only_matches is true) + * This setting can be changed at runtime when calling the search method. Default is `false`. + * @name $.jstree.defaults.search.show_only_matches_children + * @plugin search + */ + show_only_matches_children : false, + /** + * Indicates if all nodes opened to reveal the search result, should be closed when the search is cleared or a new search is performed. Default is `true`. + * @name $.jstree.defaults.search.close_opened_onclear + * @plugin search + */ + close_opened_onclear : true, + /** + * Indicates if only leaf nodes should be included in search results. Default is `false`. + * @name $.jstree.defaults.search.search_leaves_only + * @plugin search + */ + search_leaves_only : false, + /** + * If set to a function it wil be called in the instance's scope with two arguments - search string and node (where node will be every node in the structure, so use with caution). + * If the function returns a truthy value the node will be considered a match (it might not be displayed if search_only_leaves is set to true and the node is not a leaf). Default is `false`. + * @name $.jstree.defaults.search.search_callback + * @plugin search + */ + search_callback : false + }; + + $.jstree.plugins.search = function (options, parent) { + this.bind = function () { + parent.bind.call(this); + + this._data.search.str = ""; + this._data.search.dom = $(); + this._data.search.res = []; + this._data.search.opn = []; + this._data.search.som = false; + this._data.search.smc = false; + this._data.search.hdn = []; + + this.element + .on("search.jstree", function (e, data) { + if(this._data.search.som && data.res.length) { + var m = this._model.data, i, j, p = [], k, l; + for(i = 0, j = data.res.length; i < j; i++) { + if(m[data.res[i]] && !m[data.res[i]].state.hidden) { + p.push(data.res[i]); + p = p.concat(m[data.res[i]].parents); + if(this._data.search.smc) { + for (k = 0, l = m[data.res[i]].children_d.length; k < l; k++) { + if (m[m[data.res[i]].children_d[k]] && !m[m[data.res[i]].children_d[k]].state.hidden) { + p.push(m[data.res[i]].children_d[k]); + } + } + } + } + } + p = $.vakata.array_remove_item($.vakata.array_unique(p), $.jstree.root); + this._data.search.hdn = this.hide_all(true); + this.show_node(p, true); + this.redraw(true); + } + }.bind(this)) + .on("clear_search.jstree", function (e, data) { + if(this._data.search.som && data.res.length) { + this.show_node(this._data.search.hdn, true); + this.redraw(true); + } + }.bind(this)); + }; + /** + * used to search the tree nodes for a given string + * @name search(str [, skip_async]) + * @param {String} str the search string + * @param {Boolean} skip_async if set to true server will not be queried even if configured + * @param {Boolean} show_only_matches if set to true only matching nodes will be shown (keep in mind this can be very slow on large trees or old browsers) + * @param {mixed} inside an optional node to whose children to limit the search + * @param {Boolean} append if set to true the results of this search are appended to the previous search + * @plugin search + * @trigger search.jstree + */ + this.search = function (str, skip_async, show_only_matches, inside, append, show_only_matches_children) { + if(str === false || $.vakata.trim(str.toString()) === "") { + return this.clear_search(); + } + inside = this.get_node(inside); + inside = inside && inside.id ? inside.id : null; + str = str.toString(); + var s = this.settings.search, + a = s.ajax ? s.ajax : false, + m = this._model.data, + f = null, + r = [], + p = [], i, j; + if(this._data.search.res.length && !append) { + this.clear_search(); + } + if(show_only_matches === undefined) { + show_only_matches = s.show_only_matches; + } + if(show_only_matches_children === undefined) { + show_only_matches_children = s.show_only_matches_children; + } + if(!skip_async && a !== false) { + if($.vakata.is_function(a)) { + return a.call(this, str, function (d) { + if(d && d.d) { d = d.d; } + this._load_nodes(!$.vakata.is_array(d) ? [] : $.vakata.array_unique(d), function () { + this.search(str, true, show_only_matches, inside, append, show_only_matches_children); + }); + }.bind(this), inside); + } + else { + a = $.extend({}, a); + if(!a.data) { a.data = {}; } + a.data.str = str; + if(inside) { + a.data.inside = inside; + } + if (this._data.search.lastRequest) { + this._data.search.lastRequest.abort(); + } + this._data.search.lastRequest = $.ajax(a) + .fail(function () { + this._data.core.last_error = { 'error' : 'ajax', 'plugin' : 'search', 'id' : 'search_01', 'reason' : 'Could not load search parents', 'data' : JSON.stringify(a) }; + this.settings.core.error.call(this, this._data.core.last_error); + }.bind(this)) + .done(function (d) { + if(d && d.d) { d = d.d; } + this._load_nodes(!$.vakata.is_array(d) ? [] : $.vakata.array_unique(d), function () { + this.search(str, true, show_only_matches, inside, append, show_only_matches_children); + }); + }.bind(this)); + return this._data.search.lastRequest; + } + } + if(!append) { + this._data.search.str = str; + this._data.search.dom = $(); + this._data.search.res = []; + this._data.search.opn = []; + this._data.search.som = show_only_matches; + this._data.search.smc = show_only_matches_children; + } + + f = new $.vakata.search(str, true, { caseSensitive : s.case_sensitive, fuzzy : s.fuzzy }); + $.each(m[inside ? inside : $.jstree.root].children_d, function (ii, i) { + var v = m[i]; + if(v.text && !v.state.hidden && (!s.search_leaves_only || (v.state.loaded && v.children.length === 0)) && ( (s.search_callback && s.search_callback.call(this, str, v)) || (!s.search_callback && f.search(v.text).isMatch) ) ) { + r.push(i); + p = p.concat(v.parents); + } + }); + if(r.length) { + p = $.vakata.array_unique(p); + for(i = 0, j = p.length; i < j; i++) { + if(p[i] !== $.jstree.root && m[p[i]] && this.open_node(p[i], null, 0) === true) { + this._data.search.opn.push(p[i]); + } + } + if(!append) { + this._data.search.dom = $(this.element[0].querySelectorAll('#' + $.map(r, function (v) { return "0123456789".indexOf(v[0]) !== -1 ? '\\3' + v[0] + ' ' + v.substr(1).replace($.jstree.idregex,'\\$&') : v.replace($.jstree.idregex,'\\$&'); }).join(', #'))); + this._data.search.res = r; + } + else { + this._data.search.dom = this._data.search.dom.add($(this.element[0].querySelectorAll('#' + $.map(r, function (v) { return "0123456789".indexOf(v[0]) !== -1 ? '\\3' + v[0] + ' ' + v.substr(1).replace($.jstree.idregex,'\\$&') : v.replace($.jstree.idregex,'\\$&'); }).join(', #')))); + this._data.search.res = $.vakata.array_unique(this._data.search.res.concat(r)); + } + this._data.search.dom.children(".jstree-anchor").addClass('jstree-search'); + } + /** + * triggered after search is complete + * @event + * @name search.jstree + * @param {jQuery} nodes a jQuery collection of matching nodes + * @param {String} str the search string + * @param {Array} res a collection of objects represeing the matching nodes + * @plugin search + */ + this.trigger('search', { nodes : this._data.search.dom, str : str, res : this._data.search.res, show_only_matches : show_only_matches }); + }; + /** + * used to clear the last search (removes classes and shows all nodes if filtering is on) + * @name clear_search() + * @plugin search + * @trigger clear_search.jstree + */ + this.clear_search = function () { + if(this.settings.search.close_opened_onclear) { + this.close_node(this._data.search.opn, 0); + } + /** + * triggered after search is complete + * @event + * @name clear_search.jstree + * @param {jQuery} nodes a jQuery collection of matching nodes (the result from the last search) + * @param {String} str the search string (the last search string) + * @param {Array} res a collection of objects represeing the matching nodes (the result from the last search) + * @plugin search + */ + this.trigger('clear_search', { 'nodes' : this._data.search.dom, str : this._data.search.str, res : this._data.search.res }); + if(this._data.search.res.length) { + this._data.search.dom = $(this.element[0].querySelectorAll('#' + $.map(this._data.search.res, function (v) { + return "0123456789".indexOf(v[0]) !== -1 ? '\\3' + v[0] + ' ' + v.substr(1).replace($.jstree.idregex,'\\$&') : v.replace($.jstree.idregex,'\\$&'); + }).join(', #'))); + this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search"); + } + this._data.search.str = ""; + this._data.search.res = []; + this._data.search.opn = []; + this._data.search.dom = $(); + }; + + this.redraw_node = function(obj, deep, callback, force_render) { + obj = parent.redraw_node.apply(this, arguments); + if(obj) { + if($.inArray(obj.id, this._data.search.res) !== -1) { + var i, j, tmp = null; + for(i = 0, j = obj.childNodes.length; i < j; i++) { + if(obj.childNodes[i] && obj.childNodes[i].className && obj.childNodes[i].className.indexOf("jstree-anchor") !== -1) { + tmp = obj.childNodes[i]; + break; + } + } + if(tmp) { + tmp.className += ' jstree-search'; + } + } + } + return obj; + }; + }; + + // helpers + (function ($) { + // from http://kiro.me/projects/fuse.html + $.vakata.search = function(pattern, txt, options) { + options = options || {}; + options = $.extend({}, $.vakata.search.defaults, options); + if(options.fuzzy !== false) { + options.fuzzy = true; + } + pattern = options.caseSensitive ? pattern : pattern.toLowerCase(); + var MATCH_LOCATION = options.location, + MATCH_DISTANCE = options.distance, + MATCH_THRESHOLD = options.threshold, + patternLen = pattern.length, + matchmask, pattern_alphabet, match_bitapScore, search; + if(patternLen > 32) { + options.fuzzy = false; + } + if(options.fuzzy) { + matchmask = 1 << (patternLen - 1); + pattern_alphabet = (function () { + var mask = {}, + i = 0; + for (i = 0; i < patternLen; i++) { + mask[pattern.charAt(i)] = 0; + } + for (i = 0; i < patternLen; i++) { + mask[pattern.charAt(i)] |= 1 << (patternLen - i - 1); + } + return mask; + }()); + match_bitapScore = function (e, x) { + var accuracy = e / patternLen, + proximity = Math.abs(MATCH_LOCATION - x); + if(!MATCH_DISTANCE) { + return proximity ? 1.0 : accuracy; + } + return accuracy + (proximity / MATCH_DISTANCE); + }; + } + search = function (text) { + text = options.caseSensitive ? text : text.toLowerCase(); + if(pattern === text || text.indexOf(pattern) !== -1) { + return { + isMatch: true, + score: 0 + }; + } + if(!options.fuzzy) { + return { + isMatch: false, + score: 1 + }; + } + var i, j, + textLen = text.length, + scoreThreshold = MATCH_THRESHOLD, + bestLoc = text.indexOf(pattern, MATCH_LOCATION), + binMin, binMid, + binMax = patternLen + textLen, + lastRd, start, finish, rd, charMatch, + score = 1, + locations = []; + if (bestLoc !== -1) { + scoreThreshold = Math.min(match_bitapScore(0, bestLoc), scoreThreshold); + bestLoc = text.lastIndexOf(pattern, MATCH_LOCATION + patternLen); + if (bestLoc !== -1) { + scoreThreshold = Math.min(match_bitapScore(0, bestLoc), scoreThreshold); + } + } + bestLoc = -1; + for (i = 0; i < patternLen; i++) { + binMin = 0; + binMid = binMax; + while (binMin < binMid) { + if (match_bitapScore(i, MATCH_LOCATION + binMid) <= scoreThreshold) { + binMin = binMid; + } else { + binMax = binMid; + } + binMid = Math.floor((binMax - binMin) / 2 + binMin); + } + binMax = binMid; + start = Math.max(1, MATCH_LOCATION - binMid + 1); + finish = Math.min(MATCH_LOCATION + binMid, textLen) + patternLen; + rd = new Array(finish + 2); + rd[finish + 1] = (1 << i) - 1; + for (j = finish; j >= start; j--) { + charMatch = pattern_alphabet[text.charAt(j - 1)]; + if (i === 0) { + rd[j] = ((rd[j + 1] << 1) | 1) & charMatch; + } else { + rd[j] = ((rd[j + 1] << 1) | 1) & charMatch | (((lastRd[j + 1] | lastRd[j]) << 1) | 1) | lastRd[j + 1]; + } + if (rd[j] & matchmask) { + score = match_bitapScore(i, j - 1); + if (score <= scoreThreshold) { + scoreThreshold = score; + bestLoc = j - 1; + locations.push(bestLoc); + if (bestLoc > MATCH_LOCATION) { + start = Math.max(1, 2 * MATCH_LOCATION - bestLoc); + } else { + break; + } + } + } + } + if (match_bitapScore(i + 1, MATCH_LOCATION) > scoreThreshold) { + break; + } + lastRd = rd; + } + return { + isMatch: bestLoc >= 0, + score: score + }; + }; + return txt === true ? { 'search' : search } : search(txt); + }; + $.vakata.search.defaults = { + location : 0, + distance : 100, + threshold : 0.6, + fuzzy : false, + caseSensitive : false + }; + }($)); + + // include the search plugin by default + // $.jstree.defaults.plugins.push("search"); + + +/** + * ### Sort plugin + * + * Automatically sorts all siblings in the tree according to a sorting function. + */ + + /** + * the settings function used to sort the nodes. + * It is executed in the tree's context, accepts two nodes as arguments and should return `1` or `-1`. + * @name $.jstree.defaults.sort + * @plugin sort + */ + $.jstree.defaults.sort = function (a, b) { + //return this.get_type(a) === this.get_type(b) ? (this.get_text(a) > this.get_text(b) ? 1 : -1) : this.get_type(a) >= this.get_type(b); + return this.get_text(a) > this.get_text(b) ? 1 : -1; + }; + $.jstree.plugins.sort = function (options, parent) { + this.bind = function () { + parent.bind.call(this); + this.element + .on("model.jstree", function (e, data) { + this.sort(data.parent, true); + }.bind(this)) + .on("rename_node.jstree create_node.jstree", function (e, data) { + this.sort(data.parent || data.node.parent, false); + this.redraw_node(data.parent || data.node.parent, true); + }.bind(this)) + .on("move_node.jstree copy_node.jstree", function (e, data) { + this.sort(data.parent, false); + this.redraw_node(data.parent, true); + }.bind(this)); + }; + /** + * used to sort a node's children + * @private + * @name sort(obj [, deep]) + * @param {mixed} obj the node + * @param {Boolean} deep if set to `true` nodes are sorted recursively. + * @plugin sort + * @trigger search.jstree + */ + this.sort = function (obj, deep) { + var i, j; + obj = this.get_node(obj); + if(obj && obj.children && obj.children.length) { + obj.children.sort(this.settings.sort.bind(this)); + if(deep) { + for(i = 0, j = obj.children_d.length; i < j; i++) { + this.sort(obj.children_d[i], false); + } + } + } + }; + }; + + // include the sort plugin by default + // $.jstree.defaults.plugins.push("sort"); + +/** + * ### State plugin + * + * Saves the state of the tree (selected nodes, opened nodes) on the user's computer using available options (localStorage, cookies, etc) + */ + + var to = false; + /** + * stores all defaults for the state plugin + * @name $.jstree.defaults.state + * @plugin state + */ + $.jstree.defaults.state = { + /** + * A string for the key to use when saving the current tree (change if using multiple trees in your project). Defaults to `jstree`. + * @name $.jstree.defaults.state.key + * @plugin state + */ + key : 'jstree', + /** + * A space separated list of events that trigger a state save. Defaults to `changed.jstree open_node.jstree close_node.jstree`. + * @name $.jstree.defaults.state.events + * @plugin state + */ + events : 'changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree', + /** + * Time in milliseconds after which the state will expire. Defaults to 'false' meaning - no expire. + * @name $.jstree.defaults.state.ttl + * @plugin state + */ + ttl : false, + /** + * A function that will be executed prior to restoring state with one argument - the state object. Can be used to clear unwanted parts of the state. + * @name $.jstree.defaults.state.filter + * @plugin state + */ + filter : false, + /** + * Should loaded nodes be restored (setting this to true means that it is possible that the whole tree will be loaded for some users - use with caution). Defaults to `false` + * @name $.jstree.defaults.state.preserve_loaded + * @plugin state + */ + preserve_loaded : false + }; + $.jstree.plugins.state = function (options, parent) { + this.bind = function () { + parent.bind.call(this); + var bind = function () { + this.element.on(this.settings.state.events, function () { + if(to) { clearTimeout(to); } + to = setTimeout(function () { this.save_state(); }.bind(this), 100); + }.bind(this)); + /** + * triggered when the state plugin is finished restoring the state (and immediately after ready if there is no state to restore). + * @event + * @name state_ready.jstree + * @plugin state + */ + this.trigger('state_ready'); + }.bind(this); + this.element + .on("ready.jstree", function (e, data) { + this.element.one("restore_state.jstree", bind); + if(!this.restore_state()) { bind(); } + }.bind(this)); + }; + /** + * save the state + * @name save_state() + * @plugin state + */ + this.save_state = function () { + var tm = this.get_state(); + if (!this.settings.state.preserve_loaded) { + delete tm.core.loaded; + } + var st = { 'state' : tm, 'ttl' : this.settings.state.ttl, 'sec' : +(new Date()) }; + $.vakata.storage.set(this.settings.state.key, JSON.stringify(st)); + }; + /** + * restore the state from the user's computer + * @name restore_state() + * @plugin state + */ + this.restore_state = function () { + var k = $.vakata.storage.get(this.settings.state.key); + if(!!k) { try { k = JSON.parse(k); } catch(ex) { return false; } } + if(!!k && k.ttl && k.sec && +(new Date()) - k.sec > k.ttl) { return false; } + if(!!k && k.state) { k = k.state; } + if(!!k && $.vakata.is_function(this.settings.state.filter)) { k = this.settings.state.filter.call(this, k); } + if(!!k) { + if (!this.settings.state.preserve_loaded) { + delete k.core.loaded; + } + this.element.one("set_state.jstree", function (e, data) { data.instance.trigger('restore_state', { 'state' : $.extend(true, {}, k) }); }); + this.set_state(k); + return true; + } + return false; + }; + /** + * clear the state on the user's computer + * @name clear_state() + * @plugin state + */ + this.clear_state = function () { + return $.vakata.storage.del(this.settings.state.key); + }; + }; + + (function ($, undefined) { + $.vakata.storage = { + // simply specifying the functions in FF throws an error + set : function (key, val) { return window.localStorage.setItem(key, val); }, + get : function (key) { return window.localStorage.getItem(key); }, + del : function (key) { return window.localStorage.removeItem(key); } + }; + }($)); + + // include the state plugin by default + // $.jstree.defaults.plugins.push("state"); + +/** + * ### Types plugin + * + * Makes it possible to add predefined types for groups of nodes, which make it possible to easily control nesting rules and icon for each group. + */ + + /** + * An object storing all types as key value pairs, where the key is the type name and the value is an object that could contain following keys (all optional). + * + * * `max_children` the maximum number of immediate children this node type can have. Do not specify or set to `-1` for unlimited. + * * `max_depth` the maximum number of nesting this node type can have. A value of `1` would mean that the node can have children, but no grandchildren. Do not specify or set to `-1` for unlimited. + * * `valid_children` an array of node type strings, that nodes of this type can have as children. Do not specify or set to `-1` for no limits. + * * `icon` a string - can be a path to an icon or a className, if using an image that is in the current directory use a `./` prefix, otherwise it will be detected as a class. Omit to use the default icon from your theme. + * * `li_attr` an object of values which will be used to add HTML attributes on the resulting LI DOM node (merged with the node's own data) + * * `a_attr` an object of values which will be used to add HTML attributes on the resulting A DOM node (merged with the node's own data) + * + * There are two predefined types: + * + * * `#` represents the root of the tree, for example `max_children` would control the maximum number of root nodes. + * * `default` represents the default node - any settings here will be applied to all nodes that do not have a type specified. + * + * @name $.jstree.defaults.types + * @plugin types + */ + $.jstree.defaults.types = { + 'default' : {} + }; + $.jstree.defaults.types[$.jstree.root] = {}; + + $.jstree.plugins.types = function (options, parent) { + this.init = function (el, options) { + var i, j; + if(options && options.types && options.types['default']) { + for(i in options.types) { + if(i !== "default" && i !== $.jstree.root && options.types.hasOwnProperty(i)) { + for(j in options.types['default']) { + if(options.types['default'].hasOwnProperty(j) && options.types[i][j] === undefined) { + options.types[i][j] = options.types['default'][j]; + } + } + } + } + } + parent.init.call(this, el, options); + this._model.data[$.jstree.root].type = $.jstree.root; + }; + this.refresh = function (skip_loading, forget_state) { + parent.refresh.call(this, skip_loading, forget_state); + this._model.data[$.jstree.root].type = $.jstree.root; + }; + this.bind = function () { + this.element + .on('model.jstree', function (e, data) { + var m = this._model.data, + dpc = data.nodes, + t = this.settings.types, + i, j, c = 'default', k; + for(i = 0, j = dpc.length; i < j; i++) { + c = 'default'; + if(m[dpc[i]].original && m[dpc[i]].original.type && t[m[dpc[i]].original.type]) { + c = m[dpc[i]].original.type; + } + if(m[dpc[i]].data && m[dpc[i]].data.jstree && m[dpc[i]].data.jstree.type && t[m[dpc[i]].data.jstree.type]) { + c = m[dpc[i]].data.jstree.type; + } + m[dpc[i]].type = c; + if(m[dpc[i]].icon === true && t[c].icon !== undefined) { + m[dpc[i]].icon = t[c].icon; + } + if(t[c].li_attr !== undefined && typeof t[c].li_attr === 'object') { + for (k in t[c].li_attr) { + if (t[c].li_attr.hasOwnProperty(k)) { + if (k === 'id') { + continue; + } + else if (m[dpc[i]].li_attr[k] === undefined) { + m[dpc[i]].li_attr[k] = t[c].li_attr[k]; + } + else if (k === 'class') { + m[dpc[i]].li_attr['class'] = t[c].li_attr['class'] + ' ' + m[dpc[i]].li_attr['class']; + } + } + } + } + if(t[c].a_attr !== undefined && typeof t[c].a_attr === 'object') { + for (k in t[c].a_attr) { + if (t[c].a_attr.hasOwnProperty(k)) { + if (k === 'id') { + continue; + } + else if (m[dpc[i]].a_attr[k] === undefined) { + m[dpc[i]].a_attr[k] = t[c].a_attr[k]; + } + else if (k === 'href' && m[dpc[i]].a_attr[k] === '#') { + m[dpc[i]].a_attr['href'] = t[c].a_attr['href']; + } + else if (k === 'class') { + m[dpc[i]].a_attr['class'] = t[c].a_attr['class'] + ' ' + m[dpc[i]].a_attr['class']; + } + } + } + } + } + m[$.jstree.root].type = $.jstree.root; + }.bind(this)); + parent.bind.call(this); + }; + this.get_json = function (obj, options, flat) { + var i, j, + m = this._model.data, + opt = options ? $.extend(true, {}, options, {no_id:false}) : {}, + tmp = parent.get_json.call(this, obj, opt, flat); + if(tmp === false) { return false; } + if($.vakata.is_array(tmp)) { + for(i = 0, j = tmp.length; i < j; i++) { + tmp[i].type = tmp[i].id && m[tmp[i].id] && m[tmp[i].id].type ? m[tmp[i].id].type : "default"; + if(options && options.no_id) { + delete tmp[i].id; + if(tmp[i].li_attr && tmp[i].li_attr.id) { + delete tmp[i].li_attr.id; + } + if(tmp[i].a_attr && tmp[i].a_attr.id) { + delete tmp[i].a_attr.id; + } + } + } + } + else { + tmp.type = tmp.id && m[tmp.id] && m[tmp.id].type ? m[tmp.id].type : "default"; + if(options && options.no_id) { + tmp = this._delete_ids(tmp); + } + } + return tmp; + }; + this._delete_ids = function (tmp) { + if($.vakata.is_array(tmp)) { + for(var i = 0, j = tmp.length; i < j; i++) { + tmp[i] = this._delete_ids(tmp[i]); + } + return tmp; + } + delete tmp.id; + if(tmp.li_attr && tmp.li_attr.id) { + delete tmp.li_attr.id; + } + if(tmp.a_attr && tmp.a_attr.id) { + delete tmp.a_attr.id; + } + if(tmp.children && $.vakata.is_array(tmp.children)) { + tmp.children = this._delete_ids(tmp.children); + } + return tmp; + }; + this.check = function (chk, obj, par, pos, more) { + if(parent.check.call(this, chk, obj, par, pos, more) === false) { return false; } + obj = obj && obj.id ? obj : this.get_node(obj); + par = par && par.id ? par : this.get_node(par); + var m = obj && obj.id ? (more && more.origin ? more.origin : $.jstree.reference(obj.id)) : null, tmp, d, i, j; + m = m && m._model && m._model.data ? m._model.data : null; + switch(chk) { + case "create_node": + case "move_node": + case "copy_node": + if(chk !== 'move_node' || $.inArray(obj.id, par.children) === -1) { + tmp = this.get_rules(par); + if(tmp.max_children !== undefined && tmp.max_children !== -1 && tmp.max_children === par.children.length) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'types', 'id' : 'types_01', 'reason' : 'max_children prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) }; + return false; + } + if(tmp.valid_children !== undefined && tmp.valid_children !== -1 && $.inArray((obj.type || 'default'), tmp.valid_children) === -1) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'types', 'id' : 'types_02', 'reason' : 'valid_children prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) }; + return false; + } + if(m && obj.children_d && obj.parents) { + d = 0; + for(i = 0, j = obj.children_d.length; i < j; i++) { + d = Math.max(d, m[obj.children_d[i]].parents.length); + } + d = d - obj.parents.length + 1; + } + if(d <= 0 || d === undefined) { d = 1; } + do { + if(tmp.max_depth !== undefined && tmp.max_depth !== -1 && tmp.max_depth < d) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'types', 'id' : 'types_03', 'reason' : 'max_depth prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) }; + return false; + } + par = this.get_node(par.parent); + tmp = this.get_rules(par); + d++; + } while(par); + } + break; + } + return true; + }; + /** + * used to retrieve the type settings object for a node + * @name get_rules(obj) + * @param {mixed} obj the node to find the rules for + * @return {Object} + * @plugin types + */ + this.get_rules = function (obj) { + obj = this.get_node(obj); + if(!obj) { return false; } + var tmp = this.get_type(obj, true); + if(tmp.max_depth === undefined) { tmp.max_depth = -1; } + if(tmp.max_children === undefined) { tmp.max_children = -1; } + if(tmp.valid_children === undefined) { tmp.valid_children = -1; } + return tmp; + }; + /** + * used to retrieve the type string or settings object for a node + * @name get_type(obj [, rules]) + * @param {mixed} obj the node to find the rules for + * @param {Boolean} rules if set to `true` instead of a string the settings object will be returned + * @return {String|Object} + * @plugin types + */ + this.get_type = function (obj, rules) { + obj = this.get_node(obj); + return (!obj) ? false : ( rules ? $.extend({ 'type' : obj.type }, this.settings.types[obj.type]) : obj.type); + }; + /** + * used to change a node's type + * @name set_type(obj, type) + * @param {mixed} obj the node to change + * @param {String} type the new type + * @plugin types + */ + this.set_type = function (obj, type) { + var m = this._model.data, t, t1, t2, old_type, old_icon, k, d, a; + if($.vakata.is_array(obj)) { + obj = obj.slice(); + for(t1 = 0, t2 = obj.length; t1 < t2; t1++) { + this.set_type(obj[t1], type); + } + return true; + } + t = this.settings.types; + obj = this.get_node(obj); + if(!t[type] || !obj) { return false; } + d = this.get_node(obj, true); + if (d && d.length) { + a = d.children('.jstree-anchor'); + } + old_type = obj.type; + old_icon = this.get_icon(obj); + obj.type = type; + if(old_icon === true || !t[old_type] || (t[old_type].icon !== undefined && old_icon === t[old_type].icon)) { + this.set_icon(obj, t[type].icon !== undefined ? t[type].icon : true); + } + + // remove old type props + if(t[old_type] && t[old_type].li_attr !== undefined && typeof t[old_type].li_attr === 'object') { + for (k in t[old_type].li_attr) { + if (t[old_type].li_attr.hasOwnProperty(k)) { + if (k === 'id') { + continue; + } + else if (k === 'class') { + m[obj.id].li_attr['class'] = (m[obj.id].li_attr['class'] || '').replace(t[old_type].li_attr[k], ''); + if (d) { d.removeClass(t[old_type].li_attr[k]); } + } + else if (m[obj.id].li_attr[k] === t[old_type].li_attr[k]) { + m[obj.id].li_attr[k] = null; + if (d) { d.removeAttr(k); } + } + } + } + } + if(t[old_type] && t[old_type].a_attr !== undefined && typeof t[old_type].a_attr === 'object') { + for (k in t[old_type].a_attr) { + if (t[old_type].a_attr.hasOwnProperty(k)) { + if (k === 'id') { + continue; + } + else if (k === 'class') { + m[obj.id].a_attr['class'] = (m[obj.id].a_attr['class'] || '').replace(t[old_type].a_attr[k], ''); + if (a) { a.removeClass(t[old_type].a_attr[k]); } + } + else if (m[obj.id].a_attr[k] === t[old_type].a_attr[k]) { + if (k === 'href') { + m[obj.id].a_attr[k] = '#'; + if (a) { a.attr('href', '#'); } + } + else { + delete m[obj.id].a_attr[k]; + if (a) { a.removeAttr(k); } + } + } + } + } + } + + // add new props + if(t[type].li_attr !== undefined && typeof t[type].li_attr === 'object') { + for (k in t[type].li_attr) { + if (t[type].li_attr.hasOwnProperty(k)) { + if (k === 'id') { + continue; + } + else if (m[obj.id].li_attr[k] === undefined) { + m[obj.id].li_attr[k] = t[type].li_attr[k]; + if (d) { + if (k === 'class') { + d.addClass(t[type].li_attr[k]); + } + else { + d.attr(k, t[type].li_attr[k]); + } + } + } + else if (k === 'class') { + m[obj.id].li_attr['class'] = t[type].li_attr[k] + ' ' + m[obj.id].li_attr['class']; + if (d) { d.addClass(t[type].li_attr[k]); } + } + } + } + } + if(t[type].a_attr !== undefined && typeof t[type].a_attr === 'object') { + for (k in t[type].a_attr) { + if (t[type].a_attr.hasOwnProperty(k)) { + if (k === 'id') { + continue; + } + else if (m[obj.id].a_attr[k] === undefined) { + m[obj.id].a_attr[k] = t[type].a_attr[k]; + if (a) { + if (k === 'class') { + a.addClass(t[type].a_attr[k]); + } + else { + a.attr(k, t[type].a_attr[k]); + } + } + } + else if (k === 'href' && m[obj.id].a_attr[k] === '#') { + m[obj.id].a_attr['href'] = t[type].a_attr['href']; + if (a) { a.attr('href', t[type].a_attr['href']); } + } + else if (k === 'class') { + m[obj.id].a_attr['class'] = t[type].a_attr['class'] + ' ' + m[obj.id].a_attr['class']; + if (a) { a.addClass(t[type].a_attr[k]); } + } + } + } + } + + return true; + }; + }; + // include the types plugin by default + // $.jstree.defaults.plugins.push("types"); + + +/** + * ### Unique plugin + * + * Enforces that no nodes with the same name can coexist as siblings. + */ + + /** + * stores all defaults for the unique plugin + * @name $.jstree.defaults.unique + * @plugin unique + */ + $.jstree.defaults.unique = { + /** + * Indicates if the comparison should be case sensitive. Default is `false`. + * @name $.jstree.defaults.unique.case_sensitive + * @plugin unique + */ + case_sensitive : false, + /** + * Indicates if white space should be trimmed before the comparison. Default is `false`. + * @name $.jstree.defaults.unique.trim_whitespace + * @plugin unique + */ + trim_whitespace : false, + /** + * A callback executed in the instance's scope when a new node is created and the name is already taken, the two arguments are the conflicting name and the counter. The default will produce results like `New node (2)`. + * @name $.jstree.defaults.unique.duplicate + * @plugin unique + */ + duplicate : function (name, counter) { + return name + ' (' + counter + ')'; + } + }; + + $.jstree.plugins.unique = function (options, parent) { + this.check = function (chk, obj, par, pos, more) { + if(parent.check.call(this, chk, obj, par, pos, more) === false) { return false; } + obj = obj && obj.id ? obj : this.get_node(obj); + par = par && par.id ? par : this.get_node(par); + if(!par || !par.children) { return true; } + var n = chk === "rename_node" ? pos : obj.text, + c = [], + s = this.settings.unique.case_sensitive, + w = this.settings.unique.trim_whitespace, + m = this._model.data, i, j, t; + for(i = 0, j = par.children.length; i < j; i++) { + t = m[par.children[i]].text; + if (!s) { + t = t.toLowerCase(); + } + if (w) { + t = t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + } + c.push(t); + } + if(!s) { n = n.toLowerCase(); } + if (w) { n = n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); } + switch(chk) { + case "delete_node": + return true; + case "rename_node": + t = obj.text || ''; + if (!s) { + t = t.toLowerCase(); + } + if (w) { + t = t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + } + i = ($.inArray(n, c) === -1 || (obj.text && t === n)); + if(!i) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_01', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) }; + } + return i; + case "create_node": + i = ($.inArray(n, c) === -1); + if(!i) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_04', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) }; + } + return i; + case "copy_node": + i = ($.inArray(n, c) === -1); + if(!i) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_02', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) }; + } + return i; + case "move_node": + i = ( (obj.parent === par.id && (!more || !more.is_multi)) || $.inArray(n, c) === -1); + if(!i) { + this._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_03', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) }; + } + return i; + } + return true; + }; + this.create_node = function (par, node, pos, callback, is_loaded) { + if(!node || node.text === undefined) { + if(par === null) { + par = $.jstree.root; + } + par = this.get_node(par); + if(!par) { + return parent.create_node.call(this, par, node, pos, callback, is_loaded); + } + pos = pos === undefined ? "last" : pos; + if(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) { + return parent.create_node.call(this, par, node, pos, callback, is_loaded); + } + if(!node) { node = {}; } + var tmp, n, dpc, i, j, m = this._model.data, s = this.settings.unique.case_sensitive, w = this.settings.unique.trim_whitespace, cb = this.settings.unique.duplicate, t; + n = tmp = this.get_string('New node'); + dpc = []; + for(i = 0, j = par.children.length; i < j; i++) { + t = m[par.children[i]].text; + if (!s) { + t = t.toLowerCase(); + } + if (w) { + t = t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + } + dpc.push(t); + } + i = 1; + t = n; + if (!s) { + t = t.toLowerCase(); + } + if (w) { + t = t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + } + while($.inArray(t, dpc) !== -1) { + n = cb.call(this, tmp, (++i)).toString(); + t = n; + if (!s) { + t = t.toLowerCase(); + } + if (w) { + t = t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + } + } + node.text = n; + } + return parent.create_node.call(this, par, node, pos, callback, is_loaded); + }; + }; + + // include the unique plugin by default + // $.jstree.defaults.plugins.push("unique"); + + +/** + * ### Wholerow plugin + * + * Makes each node appear block level. Making selection easier. May cause slow down for large trees in old browsers. + */ + + var div = document.createElement('DIV'); + div.setAttribute('unselectable','on'); + div.setAttribute('role','presentation'); + div.className = 'jstree-wholerow'; + div.innerHTML = ' '; + $.jstree.plugins.wholerow = function (options, parent) { + this.bind = function () { + parent.bind.call(this); + + this.element + .on('ready.jstree set_state.jstree', function () { + this.hide_dots(); + }.bind(this)) + .on("init.jstree loading.jstree ready.jstree", function () { + //div.style.height = this._data.core.li_height + 'px'; + this.get_container_ul().addClass('jstree-wholerow-ul'); + }.bind(this)) + .on("deselect_all.jstree", function (e, data) { + this.element.find('.jstree-wholerow-clicked').removeClass('jstree-wholerow-clicked'); + }.bind(this)) + .on("changed.jstree", function (e, data) { + this.element.find('.jstree-wholerow-clicked').removeClass('jstree-wholerow-clicked'); + var tmp = false, i, j; + for(i = 0, j = data.selected.length; i < j; i++) { + tmp = this.get_node(data.selected[i], true); + if(tmp && tmp.length) { + tmp.children('.jstree-wholerow').addClass('jstree-wholerow-clicked'); + } + } + }.bind(this)) + .on("open_node.jstree", function (e, data) { + this.get_node(data.node, true).find('.jstree-clicked').parent().children('.jstree-wholerow').addClass('jstree-wholerow-clicked'); + }.bind(this)) + .on("hover_node.jstree dehover_node.jstree", function (e, data) { + if(e.type === "hover_node" && this.is_disabled(data.node)) { return; } + this.get_node(data.node, true).children('.jstree-wholerow')[e.type === "hover_node"?"addClass":"removeClass"]('jstree-wholerow-hovered'); + }.bind(this)) + .on("contextmenu.jstree", ".jstree-wholerow", function (e) { + if (this._data.contextmenu) { + e.preventDefault(); + var tmp = $.Event('contextmenu', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey, pageX : e.pageX, pageY : e.pageY }); + $(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(tmp); + } + }.bind(this)) + /*! + .on("mousedown.jstree touchstart.jstree", ".jstree-wholerow", function (e) { + if(e.target === e.currentTarget) { + var a = $(e.currentTarget).closest(".jstree-node").children(".jstree-anchor"); + e.target = a[0]; + a.trigger(e); + } + }) + */ + .on("click.jstree", ".jstree-wholerow", function (e) { + e.stopImmediatePropagation(); + var tmp = $.Event('click', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey }); + $(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(tmp).trigger('focus'); + }) + .on("dblclick.jstree", ".jstree-wholerow", function (e) { + e.stopImmediatePropagation(); + var tmp = $.Event('dblclick', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey }); + $(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(tmp).trigger('focus'); + }) + .on("click.jstree", ".jstree-leaf > .jstree-ocl", function (e) { + e.stopImmediatePropagation(); + var tmp = $.Event('click', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey }); + $(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(tmp).trigger('focus'); + }.bind(this)) + .on("mouseover.jstree", ".jstree-wholerow, .jstree-icon", function (e) { + e.stopImmediatePropagation(); + if(!this.is_disabled(e.currentTarget)) { + this.hover_node(e.currentTarget); + } + return false; + }.bind(this)) + .on("mouseleave.jstree", ".jstree-node", function (e) { + this.dehover_node(e.currentTarget); + }.bind(this)); + }; + this.teardown = function () { + if(this.settings.wholerow) { + this.element.find(".jstree-wholerow").remove(); + } + parent.teardown.call(this); + }; + this.redraw_node = function(obj, deep, callback, force_render) { + obj = parent.redraw_node.apply(this, arguments); + if(obj) { + var tmp = div.cloneNode(true); + //tmp.style.height = this._data.core.li_height + 'px'; + if($.inArray(obj.id, this._data.core.selected) !== -1) { tmp.className += ' jstree-wholerow-clicked'; } + if(this._data.core.focused && this._data.core.focused === obj.id) { tmp.className += ' jstree-wholerow-hovered'; } + obj.insertBefore(tmp, obj.childNodes[0]); + } + return obj; + }; + }; + // include the wholerow plugin by default + // $.jstree.defaults.plugins.push("wholerow"); + if(window.customElements && Object && Object.create) { + var proto = Object.create(HTMLElement.prototype); + proto.createdCallback = function () { + var c = { core : {}, plugins : [] }, i; + for(i in $.jstree.plugins) { + if($.jstree.plugins.hasOwnProperty(i) && this.attributes[i]) { + c.plugins.push(i); + if(this.getAttribute(i) && JSON.parse(this.getAttribute(i))) { + c[i] = JSON.parse(this.getAttribute(i)); + } + } + } + for(i in $.jstree.defaults.core) { + if($.jstree.defaults.core.hasOwnProperty(i) && this.attributes[i]) { + c.core[i] = JSON.parse(this.getAttribute(i)) || this.getAttribute(i); + } + } + $(this).jstree(c); + }; + // proto.attributeChangedCallback = function (name, previous, value) { }; + try { + window.customElements.define("vakata-jstree", function() {}, { prototype: proto }); + } catch (ignore) { } + } + +})); \ No newline at end of file diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/jstree.min.js b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/jstree.min.js new file mode 100644 index 00000000..31d06a73 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/jstree.min.js @@ -0,0 +1,6 @@ +/*! jsTree - v3.3.12 - 2021-09-03 - (MIT) */ +!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a,b){"use strict";if(!a.jstree){var c=0,d=!1,e=!1,f=!1,g=[],h=a("script:last").attr("src"),i=window.document,j=window.setImmediate,k=window.Promise;!j&&k&&(j=function(a,b){k.resolve(b).then(a)}),a.jstree={version:"3.3.12",defaults:{plugins:[]},plugins:{},path:h&&-1!==h.indexOf("/")?h.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},a.jstree.create=function(b,d){var e=new a.jstree.core(++c),f=d;return d=a.extend(!0,{},a.jstree.defaults,d),f&&f.plugins&&(d.plugins=f.plugins),a.each(d.plugins,function(a,b){"core"!==a&&(e=e.plugin(b,d[b]))}),a(b).data("jstree",e),e.init(b,d),e},a.jstree.destroy=function(){a(".jstree:jstree").jstree("destroy"),a(i).off(".jstree")},a.jstree.core=function(a){this._id=a,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},a.jstree.reference=function(b){var c=null,d=null;if(!b||!b.id||b.tagName&&b.nodeType||(b=b.id),!d||!d.length)try{d=a(b)}catch(e){}if(!d||!d.length)try{d=a("#"+b.replace(a.jstree.idregex,"\\$&"))}catch(e){}return d&&d.length&&(d=d.closest(".jstree")).length&&(d=d.data("jstree"))?c=d:a(".jstree").each(function(){var d=a(this).data("jstree");return d&&d._model.data[b]?(c=d,!1):void 0}),c},a.fn.jstree=function(c){var d="string"==typeof c,e=Array.prototype.slice.call(arguments,1),f=null;return c!==!0||this.length?(this.each(function(){var g=a.jstree.reference(this),h=d&&g?g[c]:null;return f=d&&h?h.apply(g,e):null,g||d||c!==b&&!a.isPlainObject(c)||a.jstree.create(this,c),(g&&!d||c===!0)&&(f=g||!1),null!==f&&f!==b?!1:void 0}),null!==f&&f!==b?f:this):!1},a.expr.pseudos.jstree=a.expr.createPseudo(function(c){return function(c){return a(c).hasClass("jstree")&&a(c).data("jstree")!==b}}),a.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:a.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,compute_elements_positions:!1,keyboard:{"ctrl-space":function(b){b.type="click",a(b.currentTarget).trigger(b)},enter:function(b){b.type="click",a(b.currentTarget).trigger(b)},left:function(b){if(b.preventDefault(),this.is_open(b.currentTarget))this.close_node(b.currentTarget);else{var c=this.get_parent(b.currentTarget);c&&c.id!==a.jstree.root&&this.get_node(c,!0).children(".jstree-anchor").trigger("focus")}},up:function(a){a.preventDefault();var b=this.get_prev_dom(a.currentTarget);b&&b.length&&b.children(".jstree-anchor").trigger("focus")},right:function(b){if(b.preventDefault(),this.is_closed(b.currentTarget))this.open_node(b.currentTarget,function(a){this.get_node(a,!0).children(".jstree-anchor").trigger("focus")});else if(this.is_open(b.currentTarget)){var c=this.get_node(b.currentTarget,!0).children(".jstree-children")[0];c&&a(this._firstChild(c)).children(".jstree-anchor").trigger("focus")}},down:function(a){a.preventDefault();var b=this.get_next_dom(a.currentTarget);b&&b.length&&b.children(".jstree-anchor").trigger("focus")},"*":function(a){this.open_all()},home:function(b){b.preventDefault();var c=this._firstChild(this.get_container_ul()[0]);c&&a(c).children(".jstree-anchor").filter(":visible").trigger("focus")},end:function(a){a.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().trigger("focus")},f2:function(a){a.preventDefault(),this.edit(a.currentTarget)}}},a.jstree.core.prototype={plugin:function(b,c){var d=a.jstree.plugins[b];return d?(this._data[b]={},d.prototype=this,new d(c,this)):this},init:function(b,c){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[a.jstree.root]={id:a.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=a(b).addClass("jstree jstree-"+this._id),this.settings=c,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html(""),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(a.jstree.root)},destroy:function(a){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(b){}a||this.element.empty(),this.teardown()},_create_prototype_node:function(){var a=i.createElement("LI"),b,c;return a.setAttribute("role","none"),b=i.createElement("I"),b.className="jstree-icon jstree-ocl",b.setAttribute("role","presentation"),a.appendChild(b),b=i.createElement("A"),b.className="jstree-anchor",b.setAttribute("href","#"),b.setAttribute("tabindex","-1"),b.setAttribute("role","treeitem"),c=i.createElement("I"),c.className="jstree-icon jstree-themeicon",c.setAttribute("role","presentation"),b.appendChild(c),a.appendChild(b),b=c=null,a},_kbevent_to_func:function(a){var b={8:"Backspace",9:"Tab",13:"Enter",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"},c=[];if(a.ctrlKey&&c.push("ctrl"),a.altKey&&c.push("alt"),a.shiftKey&&c.push("shift"),c.push(b[a.which]||a.which),c=c.sort().join("-").toLowerCase(),"shift-shift"===c||"ctrl-ctrl"===c||"alt-alt"===c)return null;var d=this.settings.core.keyboard,e,f;for(e in d)if(d.hasOwnProperty(e)&&(f=e,"-"!==f&&"+"!==f&&(f=f.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS"),f=f.split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),f===c))return d[e];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var b="",c=null,d=0;this.element.on("dblclick.jstree",function(a){if(a.target.tagName&&"input"===a.target.tagName.toLowerCase())return!0;if(i.selection&&i.selection.empty)i.selection.empty();else if(window.getSelection){var b=window.getSelection();try{b.removeAllRanges(),b.collapse()}catch(c){}}}).on("mousedown.jstree",function(a){a.target===this.element[0]&&(a.preventDefault(),d=+new Date)}.bind(this)).on("mousedown.jstree",".jstree-ocl",function(a){a.preventDefault()}).on("click.jstree",".jstree-ocl",function(a){this.toggle_node(a.target)}.bind(this)).on("dblclick.jstree",".jstree-anchor",function(a){return a.target.tagName&&"input"===a.target.tagName.toLowerCase()?!0:void(this.settings.core.dblclick_toggle&&this.toggle_node(a.target))}.bind(this)).on("click.jstree",".jstree-anchor",function(b){b.preventDefault(),b.currentTarget!==i.activeElement&&a(b.currentTarget).trigger("focus"),this.activate_node(b.currentTarget,b)}.bind(this)).on("keydown.jstree",".jstree-anchor",function(a){if(a.target.tagName&&"input"===a.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===a.which?a.which=39:39===a.which&&(a.which=37));var b=this._kbevent_to_func(a);if(b){var c=b.call(this,a);if(c===!1||c===!0)return c}}.bind(this)).on("load_node.jstree",function(b,c){c.status&&(c.node.id!==a.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var b=[],c,d;for(c=0,d=this._data.core.selected.length;d>c;c++)b=b.concat(this._model.data[this._data.core.selected[c]].parents);for(b=a.vakata.array_unique(b),c=0,d=b.length;d>c;c++)this.open_node(b[c],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}}.bind(this),0))}.bind(this)).on("keypress.jstree",function(d){if(d.target.tagName&&"input"===d.target.tagName.toLowerCase())return!0;c&&clearTimeout(c),c=setTimeout(function(){b=""},500);var e=String.fromCharCode(d.which).toLowerCase(),f=this.element.find(".jstree-anchor").filter(":visible"),g=f.index(i.activeElement)||0,h=!1;if(b+=e,b.length>1){if(f.slice(g).each(function(c,d){return 0===a(d).text().toLowerCase().indexOf(b)?(a(d).trigger("focus"),h=!0,!1):void 0}.bind(this)),h)return;if(f.slice(0,g).each(function(c,d){return 0===a(d).text().toLowerCase().indexOf(b)?(a(d).trigger("focus"),h=!0,!1):void 0}.bind(this)),h)return}if(new RegExp("^"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(b)){if(f.slice(g+1).each(function(b,c){return a(c).text().toLowerCase().charAt(0)===e?(a(c).trigger("focus"),h=!0,!1):void 0}.bind(this)),h)return;if(f.slice(0,g+1).each(function(b,c){return a(c).text().toLowerCase().charAt(0)===e?(a(c).trigger("focus"),h=!0,!1):void 0}.bind(this)),h)return}}.bind(this)).on("init.jstree",function(){var a=this.settings.core.themes;this._data.core.themes.dots=a.dots,this._data.core.themes.stripes=a.stripes,this._data.core.themes.icons=a.icons,this._data.core.themes.ellipsis=a.ellipsis,this.set_theme(a.name||"default",a.url),this.set_theme_variant(a.variant)}.bind(this)).on("loading.jstree",function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()}.bind(this)).on("blur.jstree",".jstree-anchor",function(b){this._data.core.focused=null,a(b.currentTarget).filter(".jstree-hovered").trigger("mouseleave"),this.element.attr("tabindex","0")}.bind(this)).on("focus.jstree",".jstree-anchor",function(b){var c=this.get_node(b.currentTarget);c&&c.id&&(this._data.core.focused=c.id),this.element.find(".jstree-hovered").not(b.currentTarget).trigger("mouseleave"),a(b.currentTarget).trigger("mouseenter"),this.element.attr("tabindex","-1")}.bind(this)).on("focus.jstree",function(){if(+new Date-d>500&&!this._data.core.focused&&this.settings.core.restore_focus){d=0;var a=this.get_node(this.element.attr("aria-activedescendant"),!0);a&&a.find("> .jstree-anchor").trigger("focus")}}.bind(this)).on("mouseenter.jstree",".jstree-anchor",function(a){this.hover_node(a.currentTarget)}.bind(this)).on("mouseleave.jstree",".jstree-anchor",function(a){this.dehover_node(a.currentTarget)}.bind(this))},unbind:function(){this.element.off(".jstree"),a(i).off(".jstree-"+this._id)},trigger:function(a,b){b||(b={}),b.instance=this,this.element.triggerHandler(a.replace(".jstree","")+".jstree",b)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(b){var c=this.settings.core.strings;return a.vakata.is_function(c)?c.call(this,b):c&&c[b]?c[b]:b},_firstChild:function(a){a=a?a.firstChild:null;while(null!==a&&1!==a.nodeType)a=a.nextSibling;return a},_nextSibling:function(a){a=a?a.nextSibling:null;while(null!==a&&1!==a.nodeType)a=a.nextSibling;return a},_previousSibling:function(a){a=a?a.previousSibling:null;while(null!==a&&1!==a.nodeType)a=a.previousSibling;return a},get_node:function(b,c){b&&b.id&&(b=b.id),b instanceof a&&b.length&&b[0].id&&(b=b[0].id);var d;try{if(this._model.data[b])b=this._model.data[b];else if("string"==typeof b&&this._model.data[b.replace(/^#/,"")])b=this._model.data[b.replace(/^#/,"")];else if("string"==typeof b&&(d=a("#"+b.replace(a.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[d.closest(".jstree-node").attr("id")])b=this._model.data[d.closest(".jstree-node").attr("id")];else if((d=this.element.find(b)).length&&this._model.data[d.closest(".jstree-node").attr("id")])b=this._model.data[d.closest(".jstree-node").attr("id")];else{if(!(d=this.element.find(b)).length||!d.hasClass("jstree"))return!1;b=this._model.data[a.jstree.root]}return c&&(b=b.id===a.jstree.root?this.element:a("#"+b.id.replace(a.jstree.idregex,"\\$&"),this.element)),b}catch(e){return!1}},get_path:function(b,c,d){if(b=b.parents?b:this.get_node(b),!b||b.id===a.jstree.root||!b.parents)return!1;var e,f,g=[];for(g.push(d?b.id:b.text),e=0,f=b.parents.length;f>e;e++)g.push(d?b.parents[e]:this.get_text(b.parents[e]));return g=g.reverse().slice(1),c?g.join(c):g},get_next_dom:function(b,c){var d;if(b=this.get_node(b,!0),b[0]===this.element[0]){d=this._firstChild(this.get_container_ul()[0]);while(d&&0===d.offsetHeight)d=this._nextSibling(d);return d?a(d):!1}if(!b||!b.length)return!1;if(c){d=b[0];do d=this._nextSibling(d);while(d&&0===d.offsetHeight);return d?a(d):!1}if(b.hasClass("jstree-open")){d=this._firstChild(b.children(".jstree-children")[0]);while(d&&0===d.offsetHeight)d=this._nextSibling(d);if(null!==d)return a(d)}d=b[0];do d=this._nextSibling(d);while(d&&0===d.offsetHeight);return null!==d?a(d):b.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(b,c){var d;if(b=this.get_node(b,!0),b[0]===this.element[0]){d=this.get_container_ul()[0].lastChild;while(d&&0===d.offsetHeight)d=this._previousSibling(d);return d?a(d):!1}if(!b||!b.length)return!1;if(c){d=b[0];do d=this._previousSibling(d);while(d&&0===d.offsetHeight);return d?a(d):!1}d=b[0];do d=this._previousSibling(d);while(d&&0===d.offsetHeight);if(null!==d){b=a(d);while(b.hasClass("jstree-open"))b=b.children(".jstree-children").first().children(".jstree-node:visible:last");return b}return d=b[0].parentNode.parentNode,d&&d.className&&-1!==d.className.indexOf("jstree-node")?a(d):!1},get_parent:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.parent:!1},get_children_dom:function(a){return a=this.get_node(a,!0),a[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):a&&a.length?a.children(".jstree-children").children(".jstree-node"):!1},is_parent:function(a){return a=this.get_node(a),a&&(a.state.loaded===!1||a.children.length>0)},is_loaded:function(a){return a=this.get_node(a),a&&a.state.loaded},is_loading:function(a){return a=this.get_node(a),a&&a.state&&a.state.loading},is_open:function(a){return a=this.get_node(a),a&&a.state.opened},is_closed:function(a){return a=this.get_node(a),a&&this.is_parent(a)&&!a.state.opened},is_leaf:function(a){return!this.is_parent(a)},load_node:function(b,c){var d,e,f,g,h;if(a.vakata.is_array(b))return this._load_nodes(b.slice(),c),!0;if(b=this.get_node(b),!b)return c&&c.call(this,b,!1),!1;if(b.state.loaded){for(b.state.loaded=!1,f=0,g=b.parents.length;g>f;f++)this._model.data[b.parents[f]].children_d=a.vakata.array_filter(this._model.data[b.parents[f]].children_d,function(c){return-1===a.inArray(c,b.children_d)});for(d=0,e=b.children_d.length;e>d;d++)this._model.data[b.children_d[d]].state.selected&&(h=!0),delete this._model.data[b.children_d[d]];h&&(this._data.core.selected=a.vakata.array_filter(this._data.core.selected,function(c){return-1===a.inArray(c,b.children_d)})),b.children=[],b.children_d=[],h&&this.trigger("changed",{action:"load_node",node:b,selected:this._data.core.selected})}return b.state.failed=!1,b.state.loading=!0,this.get_node(b,!0).addClass("jstree-loading").attr("aria-busy",!0),this._load_node(b,function(a){b=this._model.data[b.id],b.state.loading=!1,b.state.loaded=a,b.state.failed=!b.state.loaded;var d=this.get_node(b,!0),e=0,f=0,g=this._model.data,h=!1;for(e=0,f=b.children.length;f>e;e++)if(g[b.children[e]]&&!g[b.children[e]].state.hidden){h=!0;break}b.state.loaded&&d&&d.length&&(d.removeClass("jstree-closed jstree-open jstree-leaf"),h?"#"!==b.id&&d.addClass(b.state.opened?"jstree-open":"jstree-closed"):d.addClass("jstree-leaf")),d.removeClass("jstree-loading").attr("aria-busy",!1),this.trigger("load_node",{node:b,status:a}),c&&c.call(this,b,a)}.bind(this)),!0},_load_nodes:function(a,b,c,d){var e=!0,f=function(){this._load_nodes(a,b,!0)},g=this._model.data,h,i,j=[];for(h=0,i=a.length;i>h;h++)g[a[h]]&&(!g[a[h]].state.loaded&&!g[a[h]].state.failed||!c&&d)&&(this.is_loading(a[h])||this.load_node(a[h],f),e=!1);if(e){for(h=0,i=a.length;i>h;h++)g[a[h]]&&g[a[h]].state.loaded&&j.push(a[h]);b&&!b.done&&(b.call(this,j),b.done=!0)}},load_all:function(b,c){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var d=[],e=this._model.data,f=e[b.id].children_d,g,h;for(b.state&&!b.state.loaded&&d.push(b.id),g=0,h=f.length;h>g;g++)e[f[g]]&&e[f[g]].state&&!e[f[g]].state.loaded&&d.push(f[g]);d.length?this._load_nodes(d,function(){this.load_all(b,c)}):(c&&c.call(this,b),this.trigger("load_all",{node:b}))},_load_node:function(b,c){var d=this.settings.core.data,e,f=function g(){return 3!==this.nodeType&&8!==this.nodeType};return d?a.vakata.is_function(d)?d.call(this,b,function(d){d===!1?c.call(this,!1):this["string"==typeof d?"_append_html_data":"_append_json_data"](b,"string"==typeof d?a(a.parseHTML(d)).filter(f):d,function(a){c.call(this,a)})}.bind(this)):"object"==typeof d?d.url?(d=a.extend(!0,{},d),a.vakata.is_function(d.url)&&(d.url=d.url.call(this,b)),a.vakata.is_function(d.data)&&(d.data=d.data.call(this,b)),a.ajax(d).done(function(d,e,g){var h=g.getResponseHeader("Content-Type");return h&&-1!==h.indexOf("json")||"object"==typeof d?this._append_json_data(b,d,function(a){c.call(this,a)}):h&&-1!==h.indexOf("html")||"string"==typeof d?this._append_html_data(b,a(a.parseHTML(d)).filter(f),function(a){c.call(this,a)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:b.id,xhr:g})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1))}.bind(this)).fail(function(a){this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:b.id,xhr:a})},c.call(this,!1),this.settings.core.error.call(this,this._data.core.last_error)}.bind(this))):(e=a.vakata.is_array(d)?a.extend(!0,[],d):a.isPlainObject(d)?a.extend(!0,{},d):d,b.id===a.jstree.root?this._append_json_data(b,e,function(a){c.call(this,a)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:b.id})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1))):"string"==typeof d?b.id===a.jstree.root?this._append_html_data(b,a(a.parseHTML(d)).filter(f),function(a){c.call(this,a)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:b.id})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1)):c.call(this,!1):b.id===a.jstree.root?this._append_html_data(b,this._data.core.original_container_html.clone(!0),function(a){c.call(this,a)}):c.call(this,!1)},_node_changed:function(b){b=this.get_node(b),b&&-1===a.inArray(b.id,this._model.changed)&&this._model.changed.push(b.id)},_append_html_data:function(b,c,d){b=this.get_node(b),b.children=[],b.children_d=[];var e=c.is("ul")?c.children():c,f=b.id,g=[],h=[],i=this._model.data,j=i[f],k=this._data.core.selected.length,l,m,n;for(e.each(function(b,c){l=this._parse_model_from_html(a(c),f,j.parents.concat()),l&&(g.push(l),h.push(l),i[l].children_d.length&&(h=h.concat(i[l].children_d)))}.bind(this)),j.children=g,j.children_d=h,m=0,n=j.parents.length;n>m;m++)i[j.parents[m]].children_d=i[j.parents[m]].children_d.concat(h);this.trigger("model",{nodes:h,parent:f}),f!==a.jstree.root?(this._node_changed(f),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==k&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),d.call(this,!0)},_append_json_data:function(b,c,d,e){if(null!==this.element){b=this.get_node(b),b.children=[],b.children_d=[],c.d&&(c=c.d,"string"==typeof c&&(c=JSON.parse(c))),a.vakata.is_array(c)||(c=[c]);var f=null,g={df:this._model.default_state,dat:c,par:b.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},h=this,i=function(a,b){a.data&&(a=a.data);var c=a.dat,d=a.par,e=[],f=[],g=[],i=a.df,j=a.t_id,k=a.t_cnt,l=a.m,m=l[d],n=a.sel,o,p,q,r,s=function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=a.id.toString(),f,h,j,k,m={id:e,text:a.text||"",icon:a.icon!==b?a.icon:!0,parent:c,parents:d,children:a.children||[],children_d:a.children_d||[],data:a.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(f in i)i.hasOwnProperty(f)&&(m.state[f]=i[f]);if(a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(m.icon=a.data.jstree.icon),(m.icon===b||null===m.icon||""===m.icon)&&(m.icon=!0),a&&a.data&&(m.data=a.data,a.data.jstree))for(f in a.data.jstree)a.data.jstree.hasOwnProperty(f)&&(m.state[f]=a.data.jstree[f]);if(a&&"object"==typeof a.state)for(f in a.state)a.state.hasOwnProperty(f)&&(m.state[f]=a.state[f]);if(a&&"object"==typeof a.li_attr)for(f in a.li_attr)a.li_attr.hasOwnProperty(f)&&(m.li_attr[f]=a.li_attr[f]);if(m.li_attr.id||(m.li_attr.id=e),a&&"object"==typeof a.a_attr)for(f in a.a_attr)a.a_attr.hasOwnProperty(f)&&(m.a_attr[f]=a.a_attr[f]);for(a&&a.children&&a.children===!0&&(m.state.loaded=!1,m.children=[],m.children_d=[]),l[m.id]=m,f=0,h=m.children.length;h>f;f++)j=s(l[m.children[f]],m.id,d),k=l[j],m.children_d.push(j),k.children_d.length&&(m.children_d=m.children_d.concat(k.children_d));return delete a.data,delete a.children,l[m.id].original=a,m.state.selected&&g.push(m.id),m.id},t=function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=!1,f,h,m,n,o;do e="j"+j+"_"+ ++k;while(l[e]);o={id:!1,text:"string"==typeof a?a:"",icon:"object"==typeof a&&a.icon!==b?a.icon:!0,parent:c,parents:d,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(f in i)i.hasOwnProperty(f)&&(o.state[f]=i[f]);if(a&&a.id&&(o.id=a.id.toString()),a&&a.text&&(o.text=a.text),a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(o.icon=a.data.jstree.icon),(o.icon===b||null===o.icon||""===o.icon)&&(o.icon=!0),a&&a.data&&(o.data=a.data,a.data.jstree))for(f in a.data.jstree)a.data.jstree.hasOwnProperty(f)&&(o.state[f]=a.data.jstree[f]);if(a&&"object"==typeof a.state)for(f in a.state)a.state.hasOwnProperty(f)&&(o.state[f]=a.state[f]);if(a&&"object"==typeof a.li_attr)for(f in a.li_attr)a.li_attr.hasOwnProperty(f)&&(o.li_attr[f]=a.li_attr[f]);if(o.li_attr.id&&!o.id&&(o.id=o.li_attr.id.toString()),o.id||(o.id=e),o.li_attr.id||(o.li_attr.id=o.id),a&&"object"==typeof a.a_attr)for(f in a.a_attr)a.a_attr.hasOwnProperty(f)&&(o.a_attr[f]=a.a_attr[f]);if(a&&a.children&&a.children.length){for(f=0,h=a.children.length;h>f;f++)m=t(a.children[f],o.id,d),n=l[m],o.children.push(m),n.children_d.length&&(o.children_d=o.children_d.concat(n.children_d));o.children_d=o.children_d.concat(o.children)}return a&&a.children&&a.children===!0&&(o.state.loaded=!1,o.children=[],o.children_d=[]),delete a.data,delete a.children,o.original=a,l[o.id]=o,o.state.selected&&g.push(o.id),o.id};if(c.length&&c[0].id!==b&&c[0].parent!==b){for(p=0,q=c.length;q>p;p++)c[p].children||(c[p].children=[]),c[p].state||(c[p].state={}),l[c[p].id.toString()]=c[p];for(p=0,q=c.length;q>p;p++)l[c[p].parent.toString()]?(l[c[p].parent.toString()].children.push(c[p].id.toString()),m.children_d.push(c[p].id.toString())):"undefined"!=typeof h&&(h._data.core.last_error={error:"parse",plugin:"core",id:"core_07",reason:"Node with invalid parent",data:JSON.stringify({id:c[p].id.toString(),parent:c[p].parent.toString()})},h.settings.core.error.call(h,h._data.core.last_error));for(p=0,q=m.children.length;q>p;p++)o=s(l[m.children[p]],d,m.parents.concat()),f.push(o),l[o].children_d.length&&(f=f.concat(l[o].children_d));for(p=0,q=m.parents.length;q>p;p++)l[m.parents[p]].children_d=l[m.parents[p]].children_d.concat(f);r={cnt:k,mod:l,sel:n,par:d,dpc:f,add:g}}else{for(p=0,q=c.length;q>p;p++)o=t(c[p],d,m.parents.concat()),o&&(e.push(o),f.push(o),l[o].children_d.length&&(f=f.concat(l[o].children_d)));for(m.children=e,m.children_d=f,p=0,q=m.parents.length;q>p;p++)l[m.parents[p]].children_d=l[m.parents[p]].children_d.concat(f);r={cnt:k,mod:l,sel:n,par:d,dpc:f,add:g}}return"undefined"!=typeof window&&"undefined"!=typeof window.document?r:void postMessage(r)},k=function(b,c){if(null!==this.element){this._cnt=b.cnt;var e,f=this._model.data;for(e in f)f.hasOwnProperty(e)&&f[e].state&&f[e].state.loading&&b.mod[e]&&(b.mod[e].state.loading=!0);if(this._model.data=b.mod,c){var g,i=b.add,k=b.sel,l=this._data.core.selected.slice();if(f=this._model.data,k.length!==l.length||a.vakata.array_unique(k.concat(l)).length!==k.length){for(e=0,g=k.length;g>e;e++)-1===a.inArray(k[e],i)&&-1===a.inArray(k[e],l)&&(f[k[e]].state.selected=!1);for(e=0,g=l.length;g>e;e++)-1===a.inArray(l[e],k)&&(f[l[e]].state.selected=!0)}}b.add.length&&(this._data.core.selected=this._data.core.selected.concat(b.add)),this.trigger("model",{nodes:b.dpc,parent:b.par}),b.par!==a.jstree.root?(this._node_changed(b.par),this.redraw()):this.redraw(!0),b.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),!c&&j?j(function(){d.call(h,!0)}):d.call(h,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+i.toString()],{type:"text/javascript"}))),!this._data.core.working||e?(this._data.core.working=!0,f=new window.Worker(this._wrk),f.onmessage=function(a){k.call(this,a.data,!0);try{f.terminate(),f=null}catch(b){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}.bind(this),g.par?f.postMessage(g):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([b,c,d,!0])}catch(l){k.call(this,i(g),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else k.call(this,i(g),!1)}},_parse_model_from_html:function(c,d,e){e=e?[].concat(e):[],d&&e.unshift(d);var f,g,h=this._model.data,i={id:!1,text:!1,icon:!0,parent:d,parents:e,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},j,k,l;for(j in this._model.default_state)this._model.default_state.hasOwnProperty(j)&&(i.state[j]=this._model.default_state[j]);if(k=a.vakata.attributes(c,!0),a.each(k,function(b,c){return c=a.vakata.trim(c),c.length?(i.li_attr[b]=c,void("id"===b&&(i.id=c.toString()))):!0}),k=c.children("a").first(),k.length&&(k=a.vakata.attributes(k,!0),a.each(k,function(b,c){c=a.vakata.trim(c),c.length&&(i.a_attr[b]=c)})),k=c.children("a").first().length?c.children("a").first().clone():c.clone(),k.children("ins, i, ul").remove(),k=k.html(),k=a("
      ").html(k),i.text=this.settings.core.force_text?k.text():k.html(),k=c.data(),i.data=k?a.extend(!0,{},k):null,i.state.opened=c.hasClass("jstree-open"),i.state.selected=c.children("a").hasClass("jstree-clicked"),i.state.disabled=c.children("a").hasClass("jstree-disabled"),i.data&&i.data.jstree)for(j in i.data.jstree)i.data.jstree.hasOwnProperty(j)&&(i.state[j]=i.data.jstree[j]);k=c.children("a").children(".jstree-themeicon"),k.length&&(i.icon=k.hasClass("jstree-themeicon-hidden")?!1:k.attr("rel")),i.state.icon!==b&&(i.icon=i.state.icon),(i.icon===b||null===i.icon||""===i.icon)&&(i.icon=!0),k=c.children("ul").children("li");do l="j"+this._id+"_"+ ++this._cnt;while(h[l]);return i.id=i.li_attr.id?i.li_attr.id.toString():l,k.length?(k.each(function(b,c){f=this._parse_model_from_html(a(c),i.id,e),g=this._model.data[f],i.children.push(f),g.children_d.length&&(i.children_d=i.children_d.concat(g.children_d))}.bind(this)),i.children_d=i.children_d.concat(i.children)):c.hasClass("jstree-closed")&&(i.state.loaded=!1),i.li_attr["class"]&&(i.li_attr["class"]=i.li_attr["class"].replace("jstree-closed","").replace("jstree-open","")),i.a_attr["class"]&&(i.a_attr["class"]=i.a_attr["class"].replace("jstree-clicked","").replace("jstree-disabled","")),h[i.id]=i,i.state.selected&&this._data.core.selected.push(i.id),i.id},_parse_model_from_flat_json:function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=a.id.toString(),f=this._model.data,g=this._model.default_state,h,i,j,k,l={id:e,text:a.text||"",icon:a.icon!==b?a.icon:!0,parent:c,parents:d,children:a.children||[],children_d:a.children_d||[],data:a.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(h in g)g.hasOwnProperty(h)&&(l.state[h]=g[h]);if(a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(l.icon=a.data.jstree.icon),(l.icon===b||null===l.icon||""===l.icon)&&(l.icon=!0),a&&a.data&&(l.data=a.data,a.data.jstree))for(h in a.data.jstree)a.data.jstree.hasOwnProperty(h)&&(l.state[h]=a.data.jstree[h]);if(a&&"object"==typeof a.state)for(h in a.state)a.state.hasOwnProperty(h)&&(l.state[h]=a.state[h]);if(a&&"object"==typeof a.li_attr)for(h in a.li_attr)a.li_attr.hasOwnProperty(h)&&(l.li_attr[h]=a.li_attr[h]);if(l.li_attr.id||(l.li_attr.id=e),a&&"object"==typeof a.a_attr)for(h in a.a_attr)a.a_attr.hasOwnProperty(h)&&(l.a_attr[h]=a.a_attr[h]);for(a&&a.children&&a.children===!0&&(l.state.loaded=!1,l.children=[],l.children_d=[]),f[l.id]=l,h=0,i=l.children.length;i>h;h++)j=this._parse_model_from_flat_json(f[l.children[h]],l.id,d),k=f[j],l.children_d.push(j),k.children_d.length&&(l.children_d=l.children_d.concat(k.children_d));return delete a.data,delete a.children,f[l.id].original=a,l.state.selected&&this._data.core.selected.push(l.id),l.id},_parse_model_from_json:function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=!1,f,g,h,i,j=this._model.data,k=this._model.default_state,l;do e="j"+this._id+"_"+ ++this._cnt;while(j[e]);l={id:!1,text:"string"==typeof a?a:"",icon:"object"==typeof a&&a.icon!==b?a.icon:!0,parent:c,parents:d,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(f in k)k.hasOwnProperty(f)&&(l.state[f]=k[f]);if(a&&a.id&&(l.id=a.id.toString()),a&&a.text&&(l.text=a.text),a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(l.icon=a.data.jstree.icon),(l.icon===b||null===l.icon||""===l.icon)&&(l.icon=!0), +a&&a.data&&(l.data=a.data,a.data.jstree))for(f in a.data.jstree)a.data.jstree.hasOwnProperty(f)&&(l.state[f]=a.data.jstree[f]);if(a&&"object"==typeof a.state)for(f in a.state)a.state.hasOwnProperty(f)&&(l.state[f]=a.state[f]);if(a&&"object"==typeof a.li_attr)for(f in a.li_attr)a.li_attr.hasOwnProperty(f)&&(l.li_attr[f]=a.li_attr[f]);if(l.li_attr.id&&!l.id&&(l.id=l.li_attr.id.toString()),l.id||(l.id=e),l.li_attr.id||(l.li_attr.id=l.id),a&&"object"==typeof a.a_attr)for(f in a.a_attr)a.a_attr.hasOwnProperty(f)&&(l.a_attr[f]=a.a_attr[f]);if(a&&a.children&&a.children.length){for(f=0,g=a.children.length;g>f;f++)h=this._parse_model_from_json(a.children[f],l.id,d),i=j[h],l.children.push(h),i.children_d.length&&(l.children_d=l.children_d.concat(i.children_d));l.children_d=l.children.concat(l.children_d)}return a&&a.children&&a.children===!0&&(l.state.loaded=!1,l.children=[],l.children_d=[]),delete a.data,delete a.children,l.original=a,j[l.id]=l,l.state.selected&&this._data.core.selected.push(l.id),l.id},_redraw:function(){var b=this._model.force_full_redraw?this._model.data[a.jstree.root].children.concat([]):this._model.changed.concat([]),c=i.createElement("UL"),d,e,f,g=this._data.core.focused;for(e=0,f=b.length;f>e;e++)d=this.redraw_node(b[e],!0,this._model.force_full_redraw),d&&this._model.force_full_redraw&&c.appendChild(d);this._model.force_full_redraw&&(c.className=this.get_container_ul()[0].className,c.setAttribute("role","group"),this.element.empty().append(c)),null!==g&&this.settings.core.restore_focus&&(d=this.get_node(g,!0),d&&d.length&&d.children(".jstree-anchor")[0]!==i.activeElement?d.children(".jstree-anchor").trigger("focus"):this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:b})},redraw:function(a){a&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(b){var c=this.get_node(b),d=!1,e=!1,f=!1,g=i;if(!c)return!1;if(c.id===a.jstree.root)return this.redraw(!0);if(b=this.get_node(b,!0),!b||!b.length)return!1;if(b.children(".jstree-children").remove(),b=b[0],c.children.length&&c.state.loaded){for(f=g.createElement("UL"),f.setAttribute("role","group"),f.className="jstree-children",d=0,e=c.children.length;e>d;d++)f.appendChild(this.redraw_node(c.children[d],!0,!0));b.appendChild(f)}},redraw_node:function(b,c,d,e){var f=this.get_node(b),g=!1,h=!1,j=!1,k=!1,l=!1,m=!1,n="",o=i,p=this._model.data,q=!1,r=!1,s=null,t=0,u=0,v=!1,w=!1;if(!f)return!1;if(f.id===a.jstree.root)return this.redraw(!0);if(c=c||0===f.children.length,b=i.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(f.id[0])?"\\3"+f.id[0]+" "+f.id.substr(1).replace(a.jstree.idregex,"\\$&"):f.id.replace(a.jstree.idregex,"\\$&"))):i.getElementById(f.id))b=a(b),d||(g=b.parent().parent()[0],g===this.element[0]&&(g=null),h=b.index()),c||!f.children.length||b.children(".jstree-children").length||(c=!0),c||(j=b.children(".jstree-children")[0]),q=b.children(".jstree-anchor")[0]===i.activeElement,b.remove();else if(c=!0,!d){if(g=f.parent!==a.jstree.root?a("#"+f.parent.replace(a.jstree.idregex,"\\$&"),this.element)[0]:null,!(null===g||g&&p[f.parent].state.opened))return!1;h=a.inArray(f.id,null===g?p[a.jstree.root].children:p[f.parent].children)}b=this._data.core.node.cloneNode(!0),n="jstree-node ";for(k in f.li_attr)if(f.li_attr.hasOwnProperty(k)){if("id"===k)continue;"class"!==k?b.setAttribute(k,f.li_attr[k]):n+=f.li_attr[k]}for(f.a_attr.id||(f.a_attr.id=f.id+"_anchor"),b.childNodes[1].setAttribute("aria-selected",!!f.state.selected),b.childNodes[1].setAttribute("aria-level",f.parents.length),this.settings.core.compute_elements_positions&&(b.childNodes[1].setAttribute("aria-setsize",p[f.parent].children.length),b.childNodes[1].setAttribute("aria-posinset",p[f.parent].children.indexOf(f.id)+1)),f.state.disabled&&b.childNodes[1].setAttribute("aria-disabled",!0),k=0,l=f.children.length;l>k;k++)if(!p[f.children[k]].state.hidden){v=!0;break}if(null!==f.parent&&p[f.parent]&&!f.state.hidden&&(k=a.inArray(f.id,p[f.parent].children),w=f.id,-1!==k))for(k++,l=p[f.parent].children.length;l>k;k++)if(p[p[f.parent].children[k]].state.hidden||(w=p[f.parent].children[k]),w!==f.id)break;f.state.hidden&&(n+=" jstree-hidden"),f.state.loading&&(n+=" jstree-loading"),f.state.loaded&&!v?n+=" jstree-leaf":(n+=f.state.opened&&f.state.loaded?" jstree-open":" jstree-closed",b.childNodes[1].setAttribute("aria-expanded",f.state.opened&&f.state.loaded)),w===f.id&&(n+=" jstree-last"),b.id=f.id,b.className=n,n=(f.state.selected?" jstree-clicked":"")+(f.state.disabled?" jstree-disabled":"");for(l in f.a_attr)if(f.a_attr.hasOwnProperty(l)){if("href"===l&&"#"===f.a_attr[l])continue;"class"!==l?b.childNodes[1].setAttribute(l,f.a_attr[l]):n+=" "+f.a_attr[l]}if(n.length&&(b.childNodes[1].className="jstree-anchor "+n),(f.icon&&f.icon!==!0||f.icon===!1)&&(f.icon===!1?b.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":-1===f.icon.indexOf("/")&&-1===f.icon.indexOf(".")?b.childNodes[1].childNodes[0].className+=" "+f.icon+" jstree-themeicon-custom":(b.childNodes[1].childNodes[0].style.backgroundImage='url("'+f.icon+'")',b.childNodes[1].childNodes[0].style.backgroundPosition="center center",b.childNodes[1].childNodes[0].style.backgroundSize="auto",b.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?b.childNodes[1].appendChild(o.createTextNode(f.text)):b.childNodes[1].innerHTML+=f.text,c&&f.children.length&&(f.state.opened||e)&&f.state.loaded){for(m=o.createElement("UL"),m.setAttribute("role","group"),m.className="jstree-children",k=0,l=f.children.length;l>k;k++)m.appendChild(this.redraw_node(f.children[k],c,!0));b.appendChild(m)}if(j&&b.appendChild(j),!d){for(g||(g=this.element[0]),k=0,l=g.childNodes.length;l>k;k++)if(g.childNodes[k]&&g.childNodes[k].className&&-1!==g.childNodes[k].className.indexOf("jstree-children")){s=g.childNodes[k];break}s||(s=o.createElement("UL"),s.setAttribute("role","group"),s.className="jstree-children",g.appendChild(s)),g=s,hf;f++)this.open_node(c[f],d,e);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?(e=e===b?this.settings.core.animation:e,this.is_closed(c)?this.is_loaded(c)?(h=this.get_node(c,!0),i=this,h.length&&(e&&h.children(".jstree-children").length&&h.children(".jstree-children").stop(!0,!0),c.children.length&&!this._firstChild(h.children(".jstree-children")[0])&&this.draw_children(c),e?(this.trigger("before_open",{node:c}),h.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").children(".jstree-anchor").attr("aria-expanded",!0).end().children(".jstree-children").stop(!0,!0).slideDown(e,function(){this.style.display="",i.element&&i.trigger("after_open",{node:c})})):(this.trigger("before_open",{node:c}),h[0].className=h[0].className.replace("jstree-closed","jstree-open"),h[0].childNodes[1].setAttribute("aria-expanded",!0))),c.state.opened=!0,d&&d.call(this,c,!0),h.length||this.trigger("before_open",{node:c}),this.trigger("open_node",{node:c}),e&&h.length||this.trigger("after_open",{node:c}),!0):this.is_loading(c)?setTimeout(function(){this.open_node(c,d,e)}.bind(this),500):void this.load_node(c,function(a,b){return b?this.open_node(a,d,e):d?d.call(this,a,!1):!1}):(d&&d.call(this,c,!1),!1)):!1},_open_to:function(b){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var c,d,e=b.parents;for(c=0,d=e.length;d>c;c+=1)c!==a.jstree.root&&this.open_node(e[c],!1,0);return a("#"+b.id.replace(a.jstree.idregex,"\\$&"),this.element)},close_node:function(c,d){var e,f,g,h;if(a.vakata.is_array(c)){for(c=c.slice(),e=0,f=c.length;f>e;e++)this.close_node(c[e],d);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?this.is_closed(c)?!1:(d=d===b?this.settings.core.animation:d,g=this,h=this.get_node(c,!0),c.state.opened=!1,this.trigger("close_node",{node:c}),void(h.length?d?h.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").children(".jstree-anchor").attr("aria-expanded",!1).end().children(".jstree-children").stop(!0,!0).slideUp(d,function(){this.style.display="",h.children(".jstree-children").remove(),g.element&&g.trigger("after_close",{node:c})}):(h[0].className=h[0].className.replace("jstree-open","jstree-closed"),h.children(".jstree-anchor").attr("aria-expanded",!1),h.children(".jstree-children").remove(),this.trigger("after_close",{node:c})):this.trigger("after_close",{node:c}))):!1},toggle_node:function(b){var c,d;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.toggle_node(b[c]);return!0}return this.is_closed(b)?this.open_node(b):this.is_open(b)?this.close_node(b):void 0},open_all:function(b,c,d){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var e=b.id===a.jstree.root?this.get_container_ul():this.get_node(b,!0),f,g,h;if(!e.length){for(f=0,g=b.children_d.length;g>f;f++)this.is_closed(this._model.data[b.children_d[f]])&&(this._model.data[b.children_d[f]].state.opened=!0);return this.trigger("open_all",{node:b})}d=d||e,h=this,e=this.is_closed(b)?e.find(".jstree-closed").addBack():e.find(".jstree-closed"),e.each(function(){h.open_node(this,function(a,b){b&&this.is_parent(a)&&this.open_all(a,c,d)},c||0)}),0===d.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(d)})},close_all:function(b,c){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var d=b.id===a.jstree.root?this.get_container_ul():this.get_node(b,!0),e=this,f,g;for(d.length&&(d=this.is_open(b)?d.find(".jstree-open").addBack():d.find(".jstree-open"),a(d.get().reverse()).each(function(){e.close_node(this,c||0)})),f=0,g=b.children_d.length;g>f;f++)this._model.data[b.children_d[f]].state.opened=!1;this.trigger("close_all",{node:b})},is_disabled:function(a){return a=this.get_node(a),a&&a.state&&a.state.disabled},enable_node:function(b){var c,d;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.enable_node(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.state.disabled=!1,this.get_node(b,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),void this.trigger("enable_node",{node:b})):!1},disable_node:function(b){var c,d;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.disable_node(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.state.disabled=!0,this.get_node(b,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),void this.trigger("disable_node",{node:b})):!1},is_hidden:function(a){return a=this.get_node(a),a.state.hidden===!0},hide_node:function(b,c){var d,e;if(a.vakata.is_array(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.hide_node(b[d],!0);return c||this.redraw(),!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?void(b.state.hidden||(b.state.hidden=!0,this._node_changed(b.parent),c||this.redraw(),this.trigger("hide_node",{node:b}))):!1},show_node:function(b,c){var d,e;if(a.vakata.is_array(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.show_node(b[d],!0);return c||this.redraw(),!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?void(b.state.hidden&&(b.state.hidden=!1,this._node_changed(b.parent),c||this.redraw(),this.trigger("show_node",{node:b}))):!1},hide_all:function(b){var c,d=this._model.data,e=[];for(c in d)d.hasOwnProperty(c)&&c!==a.jstree.root&&!d[c].state.hidden&&(d[c].state.hidden=!0,e.push(c));return this._model.force_full_redraw=!0,b||this.redraw(),this.trigger("hide_all",{nodes:e}),e},show_all:function(b){var c,d=this._model.data,e=[];for(c in d)d.hasOwnProperty(c)&&c!==a.jstree.root&&d[c].state.hidden&&(d[c].state.hidden=!1,e.push(c));return this._model.force_full_redraw=!0,b||this.redraw(),this.trigger("show_all",{nodes:e}),e},activate_node:function(a,c){if(this.is_disabled(a))return!1;if(c&&"object"==typeof c||(c={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==b?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(c.metaKey||c.ctrlKey||c.shiftKey)&&(!c.shiftKey||this._data.core.last_clicked&&this.get_parent(a)&&this.get_parent(a)===this._data.core.last_clicked.parent))if(c.shiftKey){var d=this.get_node(a).id,e=this._data.core.last_clicked.id,f=this.get_node(this._data.core.last_clicked.parent).children,g=!1,h,i;for(h=0,i=f.length;i>h;h+=1)f[h]===d&&(g=!g),f[h]===e&&(g=!g),this.is_disabled(f[h])||!g&&f[h]!==d&&f[h]!==e?this.deselect_node(f[h],!0,c):this.is_hidden(f[h])||this.select_node(f[h],!0,!1,c);this.trigger("changed",{action:"select_node",node:this.get_node(a),selected:this._data.core.selected,event:c})}else this.is_selected(a)?this.deselect_node(a,!1,c):this.select_node(a,!1,!1,c);else!this.settings.core.multiple&&(c.metaKey||c.ctrlKey||c.shiftKey)&&this.is_selected(a)?this.deselect_node(a,!1,c):(this.deselect_all(!0),this.select_node(a,!1,!1,c),this._data.core.last_clicked=this.get_node(a));this.trigger("activate_node",{node:this.get_node(a),event:c})},hover_node:function(a){if(a=this.get_node(a,!0),!a||!a.length||a.children(".jstree-hovered").length)return!1;var b=this.element.find(".jstree-hovered"),c=this.element;b&&b.length&&this.dehover_node(b),a.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(a)}),setTimeout(function(){c.attr("aria-activedescendant",a[0].id)},0)},dehover_node:function(a){return a=this.get_node(a,!0),a&&a.length&&a.children(".jstree-hovered").length?(a.children(".jstree-anchor").removeClass("jstree-hovered"),void this.trigger("dehover_node",{node:this.get_node(a)})):!1},select_node:function(b,c,d,e){var f,g,h,i;if(a.vakata.is_array(b)){for(b=b.slice(),g=0,h=b.length;h>g;g++)this.select_node(b[g],c,d,e);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=this.get_node(b,!0),void(b.state.selected||(b.state.selected=!0,this._data.core.selected.push(b.id),d||(f=this._open_to(b)),f&&f.length&&f.children(".jstree-anchor").addClass("jstree-clicked").attr("aria-selected",!0),this.trigger("select_node",{node:b,selected:this._data.core.selected,event:e}),c||this.trigger("changed",{action:"select_node",node:b,selected:this._data.core.selected,event:e})))):!1},deselect_node:function(b,c,d){var e,f,g;if(a.vakata.is_array(b)){for(b=b.slice(),e=0,f=b.length;f>e;e++)this.deselect_node(b[e],c,d);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(g=this.get_node(b,!0),void(b.state.selected&&(b.state.selected=!1,this._data.core.selected=a.vakata.array_remove_item(this._data.core.selected,b.id),g.length&&g.children(".jstree-anchor").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_node",{node:b,selected:this._data.core.selected,event:d}),c||this.trigger("changed",{action:"deselect_node",node:b,selected:this._data.core.selected,event:d})))):!1},select_all:function(b){var c=this._data.core.selected.concat([]),d,e;for(this._data.core.selected=this._model.data[a.jstree.root].children_d.concat(),d=0,e=this._data.core.selected.length;e>d;d++)this._model.data[this._data.core.selected[d]]&&(this._model.data[this._data.core.selected[d]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),b||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:c})},deselect_all:function(a){var b=this._data.core.selected.concat([]),c,d;for(c=0,d=this._data.core.selected.length;d>c;c++)this._model.data[this._data.core.selected[c]]&&(this._model.data[this._data.core.selected[c]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:b}),a||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:b})},is_selected:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.state.selected:!1},get_selected:function(b){return b?a.map(this._data.core.selected,function(a){return this.get_node(a)}.bind(this)):this._data.core.selected.slice()},get_top_selected:function(b){var c=this.get_selected(!0),d={},e,f,g,h;for(e=0,f=c.length;f>e;e++)d[c[e].id]=c[e];for(e=0,f=c.length;f>e;e++)for(g=0,h=c[e].children_d.length;h>g;g++)d[c[e].children_d[g]]&&delete d[c[e].children_d[g]];c=[];for(e in d)d.hasOwnProperty(e)&&c.push(e);return b?a.map(c,function(a){return this.get_node(a)}.bind(this)):c},get_bottom_selected:function(b){var c=this.get_selected(!0),d=[],e,f;for(e=0,f=c.length;f>e;e++)c[e].children.length||d.push(c[e].id);return b?a.map(d,function(a){return this.get_node(a)}.bind(this)):d},get_state:function(){var b={core:{open:[],loaded:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}},c;for(c in this._model.data)this._model.data.hasOwnProperty(c)&&c!==a.jstree.root&&(this._model.data[c].state.loaded&&this.settings.core.loaded_state&&b.core.loaded.push(c),this._model.data[c].state.opened&&b.core.open.push(c),this._model.data[c].state.selected&&b.core.selected.push(c));return b},set_state:function(c,d){if(c){if(c.core&&c.core.selected&&c.core.initial_selection===b&&(c.core.initial_selection=this._data.core.selected.concat([]).sort().join(",")),c.core){var e,f,g,h,i;if(c.core.loaded)return this.settings.core.loaded_state&&a.vakata.is_array(c.core.loaded)&&c.core.loaded.length?this._load_nodes(c.core.loaded,function(a){delete c.core.loaded,this.set_state(c,d)}):(delete c.core.loaded,this.set_state(c,d)),!1;if(c.core.open)return a.vakata.is_array(c.core.open)&&c.core.open.length?this._load_nodes(c.core.open,function(a){this.open_node(a,!1,0),delete c.core.open,this.set_state(c,d)}):(delete c.core.open,this.set_state(c,d)),!1;if(c.core.scroll)return c.core.scroll&&c.core.scroll.left!==b&&this.element.scrollLeft(c.core.scroll.left),c.core.scroll&&c.core.scroll.top!==b&&this.element.scrollTop(c.core.scroll.top),delete c.core.scroll,this.set_state(c,d),!1;if(c.core.selected)return h=this,(c.core.initial_selection===b||c.core.initial_selection===this._data.core.selected.concat([]).sort().join(","))&&(this.deselect_all(),a.each(c.core.selected,function(a,b){h.select_node(b,!1,!0)})),delete c.core.initial_selection,delete c.core.selected,this.set_state(c,d),!1;for(i in c)c.hasOwnProperty(i)&&"core"!==i&&-1===a.inArray(i,this.settings.plugins)&&delete c[i];if(a.isEmptyObject(c.core))return delete c.core,this.set_state(c,d),!1}return a.isEmptyObject(c)?(c=null,d&&d.call(this),this.trigger("set_state"),!1):!0}return!1},refresh:function(b,c){this._data.core.state=c===!0?{}:this.get_state(),c&&a.vakata.is_function(c)&&(this._data.core.state=c.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[a.jstree.root]={id:a.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var d=this.get_container_ul()[0].className;b||(this.element.html(""),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(a.jstree.root,function(b,c){c&&(this.get_container_ul()[0].className=d,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(a.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(b){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var c=[],d=[],e=this._data.core.selected.concat([]);d.push(b.id),b.state.opened===!0&&c.push(b.id),this.get_node(b,!0).find(".jstree-open").each(function(){d.push(this.id),c.push(this.id)}),this._load_nodes(d,function(a){this.open_node(c,!1,0),this.select_node(e),this.trigger("refresh_node",{node:b,nodes:a})}.bind(this),!1,!0)},set_id:function(b,c){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var d,e,f=this._model.data,g=b.id;for(c=c.toString(),f[b.parent].children[a.inArray(b.id,f[b.parent].children)]=c,d=0,e=b.parents.length;e>d;d++)f[b.parents[d]].children_d[a.inArray(b.id,f[b.parents[d]].children_d)]=c;for(d=0,e=b.children.length;e>d;d++)f[b.children[d]].parent=c;for(d=0,e=b.children_d.length;e>d;d++)f[b.children_d[d]].parents[a.inArray(b.id,f[b.children_d[d]].parents)]=c;return d=a.inArray(b.id,this._data.core.selected),-1!==d&&(this._data.core.selected[d]=c),d=this.get_node(b.id,!0),d&&(d.attr("id",c),this.element.attr("aria-activedescendant")===b.id&&this.element.attr("aria-activedescendant",c)),delete f[b.id],b.id=c,b.li_attr.id=c,f[c]=b,this.trigger("set_id",{node:b,"new":b.id,old:g}),!0},get_text:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.text:!1},set_text:function(b,c){var d,e;if(a.vakata.is_array(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.set_text(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.text=c,this.get_node(b,!0).length&&this.redraw_node(b.id),this.trigger("set_text",{obj:b,text:c}),!0):!1},get_json:function(b,c,d){if(b=this.get_node(b||a.jstree.root),!b)return!1;c&&c.flat&&!d&&(d=[]);var e={id:b.id,text:b.text,icon:this.get_icon(b),li_attr:a.extend(!0,{},b.li_attr),a_attr:a.extend(!0,{},b.a_attr),state:{},data:c&&c.no_data?!1:a.extend(!0,a.vakata.is_array(b.data)?[]:{},b.data)},f,g;if(c&&c.flat?e.parent=b.parent:e.children=[],c&&c.no_state)delete e.state;else for(f in b.state)b.state.hasOwnProperty(f)&&(e.state[f]=b.state[f]);if(c&&c.no_li_attr&&delete e.li_attr,c&&c.no_a_attr&&delete e.a_attr,c&&c.no_id&&(delete e.id,e.li_attr&&e.li_attr.id&&delete e.li_attr.id,e.a_attr&&e.a_attr.id&&delete e.a_attr.id),c&&c.flat&&b.id!==a.jstree.root&&d.push(e),!c||!c.no_children)for(f=0,g=b.children.length;g>f;f++)c&&c.flat?this.get_json(b.children[f],c,d):e.children.push(this.get_json(b.children[f],c));return c&&c.flat?d:b.id===a.jstree.root?e.children:e},create_node:function(c,d,e,f,g){if(null===c&&(c=a.jstree.root),c=this.get_node(c),!c)return!1;if(e=e===b?"last":e,!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(c))return this.load_node(c,function(){this.create_node(c,d,e,f,!0)});d||(d={text:this.get_string("New node")}),d="string"==typeof d?{text:d}:a.extend(!0,{},d),d.text===b&&(d.text=this.get_string("New node"));var h,i,j,k;switch(c.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":h=this.get_node(c.parent),e=a.inArray(c.id,h.children),c=h;break;case"after":h=this.get_node(c.parent),e=a.inArray(c.id,h.children)+1,c=h;break;case"inside":case"first":e=0;break;case"last":e=c.children.length;break;default:e||(e=0)}if(e>c.children.length&&(e=c.children.length),d.id||(d.id=!0),!this.check("create_node",d,c,e))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(d.id===!0&&delete d.id,d=this._parse_model_from_json(d,c.id,c.parents.concat()),!d)return!1;for(h=this.get_node(d),i=[],i.push(d),i=i.concat(h.children_d),this.trigger("model",{nodes:i,parent:c.id}),c.children_d=c.children_d.concat(i),j=0,k=c.parents.length;k>j;j++)this._model.data[c.parents[j]].children_d=this._model.data[c.parents[j]].children_d.concat(i);for(d=h,h=[],j=0,k=c.children.length;k>j;j++)h[j>=e?j+1:j]=c.children[j];return h[e]=d.id,c.children=h,this.redraw_node(c,!0),this.trigger("create_node",{node:this.get_node(d),parent:c.id,position:e}),f&&f.call(this,this.get_node(d)),d.id},rename_node:function(b,c){var d,e,f;if(a.vakata.is_array(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.rename_node(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=b.text,this.check("rename_node",b,this.get_parent(b),c)?(this.set_text(b,c),this.trigger("rename_node",{node:b,text:c,old:f}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1)):!1},delete_node:function(b){var c,d,e,f,g,h,i,j,k,l,m,n;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.delete_node(b[c]);return!0}if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;if(e=this.get_node(b.parent),f=a.inArray(b.id,e.children),l=!1,!this.check("delete_node",b,e,f))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==f&&(e.children=a.vakata.array_remove(e.children,f)),g=b.children_d.concat([]),g.push(b.id),h=0,i=b.parents.length;i>h;h++)this._model.data[b.parents[h]].children_d=a.vakata.array_filter(this._model.data[b.parents[h]].children_d,function(b){return-1===a.inArray(b,g)});for(j=0,k=g.length;k>j;j++)if(this._model.data[g[j]].state.selected){l=!0;break}for(l&&(this._data.core.selected=a.vakata.array_filter(this._data.core.selected,function(b){return-1===a.inArray(b,g)})),this.trigger("delete_node",{node:b,parent:e.id}),l&&this.trigger("changed",{action:"delete_node",node:b,selected:this._data.core.selected,parent:e.id}),j=0,k=g.length;k>j;j++)delete this._model.data[g[j]];return-1!==a.inArray(this._data.core.focused,g)&&(this._data.core.focused=null,m=this.element[0].scrollTop,n=this.element[0].scrollLeft,e.id===a.jstree.root?this._model.data[a.jstree.root].children[0]&&this.get_node(this._model.data[a.jstree.root].children[0],!0).children(".jstree-anchor").triger("focus"):this.get_node(e,!0).children(".jstree-anchor").trigger("focus"),this.element[0].scrollTop=m,this.element[0].scrollLeft=n),this.redraw_node(e,!0),!0},check:function(b,c,d,e,f){c=c&&c.id?c:this.get_node(c),d=d&&d.id?d:this.get_node(d);var g=b.match(/^move_node|copy_node|create_node$/i)?d:c,h=this.settings.core.check_callback;if("move_node"===b||"copy_node"===b){if(!(f&&f.is_multi||"move_node"!==b||a.inArray(c.id,d.children)!==e))return this._data.core.last_error={error:"check",plugin:"core",id:"core_08",reason:"Moving node to its current position",data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1;if(!(f&&f.is_multi||c.id!==d.id&&("move_node"!==b||a.inArray(c.id,d.children)!==e)&&-1===a.inArray(d.id,c.children_d)))return this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1}return g&&g.data&&(g=g.data),g&&g.functions&&(g.functions[b]===!1||g.functions[b]===!0)?(g.functions[b]===!1&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+b,data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})}),g.functions[b]):h===!1||a.vakata.is_function(h)&&h.call(this,b,c,d,e,f)===!1||h&&h[b]===!1?(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+b,data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1):!0},last_error:function(){return this._data.core.last_error},move_node:function(c,d,e,f,g,h,i){var j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(d=this.get_node(d),e=e===b?0:e,!d)return!1;if(!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(d))return this.load_node(d,function(){this.move_node(c,d,e,f,!0,!1,i)});if(a.vakata.is_array(c)){if(1!==c.length){for(j=0,k=c.length;k>j;j++)(r=this.move_node(c[j],d,e,f,g,!1,i))&&(d=r,e="after");return this.redraw(),!0}c=c[0]}if(c=c&&c.id?c:this.get_node(c),!c||c.id===a.jstree.root)return!1;if(l=(c.parent||a.jstree.root).toString(),n=e.toString().match(/^(before|after)$/)&&d.id!==a.jstree.root?this.get_node(d.parent):d,o=i?i:this._model.data[c.id]?this:a.jstree.reference(c.id),p=!o||!o._id||this._id!==o._id,m=o&&o._id&&l&&o._model.data[l]&&o._model.data[l].children?a.inArray(c.id,o._model.data[l].children):-1,o&&o._id&&(c=o._model.data[c.id]),p)return(r=this.copy_node(c,d,e,f,g,!1,i))?(o&&o.delete_node(c),r):!1;switch(d.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":e=a.inArray(d.id,n.children);break;case"after":e=a.inArray(d.id,n.children)+1;break;case"inside":case"first":e=0;break;case"last":e=n.children.length;break;default:e||(e=0)}if(e>n.children.length&&(e=n.children.length),!this.check("move_node",c,n,e,{core:!0,origin:i,is_multi:o&&o._id&&o._id!==this._id,is_foreign:!o||!o._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(c.parent===n.id){for(q=n.children.concat(),r=a.inArray(c.id,q),-1!==r&&(q=a.vakata.array_remove(q,r),e>r&&e--),r=[],s=0,t=q.length;t>s;s++)r[s>=e?s+1:s]=q[s];r[e]=c.id,n.children=r,this._node_changed(n.id),this.redraw(n.id===a.jstree.root)}else{for(r=c.children_d.concat(),r.push(c.id),s=0,t=c.parents.length;t>s;s++){for(q=[],w=o._model.data[c.parents[s]].children_d,u=0,v=w.length;v>u;u++)-1===a.inArray(w[u],r)&&q.push(w[u]);o._model.data[c.parents[s]].children_d=q}for(o._model.data[l].children=a.vakata.array_remove_item(o._model.data[l].children,c.id),s=0,t=n.parents.length;t>s;s++)this._model.data[n.parents[s]].children_d=this._model.data[n.parents[s]].children_d.concat(r);for(q=[],s=0,t=n.children.length;t>s;s++)q[s>=e?s+1:s]=n.children[s];for(q[e]=c.id,n.children=q,n.children_d.push(c.id),n.children_d=n.children_d.concat(c.children_d),c.parent=n.id,r=n.parents.concat(),r.unshift(n.id),w=c.parents.length,c.parents=r,r=r.concat(),s=0,t=c.children_d.length;t>s;s++)this._model.data[c.children_d[s]].parents=this._model.data[c.children_d[s]].parents.slice(0,-1*w),Array.prototype.push.apply(this._model.data[c.children_d[s]].parents,r);(l===a.jstree.root||n.id===a.jstree.root)&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(l),this._node_changed(n.id)),h||this.redraw()}return f&&f.call(this,c,n,e),this.trigger("move_node",{node:c,parent:n.id,position:e,old_parent:l,old_position:m,is_multi:o&&o._id&&o._id!==this._id,is_foreign:!o||!o._id,old_instance:o,new_instance:this}),c.id},copy_node:function(c,d,e,f,g,h,i){var j,k,l,m,n,o,p,q,r,s,t;if(d=this.get_node(d),e=e===b?0:e,!d)return!1;if(!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(d))return this.load_node(d,function(){this.copy_node(c,d,e,f,!0,!1,i)});if(a.vakata.is_array(c)){if(1!==c.length){for(j=0,k=c.length;k>j;j++)(m=this.copy_node(c[j],d,e,f,g,!0,i))&&(d=m,e="after");return this.redraw(),!0}c=c[0]}if(c=c&&c.id?c:this.get_node(c),!c||c.id===a.jstree.root)return!1;switch(q=(c.parent||a.jstree.root).toString(),r=e.toString().match(/^(before|after)$/)&&d.id!==a.jstree.root?this.get_node(d.parent):d,s=i?i:this._model.data[c.id]?this:a.jstree.reference(c.id),t=!s||!s._id||this._id!==s._id,s&&s._id&&(c=s._model.data[c.id]),d.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":e=a.inArray(d.id,r.children);break;case"after":e=a.inArray(d.id,r.children)+1;break;case"inside":case"first":e=0;break;case"last":e=r.children.length;break;default:e||(e=0)}if(e>r.children.length&&(e=r.children.length),!this.check("copy_node",c,r,e,{core:!0,origin:i,is_multi:s&&s._id&&s._id!==this._id,is_foreign:!s||!s._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(p=s?s.get_json(c,{no_id:!0,no_data:!0,no_state:!0}):c,!p)return!1;if(p.id===!0&&delete p.id,p=this._parse_model_from_json(p,r.id,r.parents.concat()), +!p)return!1;for(m=this.get_node(p),c&&c.state&&c.state.loaded===!1&&(m.state.loaded=!1),l=[],l.push(p),l=l.concat(m.children_d),this.trigger("model",{nodes:l,parent:r.id}),n=0,o=r.parents.length;o>n;n++)this._model.data[r.parents[n]].children_d=this._model.data[r.parents[n]].children_d.concat(l);for(l=[],n=0,o=r.children.length;o>n;n++)l[n>=e?n+1:n]=r.children[n];return l[e]=m.id,r.children=l,r.children_d.push(m.id),r.children_d=r.children_d.concat(m.children_d),r.id===a.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(r.id),h||this.redraw(r.id===a.jstree.root),f&&f.call(this,m,r,e),this.trigger("copy_node",{node:m,original:c,parent:r.id,position:e,old_parent:q,old_position:s&&s._id&&q&&s._model.data[q]&&s._model.data[q].children?a.inArray(c.id,s._model.data[q].children):-1,is_multi:s&&s._id&&s._id!==this._id,is_foreign:!s||!s._id,old_instance:s,new_instance:this}),m.id},cut:function(b){if(b||(b=this._data.core.selected.concat()),a.vakata.is_array(b)||(b=[b]),!b.length)return!1;var c=[],g,h,i;for(h=0,i=b.length;i>h;h++)g=this.get_node(b[h]),g&&g.id&&g.id!==a.jstree.root&&c.push(g);return c.length?(d=c,f=this,e="move_node",void this.trigger("cut",{node:b})):!1},copy:function(b){if(b||(b=this._data.core.selected.concat()),a.vakata.is_array(b)||(b=[b]),!b.length)return!1;var c=[],g,h,i;for(h=0,i=b.length;i>h;h++)g=this.get_node(b[h]),g&&g.id&&g.id!==a.jstree.root&&c.push(g);return c.length?(d=c,f=this,e="copy_node",void this.trigger("copy",{node:b})):!1},get_buffer:function(){return{mode:e,node:d,inst:f}},can_paste:function(){return e!==!1&&d!==!1},paste:function(a,b){return a=this.get_node(a),a&&e&&e.match(/^(copy_node|move_node)$/)&&d?(this[e](d,a,b,!1,!1,!1,f)&&this.trigger("paste",{parent:a.id,node:d,mode:e}),d=!1,e=!1,void(f=!1)):!1},clear_buffer:function(){d=!1,e=!1,f=!1,this.trigger("clear_buffer")},edit:function(b,c,d){var e,f,g,h,j,k,l,m,n,o=!1;return(b=this.get_node(b))?this.check("edit",b,this.get_parent(b))?(n=b,c="string"==typeof c?c:b.text,this.set_text(b,""),b=this._open_to(b),n.text=c,e=this._data.core.rtl,f=this.element.width(),this._data.core.focused=n.id,g=b.children(".jstree-anchor").trigger("focus"),h=a(""),j=c,k=a("
      ",{css:{position:"absolute",top:"-200px",left:e?"0px":"-1000px",visibility:"hidden"}}).appendTo(i.body),l=a("",{value:j,"class":"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:function(c){c.stopImmediatePropagation(),c.preventDefault();var e=h.children(".jstree-rename-input"),f=e.val(),i=this.settings.core.force_text,m;""===f&&(f=j),k.remove(),h.replaceWith(g),h.remove(),j=i?j:a("
      ").append(a.parseHTML(j)).html(),b=this.get_node(b),this.set_text(b,j),m=!!this.rename_node(b,i?a("
      ").text(f).text():a("
      ").append(a.parseHTML(f)).html()),m||this.set_text(b,j),this._data.core.focused=n.id,setTimeout(function(){var a=this.get_node(n.id,!0);a.length&&(this._data.core.focused=n.id,a.children(".jstree-anchor").trigger("focus"))}.bind(this),0),d&&d.call(this,n,m,o,f),l=null}.bind(this),keydown:function(a){var b=a.which;27===b&&(o=!0,this.value=j),(27===b||13===b||37===b||38===b||39===b||40===b||32===b)&&a.stopImmediatePropagation(),(27===b||13===b)&&(a.preventDefault(),this.blur())},click:function(a){a.stopImmediatePropagation()},mousedown:function(a){a.stopImmediatePropagation()},keyup:function(a){l.width(Math.min(k.text("pW"+this.value).width(),f))},keypress:function(a){return 13===a.which?!1:void 0}}),m={fontFamily:g.css("fontFamily")||"",fontSize:g.css("fontSize")||"",fontWeight:g.css("fontWeight")||"",fontStyle:g.css("fontStyle")||"",fontStretch:g.css("fontStretch")||"",fontVariant:g.css("fontVariant")||"",letterSpacing:g.css("letterSpacing")||"",wordSpacing:g.css("wordSpacing")||""},h.attr("class",g.attr("class")).append(g.contents().clone()).append(l),g.replaceWith(h),k.css(m),l.css(m).width(Math.min(k.text("pW"+l[0].value).width(),f))[0].select(),void a(i).one("mousedown.jstree touchstart.jstree dnd_start.vakata",function(b){l&&b.target!==l&&a(l).trigger("blur")})):(this.settings.core.error.call(this,this._data.core.last_error),!1):!1},set_theme:function(b,c){if(!b)return!1;if(c===!0){var d=this.settings.core.themes.dir;d||(d=a.jstree.path+"/themes"),c=d+"/"+b+"/style.css"}c&&-1===a.inArray(c,g)&&(a("head").append(''),g.push(c)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=b,this.element.addClass("jstree-"+b),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+b+"-responsive"),this.trigger("set_theme",{theme:b})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(a){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=a,a&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(c,d){var e,f,g,h;if(a.vakata.is_array(c)){for(c=c.slice(),e=0,f=c.length;f>e;e++)this.set_icon(c[e],d);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?(h=c.icon,c.icon=d===!0||null===d||d===b||""===d?!0:d,g=this.get_node(c,!0).children(".jstree-anchor").children(".jstree-themeicon"),d===!1?(g.removeClass("jstree-themeicon-custom "+h).css("background","").removeAttr("rel"),this.hide_icon(c)):d===!0||null===d||d===b||""===d?(g.removeClass("jstree-themeicon-custom "+h).css("background","").removeAttr("rel"),h===!1&&this.show_icon(c)):-1===d.indexOf("/")&&-1===d.indexOf(".")?(g.removeClass(h).css("background",""),g.addClass(d+" jstree-themeicon-custom").attr("rel",d),h===!1&&this.show_icon(c)):(g.removeClass(h).css("background",""),g.addClass("jstree-themeicon-custom").css("background","url('"+d+"') center center no-repeat").attr("rel",d),h===!1&&this.show_icon(c)),!0):!1},get_icon:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.icon:!1},hide_icon:function(b){var c,d;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.hide_icon(b[c]);return!0}return b=this.get_node(b),b&&b!==a.jstree.root?(b.icon=!1,this.get_node(b,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),!0):!1},show_icon:function(b){var c,d,e;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.show_icon(b[c]);return!0}return b=this.get_node(b),b&&b!==a.jstree.root?(e=this.get_node(b,!0),b.icon=e.length?e.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"):!0,b.icon||(b.icon=!0),e.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"),!0):!1}},a.vakata={},a.vakata.attributes=function(b,c){b=a(b)[0];var d=c?{}:[];return b&&b.attributes&&a.each(b.attributes,function(b,e){-1===a.inArray(e.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==e.value&&""!==a.vakata.trim(e.value)&&(c?d[e.name]=e.value:d.push(e.name))}),d},a.vakata.array_unique=function(a){var c=[],d,e,f,g={};for(d=0,f=a.length;f>d;d++)g[a[d]]===b&&(c.push(a[d]),g[a[d]]=!0);return c},a.vakata.array_remove=function(a,b){return a.splice(b,1),a},a.vakata.array_remove_item=function(b,c){var d=a.inArray(c,b);return-1!==d?a.vakata.array_remove(b,d):b},a.vakata.array_filter=function(a,b,c,d,e){if(a.filter)return a.filter(b,c);d=[];for(e in a)~~e+""==e+""&&e>=0&&b.call(c,a[e],+e,a)&&d.push(a[e]);return d},a.vakata.trim=function(a){return String.prototype.trim?String.prototype.trim.call(a.toString()):a.toString().replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},a.vakata.is_function=function(a){return"function"==typeof a&&"number"!=typeof a.nodeType},a.vakata.is_array=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},Function.prototype.bind||(Function.prototype.bind=function(){var a=this,b=arguments[0],c=Array.prototype.slice.call(arguments,1);if("function"!=typeof a)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");return function(){var d=c.concat(Array.prototype.slice.call(arguments));return a.apply(b,d)}}),a.jstree.plugins.changed=function(a,b){var c=[];this.trigger=function(a,d){var e,f;if(d||(d={}),"changed"===a.replace(".jstree","")){d.changed={selected:[],deselected:[]};var g={};for(e=0,f=c.length;f>e;e++)g[c[e]]=1;for(e=0,f=d.selected.length;f>e;e++)g[d.selected[e]]?g[d.selected[e]]=2:d.changed.selected.push(d.selected[e]);for(e=0,f=c.length;f>e;e++)1===g[c[e]]&&d.changed.deselected.push(c[e]);c=d.selected.slice()}b.trigger.call(this,a,d)},this.refresh=function(a,d){return c=[],b.refresh.apply(this,arguments)}};var l=i.createElement("I");l.className="jstree-icon jstree-checkbox",l.setAttribute("role","presentation"),a.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0,cascade_to_disabled:!0,cascade_to_hidden:!0},a.jstree.plugins.checkbox=function(c,d){this.bind=function(){d.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")}.bind(this)).on("loading.jstree",function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()}.bind(this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(this._undetermined.bind(this),50)}.bind(this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",function(a,b){var c=this._model.data,d=c[b.parent],e=b.nodes,f,g;for(f=0,g=e.length;g>f;f++)c[e[f]].state.checked=c[e[f]].state.checked||c[e[f]].original&&c[e[f]].original.state&&c[e[f]].original.state.checked,c[e[f]].state.checked&&this._data.checkbox.selected.push(e[f])}.bind(this)),(-1!==this.settings.checkbox.cascade.indexOf("up")||-1!==this.settings.checkbox.cascade.indexOf("down"))&&this.element.on("model.jstree",function(b,c){var d=this._model.data,e=d[c.parent],f=c.nodes,g=[],h,i,j,k,l,m,n=this.settings.checkbox.cascade,o=this.settings.checkbox.tie_selection;if(-1!==n.indexOf("down"))if(e.state[o?"selected":"checked"]){for(i=0,j=f.length;j>i;i++)d[f[i]].state[o?"selected":"checked"]=!0;this._data[o?"core":"checkbox"].selected=this._data[o?"core":"checkbox"].selected.concat(f)}else for(i=0,j=f.length;j>i;i++)if(d[f[i]].state[o?"selected":"checked"]){for(k=0,l=d[f[i]].children_d.length;l>k;k++)d[d[f[i]].children_d[k]].state[o?"selected":"checked"]=!0;this._data[o?"core":"checkbox"].selected=this._data[o?"core":"checkbox"].selected.concat(d[f[i]].children_d)}if(-1!==n.indexOf("up")){for(i=0,j=e.children_d.length;j>i;i++)d[e.children_d[i]].children.length||g.push(d[e.children_d[i]].parent);for(g=a.vakata.array_unique(g),k=0,l=g.length;l>k;k++){e=d[g[k]];while(e&&e.id!==a.jstree.root){for(h=0,i=0,j=e.children.length;j>i;i++)h+=d[e.children[i]].state[o?"selected":"checked"];if(h!==j)break;e.state[o?"selected":"checked"]=!0,this._data[o?"core":"checkbox"].selected.push(e.id),m=this.get_node(e,!0),m&&m.length&&m.attr("aria-selected",!0).children(".jstree-anchor").addClass(o?"jstree-clicked":"jstree-checked"),e=this.get_node(e.parent)}}}this._data[o?"core":"checkbox"].selected=a.vakata.array_unique(this._data[o?"core":"checkbox"].selected)}.bind(this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",function(b,c){var d=this,e=c.node,f=this._model.data,g=this.get_node(e.parent),h,i,j,k,l=this.settings.checkbox.cascade,m=this.settings.checkbox.tie_selection,n={},o=this._data[m?"core":"checkbox"].selected;for(h=0,i=o.length;i>h;h++)n[o[h]]=!0;if(-1!==l.indexOf("down")){var p=this._cascade_new_checked_state(e.id,!0),q=e.children_d.concat(e.id);for(h=0,i=q.length;i>h;h++)p.indexOf(q[h])>-1?n[q[h]]=!0:delete n[q[h]]}if(-1!==l.indexOf("up"))while(g&&g.id!==a.jstree.root){for(j=0,h=0,i=g.children.length;i>h;h++)j+=f[g.children[h]].state[m?"selected":"checked"];if(j!==i)break;g.state[m?"selected":"checked"]=!0,n[g.id]=!0,k=this.get_node(g,!0),k&&k.length&&k.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"),g=this.get_node(g.parent)}o=[];for(h in n)n.hasOwnProperty(h)&&o.push(h);this._data[m?"core":"checkbox"].selected=o}.bind(this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",function(b,c){var d=this.get_node(a.jstree.root),e=this._model.data,f,g,h;for(f=0,g=d.children_d.length;g>f;f++)h=e[d.children_d[f]],h&&h.original&&h.original.state&&h.original.state.undetermined&&(h.original.state.undetermined=!1)}.bind(this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",function(b,c){var d=this,e=c.node,f=this.get_node(e,!0),g,h,i,j=this.settings.checkbox.cascade,k=this.settings.checkbox.tie_selection,l=this._data[k?"core":"checkbox"].selected,m={},n=[],o=e.children_d.concat(e.id);if(-1!==j.indexOf("down")){var p=this._cascade_new_checked_state(e.id,!1);l=a.vakata.array_filter(l,function(a){return-1===o.indexOf(a)||p.indexOf(a)>-1})}if(-1!==j.indexOf("up")&&-1===l.indexOf(e.id)){for(g=0,h=e.parents.length;h>g;g++)i=this._model.data[e.parents[g]],i.state[k?"selected":"checked"]=!1,i&&i.original&&i.original.state&&i.original.state.undetermined&&(i.original.state.undetermined=!1),i=this.get_node(e.parents[g],!0),i&&i.length&&i.attr("aria-selected",!1).children(".jstree-anchor").removeClass(k?"jstree-clicked":"jstree-checked");l=a.vakata.array_filter(l,function(a){return-1===e.parents.indexOf(a)})}this._data[k?"core":"checkbox"].selected=l}.bind(this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",function(b,c){var d=this.get_node(c.parent),e=this._model.data,f,g,h,i,j=this.settings.checkbox.tie_selection;while(d&&d.id!==a.jstree.root&&!d.state[j?"selected":"checked"]){for(h=0,f=0,g=d.children.length;g>f;f++)h+=e[d.children[f]].state[j?"selected":"checked"];if(!(g>0&&h===g))break;d.state[j?"selected":"checked"]=!0,this._data[j?"core":"checkbox"].selected.push(d.id),i=this.get_node(d,!0),i&&i.length&&i.attr("aria-selected",!0).children(".jstree-anchor").addClass(j?"jstree-clicked":"jstree-checked"),d=this.get_node(d.parent)}}.bind(this)).on("move_node.jstree",function(b,c){var d=c.is_multi,e=c.old_parent,f=this.get_node(c.parent),g=this._model.data,h,i,j,k,l,m=this.settings.checkbox.tie_selection;if(!d){h=this.get_node(e);while(h&&h.id!==a.jstree.root&&!h.state[m?"selected":"checked"]){for(i=0,j=0,k=h.children.length;k>j;j++)i+=g[h.children[j]].state[m?"selected":"checked"];if(!(k>0&&i===k))break;h.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(h.id),l=this.get_node(h,!0),l&&l.length&&l.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"),h=this.get_node(h.parent)}}h=f;while(h&&h.id!==a.jstree.root){for(i=0,j=0,k=h.children.length;k>j;j++)i+=g[h.children[j]].state[m?"selected":"checked"];if(i===k)h.state[m?"selected":"checked"]||(h.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(h.id),l=this.get_node(h,!0),l&&l.length&&l.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"));else{if(!h.state[m?"selected":"checked"])break;h.state[m?"selected":"checked"]=!1,this._data[m?"core":"checkbox"].selected=a.vakata.array_remove_item(this._data[m?"core":"checkbox"].selected,h.id),l=this.get_node(h,!0),l&&l.length&&l.attr("aria-selected",!1).children(".jstree-anchor").removeClass(m?"jstree-clicked":"jstree-checked")}h=this.get_node(h.parent)}}.bind(this))},this.get_undetermined=function(c){if(-1===this.settings.checkbox.cascade.indexOf("undetermined"))return[];var d,e,f,g,h={},i=this._model.data,j=this.settings.checkbox.tie_selection,k=this._data[j?"core":"checkbox"].selected,l=[],m=this,n=[];for(d=0,e=k.length;e>d;d++)if(i[k[d]]&&i[k[d]].parents)for(f=0,g=i[k[d]].parents.length;g>f;f++){if(h[i[k[d]].parents[f]]!==b)break;i[k[d]].parents[f]!==a.jstree.root&&(h[i[k[d]].parents[f]]=!0,l.push(i[k[d]].parents[f]))}for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var c=m.get_node(this),j;if(c)if(c.state.loaded){for(d=0,e=c.children_d.length;e>d;d++)if(j=i[c.children_d[d]],!j.state.loaded&&j.original&&j.original.state&&j.original.state.undetermined&&j.original.state.undetermined===!0)for(h[j.id]===b&&j.id!==a.jstree.root&&(h[j.id]=!0,l.push(j.id)),f=0,g=j.parents.length;g>f;f++)h[j.parents[f]]===b&&j.parents[f]!==a.jstree.root&&(h[j.parents[f]]=!0,l.push(j.parents[f]))}else if(c.original&&c.original.state&&c.original.state.undetermined&&c.original.state.undetermined===!0)for(h[c.id]===b&&c.id!==a.jstree.root&&(h[c.id]=!0,l.push(c.id)),f=0,g=c.parents.length;g>f;f++)h[c.parents[f]]===b&&c.parents[f]!==a.jstree.root&&(h[c.parents[f]]=!0,l.push(c.parents[f]))}),d=0,e=l.length;e>d;d++)i[l[d]].state[j?"selected":"checked"]||n.push(c?i[l[d]]:l[d]);return n},this._undetermined=function(){if(null!==this.element){var a=this.get_undetermined(!1),b,c,d;for(this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),b=0,c=a.length;c>b;b++)d=this.get_node(a[b],!0),d&&d.length&&d.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined")}},this.redraw_node=function(a,b,c,e){if(a=d.redraw_node.apply(this,arguments)){var f,g,h=null,i=null;for(f=0,g=a.childNodes.length;g>f;f++)if(a.childNodes[f]&&a.childNodes[f].className&&-1!==a.childNodes[f].className.indexOf("jstree-anchor")){h=a.childNodes[f];break}h&&(!this.settings.checkbox.tie_selection&&this._model.data[a.id].state.checked&&(h.className+=" jstree-checked"),i=l.cloneNode(!1),this._model.data[a.id].state.checkbox_disabled&&(i.className+=" jstree-checkbox-disabled"),h.insertBefore(i,h.childNodes[0]))}return c||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(this._undetermined.bind(this),50)),a},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(b){b=this.get_node(b);var c=this.settings.checkbox.cascade,d,e,f=this.settings.checkbox.tie_selection,g=this._data[f?"core":"checkbox"].selected,h=this._model.data;if(!b||b.state[f?"selected":"checked"]===!0||-1===c.indexOf("undetermined")||-1===c.indexOf("down")&&-1===c.indexOf("up"))return!1;if(!b.state.loaded&&b.original.state.undetermined===!0)return!0;for(d=0,e=b.children_d.length;e>d;d++)if(-1!==a.inArray(b.children_d[d],g)||!h[b.children_d[d]].state.loaded&&h[b.children_d[d]].original.state.undetermined)return!0;return!1},this.disable_checkbox=function(b){var c,d,e;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.disable_checkbox(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(e=this.get_node(b,!0),void(b.state.checkbox_disabled||(b.state.checkbox_disabled=!0,e&&e.length&&e.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-checkbox-disabled"),this.trigger("disable_checkbox",{node:b})))):!1},this.enable_checkbox=function(b){var c,d,e;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.enable_checkbox(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(e=this.get_node(b,!0),void(b.state.checkbox_disabled&&(b.state.checkbox_disabled=!1,e&&e.length&&e.children(".jstree-anchor").children(".jstree-checkbox").removeClass("jstree-checkbox-disabled"),this.trigger("enable_checkbox",{node:b})))):!1},this.activate_node=function(b,c){return a(c.target).hasClass("jstree-checkbox-disabled")?!1:(this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||a(c.target).hasClass("jstree-checkbox"))&&(c.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!a(c.target).hasClass("jstree-checkbox")?d.activate_node.call(this,b,c):this.is_disabled(b)?!1:(this.is_checked(b)?this.uncheck_node(b,c):this.check_node(b,c),void this.trigger("activate_node",{node:this.get_node(b)})))},this._cascade_new_checked_state=function(a,b){var c=this,d=this.settings.checkbox.tie_selection,e=this._model.data[a],f=[],g=[],h,i,j;if(!this.settings.checkbox.cascade_to_disabled&&e.state.disabled||!this.settings.checkbox.cascade_to_hidden&&e.state.hidden)j=this.get_checked_descendants(a),e.state[d?"selected":"checked"]&&j.push(e.id),f=f.concat(j);else{if(e.children)for(h=0,i=e.children.length;i>h;h++){var k=e.children[h];j=c._cascade_new_checked_state(k,b),f=f.concat(j),j.indexOf(k)>-1&&g.push(k)}var l=c.get_node(e,!0),m=g.length>0&&g.lengthe;e++)this.check_node(b[e],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(d=this.get_node(b,!0),void(b.state.checked||(b.state.checked=!0,this._data.checkbox.selected.push(b.id),d&&d.length&&d.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:b,selected:this._data.checkbox.selected,event:c})))):!1},this.uncheck_node=function(b,c){if(this.settings.checkbox.tie_selection)return this.deselect_node(b,!1,c);var d,e,f;if(a.vakata.is_array(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.uncheck_node(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=this.get_node(b,!0),void(b.state.checked&&(b.state.checked=!1,this._data.checkbox.selected=a.vakata.array_remove_item(this._data.checkbox.selected,b.id),f.length&&f.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:b,selected:this._data.checkbox.selected,event:c})))):!1},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();var b=this._data.checkbox.selected.concat([]),c,d;for(this._data.checkbox.selected=this._model.data[a.jstree.root].children_d.concat(),c=0,d=this._data.checkbox.selected.length;d>c;c++)this._model.data[this._data.checkbox.selected[c]]&&(this._model.data[this._data.checkbox.selected[c]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();var a=this._data.checkbox.selected.concat([]),b,c;for(b=0,c=this._data.checkbox.selected.length;c>b;b++)this._model.data[this._data.checkbox.selected[b]]&&(this._model.data[this._data.checkbox.selected[b]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:a})},this.is_checked=function(b){return this.settings.checkbox.tie_selection?this.is_selected(b):(b=this.get_node(b),b&&b.id!==a.jstree.root?b.state.checked:!1)},this.get_checked=function(b){return this.settings.checkbox.tie_selection?this.get_selected(b):b?a.map(this._data.checkbox.selected,function(a){return this.get_node(a)}.bind(this)):this._data.checkbox.selected.slice()},this.get_top_checked=function(b){if(this.settings.checkbox.tie_selection)return this.get_top_selected(b);var c=this.get_checked(!0),d={},e,f,g,h;for(e=0,f=c.length;f>e;e++)d[c[e].id]=c[e];for(e=0,f=c.length;f>e;e++)for(g=0,h=c[e].children_d.length;h>g;g++)d[c[e].children_d[g]]&&delete d[c[e].children_d[g]];c=[];for(e in d)d.hasOwnProperty(e)&&c.push(e);return b?a.map(c,function(a){return this.get_node(a)}.bind(this)):c},this.get_bottom_checked=function(b){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(b);var c=this.get_checked(!0),d=[],e,f;for(e=0,f=c.length;f>e;e++)c[e].children.length||d.push(c[e].id);return b?a.map(d,function(a){return this.get_node(a)}.bind(this)):d},this.load_node=function(b,c){var e,f,g,h,i,j;if(!a.vakata.is_array(b)&&!this.settings.checkbox.tie_selection&&(j=this.get_node(b),j&&j.state.loaded))for(e=0,f=j.children_d.length;f>e;e++)this._model.data[j.children_d[e]].state.checked&&(i=!0,this._data.checkbox.selected=a.vakata.array_remove_item(this._data.checkbox.selected,j.children_d[e]));return d.load_node.apply(this,arguments)},this.get_state=function(){var a=d.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection?a:(a.checkbox=this._data.checkbox.selected.slice(),a)},this.set_state=function(b,c){var e=d.set_state.apply(this,arguments);if(e&&b.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all();var f=this;a.each(b.checkbox,function(a,b){f.check_node(b)})}return delete b.checkbox,this.set_state(b,c),!1}return e},this.refresh=function(a,b){return this.settings.checkbox.tie_selection&&(this._data.checkbox.selected=[]),d.refresh.apply(this,arguments)}},a.jstree.defaults.conditionalselect=function(){return!0},a.jstree.plugins.conditionalselect=function(a,b){this.activate_node=function(a,c){return this.settings.conditionalselect.call(this,this.get_node(a),c)?b.activate_node.call(this,a,c):void 0}},a.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(b,c){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.create_node(d,{},"last",function(a){try{c.edit(a)}catch(b){setTimeout(function(){c.edit(a)},0)}})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.edit(d)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.delete_node(c.get_selected()):c.delete_node(d)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.cut(c.get_top_selected()):c.cut(d)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.copy(c.get_top_selected()):c.copy(d)}},paste:{separator_before:!1,icon:!1,_disabled:function(b){return!a.jstree.reference(b.reference).can_paste()},separator_after:!1,label:"Paste",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.paste(d)}}}}}}},a.jstree.plugins.contextmenu=function(c,d){this.bind=function(){d.bind.call(this);var b=0,c=null,e,f;this.element.on("init.jstree loading.jstree ready.jstree",function(){this.get_container_ul().addClass("jstree-contextmenu")}.bind(this)).on("contextmenu.jstree",".jstree-anchor",function(a,d){"input"!==a.target.tagName.toLowerCase()&&(a.preventDefault(),b=a.ctrlKey?+new Date:0,(d||c)&&(b=+new Date+1e4),c&&clearTimeout(c),this.is_loading(a.currentTarget)||this.show_contextmenu(a.currentTarget,a.pageX,a.pageY,a))}.bind(this)).on("click.jstree",".jstree-anchor",function(c){this._data.contextmenu.visible&&(!b||+new Date-b>250)&&a.vakata.context.hide(),b=0}.bind(this)).on("touchstart.jstree",".jstree-anchor",function(b){b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(e=b.originalEvent.changedTouches[0].clientX,f=b.originalEvent.changedTouches[0].clientY,c=setTimeout(function(){a(b.currentTarget).trigger("contextmenu",!0)},750))}).on("touchmove.vakata.jstree",function(b){c&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(Math.abs(e-b.originalEvent.changedTouches[0].clientX)>10||Math.abs(f-b.originalEvent.changedTouches[0].clientY)>10)&&(clearTimeout(c),a.vakata.context.hide())}).on("touchend.vakata.jstree",function(a){c&&clearTimeout(c)}),a(i).on("context_hide.vakata.jstree",function(b,c){this._data.contextmenu.visible=!1,a(c.reference).removeClass("jstree-context")}.bind(this))},this.teardown=function(){this._data.contextmenu.visible&&a.vakata.context.hide(),a(i).off("context_hide.vakata.jstree"),d.teardown.call(this)},this.show_contextmenu=function(c,d,e,f){if(c=this.get_node(c),!c||c.id===a.jstree.root)return!1;var g=this.settings.contextmenu,h=this.get_node(c,!0),i=h.children(".jstree-anchor"),j=!1,k=!1;(g.show_at_node||d===b||e===b)&&(j=i.offset(),d=j.left,e=j.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(c)&&this.activate_node(c,f),k=g.items,a.vakata.is_function(k)&&(k=k.call(this,c,function(a){this._show_contextmenu(c,d,e,a)}.bind(this))),a.isPlainObject(k)&&this._show_contextmenu(c,d,e,k)},this._show_contextmenu=function(b,c,d,e){ +var f=this.get_node(b,!0),g=f.children(".jstree-anchor");a(i).one("context_show.vakata.jstree",function(b,c){var d="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";a(c.element).addClass(d),g.addClass("jstree-context")}.bind(this)),this._data.contextmenu.visible=!0,a.vakata.context.show(g,{x:c,y:d},e),this.trigger("show_contextmenu",{node:b,x:c,y:d})}},function(a){var b=!1,c={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1};a.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(b){a(i).triggerHandler("context_"+b+".vakata",{reference:c.reference,element:c.element,position:{x:c.position_x,y:c.position_y}})},_execute:function(b){return b=c.items[b],b&&(!b._disabled||a.vakata.is_function(b._disabled)&&!b._disabled({item:b,reference:c.reference,element:c.element}))&&b.action?b.action.call(null,{item:b,reference:c.reference,element:c.element,position:{x:c.position_x,y:c.position_y}}):!1},_parse:function(b,d){if(!b)return!1;d||(c.html="",c.items=[]);var e="",f=!1,g;return d&&(e+=""),d||(c.html=e,a.vakata.context._trigger("parse")),e.length>10?e:!1},_show_submenu:function(c){if(c=a(c),c.length&&c.children("ul").length){var d=c.children("ul"),e=c.offset().left,f=e+c.outerWidth(),g=c.offset().top,h=d.width(),i=d.height(),j=a(window).width()+a(window).scrollLeft(),k=a(window).height()+a(window).scrollTop();b?c[f-(h+10+c.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):c[f+h>j&&e>j-f?"addClass":"removeClass"]("vakata-context-right"),g+i+10>k&&d.css("bottom","-1px"),c.hasClass("vakata-context-right")?h>e&&d.css("margin-right",e-h):h>j-f&&d.css("margin-left",j-f-h),d.show()}},show:function(d,e,f){var g,h,j,k,l,m,n,o,p=!0;switch(c.element&&c.element.length&&c.element.width(""),p){case!e&&!d:return!1;case!!e&&!!d:c.reference=d,c.position_x=e.x,c.position_y=e.y;break;case!e&&!!d:c.reference=d,g=d.offset(),c.position_x=g.left+d.outerHeight(),c.position_y=g.top;break;case!!e&&!d:c.position_x=e.x,c.position_y=e.y}d&&!f&&a(d).data("vakata_contextmenu")&&(f=a(d).data("vakata_contextmenu")),a.vakata.context._parse(f)&&c.element.html(c.html),c.items.length&&(c.element.appendTo(i.body),h=c.element,j=c.position_x,k=c.position_y,l=h.width(),m=h.height(),n=a(window).width()+a(window).scrollLeft(),o=a(window).height()+a(window).scrollTop(),b&&(j-=h.outerWidth()-a(d).outerWidth(),jn&&(j=n-(l+20)),k+m+20>o&&(k=o-(m+20)),c.element.css({left:j,top:k}).show().find("a").first().trigger("focus").parent().addClass("vakata-context-hover"),c.is_visible=!0,a.vakata.context._trigger("show"))},hide:function(){c.is_visible&&(c.element.hide().find("ul").hide().end().find(":focus").trigger("blur").end().detach(),c.is_visible=!1,a.vakata.context._trigger("hide"))}},a(function(){b="rtl"===a(i.body).css("direction");var d=!1;c.element=a("
        "),c.element.on("mouseenter","li",function(b){b.stopImmediatePropagation(),a.contains(this,b.relatedTarget)||(d&&clearTimeout(d),c.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),a(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),a.vakata.context._show_submenu(this))}).on("mouseleave","li",function(b){a.contains(this,b.relatedTarget)||a(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(b){a(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),a.vakata.context.settings.hide_onmouseleave&&(d=setTimeout(function(b){return function(){a.vakata.context.hide()}}(this),a.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(b){b.preventDefault(),a(this).trigger("blur").parent().hasClass("vakata-context-disabled")||a.vakata.context._execute(a(this).attr("rel"))===!1||a.vakata.context.hide()}).on("keydown","a",function(b){var d=null;switch(b.which){case 13:case 32:b.type="click",b.preventDefault(),a(b.currentTarget).trigger(b);break;case 37:c.is_visible&&(c.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").trigger("focus"),b.stopImmediatePropagation(),b.preventDefault());break;case 38:c.is_visible&&(d=c.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first(),d.length||(d=c.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),d.addClass("vakata-context-hover").children("a").trigger("focus"),b.stopImmediatePropagation(),b.preventDefault());break;case 39:c.is_visible&&(c.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").trigger("focus"),b.stopImmediatePropagation(),b.preventDefault());break;case 40:c.is_visible&&(d=c.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first(),d.length||(d=c.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),d.addClass("vakata-context-hover").children("a").trigger("focus"),b.stopImmediatePropagation(),b.preventDefault());break;case 27:a.vakata.context.hide(),b.preventDefault()}}).on("keydown",function(a){a.preventDefault();var b=c.element.find(".vakata-contextmenu-shortcut-"+a.which).parent();b.parent().not(".vakata-context-disabled")&&b.trigger("click")}),a(i).on("mousedown.vakata.jstree",function(b){c.is_visible&&c.element[0]!==b.target&&!a.contains(c.element[0],b.target)&&a.vakata.context.hide()}).on("context_show.vakata.jstree",function(a,d){c.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),b&&c.element.addClass("vakata-context-rtl").css("direction","rtl"),c.element.find("ul").hide().end()})})}(a),a.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1};var m,n;a.jstree.plugins.dnd=function(b,c){this.init=function(a,b){c.init.call(this,a,b),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in i.createElement("span")},this.bind=function(){c.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",function(b){if(this.settings.dnd.large_drag_target&&a(b.target).closest(".jstree-node")[0]!==b.currentTarget)return!0;if("touchstart"===b.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var c=this.get_node(b.target),d=this.is_selected(c)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,e=d>1?d+" "+this.get_string("nodes"):this.get_text(b.currentTarget);if(this.settings.core.force_text&&(e=a.vakata.html.escape(e)),c&&c.id&&c.id!==a.jstree.root&&(1===b.which||"touchstart"===b.type||"dragstart"===b.type)&&(this.settings.dnd.is_draggable===!0||a.vakata.is_function(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,d>1?this.get_top_selected(!0):[c],b))){if(m={jstree:!0,origin:this,obj:this.get_node(c,!0),nodes:d>1?this.get_top_selected():[c.id]},n=b.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),a.vakata.dnd.start(b,m,'
        '+e+'+
        ');a.vakata.dnd._trigger("start",b,{helper:a(),element:n,data:m})}}.bind(this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(b){return b.preventDefault(),a.vakata.dnd._trigger("move",b,{helper:a(),element:n,data:m}),!1}).on("drop.jstree",function(b){return b.preventDefault(),a.vakata.dnd._trigger("stop",b,{helper:a(),element:n,data:m}),!1}.bind(this))},this.redraw_node=function(a,b,d,e){if(a=c.redraw_node.apply(this,arguments),a&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)a.setAttribute("draggable",!0);else{var f,g,h=null;for(f=0,g=a.childNodes.length;g>f;f++)if(a.childNodes[f]&&a.childNodes[f].className&&-1!==a.childNodes[f].className.indexOf("jstree-anchor")){h=a.childNodes[f];break}h&&h.setAttribute("draggable",!0)}return a}},a(function(){var c=!1,d=!1,e=!1,f=!1,g=a('
         
        ').hide();a(i).on("dragover.vakata.jstree",function(b){n&&a.vakata.dnd._trigger("move",b,{helper:a(),element:n,data:m})}).on("drop.vakata.jstree",function(b){n&&(a.vakata.dnd._trigger("stop",b,{helper:a(),element:n,data:m}),n=null,m=null)}).on("dnd_start.vakata.jstree",function(a,b){c=!1,e=!1,b&&b.data&&b.data.jstree&&g.appendTo(i.body)}).on("dnd_move.vakata.jstree",function(h,i){var j=i.event.target!==e.target;if(f&&(!i.event||"dragover"!==i.event.type||j)&&clearTimeout(f),i&&i.data&&i.data.jstree&&(!i.event.target.id||"jstree-marker"!==i.event.target.id)){e=i.event;var k=a.jstree.reference(i.event.target),l=!1,m=!1,n=!1,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F;if(k&&k._data&&k._data.dnd)if(g.attr("class","jstree-"+k.get_theme()+(k.settings.core.themes.responsive?" jstree-dnd-responsive":"")),D=i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey)),i.helper.children().attr("class","jstree-"+k.get_theme()+" jstree-"+k.get_theme()+"-"+k.get_theme_variant()+" "+(k.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[D?"show":"hide"](),i.event.target!==k.element[0]&&i.event.target!==k.get_container_ul()[0]||0!==k.get_container_ul().children().length){if(l=k.settings.dnd.large_drop_target?a(i.event.target).closest(".jstree-node").children(".jstree-anchor"):a(i.event.target).closest(".jstree-anchor"),l&&l.length&&l.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(m=l.offset(),n=(i.event.pageY!==b?i.event.pageY:i.event.originalEvent.pageY)-m.top,r=l.outerHeight(),u=r/3>n?["b","i","a"]:n>r-r/3?["a","i","b"]:n>r/2?["i","a","b"]:["i","b","a"],a.each(u,function(b,e){switch(e){case"b":p=m.left-6,q=m.top,s=k.get_parent(l),t=l.parent().index(),F="jstree-below";break;case"i":B=k.settings.dnd.inside_pos,C=k.get_node(l.parent()),p=m.left-2,q=m.top+r/2+1,s=C.id,t="first"===B?0:"last"===B?C.children.length:Math.min(B,C.children.length),F="jstree-inside";break;case"a":p=m.left-6,q=m.top+r,s=k.get_parent(l),t=l.parent().index()+1,F="jstree-above"}for(v=!0,w=0,x=i.data.nodes.length;x>w;w++)if(y=i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey))?"copy_node":"move_node",z=t,"move_node"===y&&"a"===e&&i.data.origin&&i.data.origin===k&&s===k.get_parent(i.data.nodes[w])&&(A=k.get_node(s),z>a.inArray(i.data.nodes[w],A.children)&&(z-=1)),v=v&&(k&&k.settings&&k.settings.dnd&&k.settings.dnd.check_while_dragging===!1||k.check(y,i.data.origin&&i.data.origin!==k?i.data.origin.get_node(i.data.nodes[w]):i.data.nodes[w],s,z,{dnd:!0,ref:k.get_node(l.parent()),pos:e,origin:i.data.origin,is_multi:i.data.origin&&i.data.origin!==k,is_foreign:!i.data.origin})),!v){k&&k.last_error&&(d=k.last_error());break}return"i"===e&&l.parent().is(".jstree-closed")&&k.settings.dnd.open_timeout&&(!i.event||"dragover"!==i.event.type||j)&&(f&&clearTimeout(f),f=setTimeout(function(a,b){return function(){a.open_node(b)}}(k,l),k.settings.dnd.open_timeout)),v?(E=k.get_node(s,!0),E.hasClass(".jstree-dnd-parent")||(a(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),E.addClass("jstree-dnd-parent")),c={ins:k,par:s,pos:"i"!==e||"last"!==B||0!==t||k.is_loaded(C)?t:"last"},g.css({left:p+"px",top:q+"px"}).show(),g.removeClass("jstree-above jstree-inside jstree-below").addClass(F),i.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),i.event.originalEvent&&i.event.originalEvent.dataTransfer&&(i.event.originalEvent.dataTransfer.dropEffect=D?"copy":"move"),d={},u=!0,!1):void 0}),u===!0))return}else{for(v=!0,w=0,x=i.data.nodes.length;x>w;w++)if(v=v&&k.check(i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey))?"copy_node":"move_node",i.data.origin&&i.data.origin!==k?i.data.origin.get_node(i.data.nodes[w]):i.data.nodes[w],a.jstree.root,"last",{dnd:!0,ref:k.get_node(a.jstree.root),pos:"i",origin:i.data.origin,is_multi:i.data.origin&&i.data.origin!==k,is_foreign:!i.data.origin}),!v)break;if(v)return c={ins:k,par:a.jstree.root,pos:"last"},g.hide(),i.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),void(i.event.originalEvent&&i.event.originalEvent.dataTransfer&&(i.event.originalEvent.dataTransfer.dropEffect=D?"copy":"move"))}a(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),c=!1,i.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),i.event.originalEvent&&i.event.originalEvent.dataTransfer,g.hide()}}).on("dnd_scroll.vakata.jstree",function(a,b){b&&b.data&&b.data.jstree&&(g.hide(),c=!1,e=!1,b.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(b,h){if(a(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),f&&clearTimeout(f),h&&h.data&&h.data.jstree){g.hide().detach();var i,j,k=[];if(c){for(i=0,j=h.data.nodes.length;j>i;i++)k[i]=h.data.origin?h.data.origin.get_node(h.data.nodes[i]):h.data.nodes[i];c.ins[h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(h.event.metaKey||h.event.ctrlKey))?"copy_node":"move_node"](k,c.par,c.pos,!1,!1,!1,h.data.origin)}else i=a(h.event.target).closest(".jstree"),i.length&&d&&d.error&&"check"===d.error&&(i=i.jstree(!0),i&&i.settings.core.error.call(this,d));e=!1,c=!1}}).on("keyup.jstree keydown.jstree",function(b,h){h=a.vakata.dnd._get(),h&&h.data&&h.data.jstree&&("keyup"===b.type&&27===b.which?(f&&clearTimeout(f),c=!1,d=!1,e=!1,f=!1,g.hide().detach(),a.vakata.dnd._clean()):(h.helper.find(".jstree-copy").first()[h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(b.metaKey||b.ctrlKey))?"show":"hide"](),e&&(e.metaKey=b.metaKey,e.ctrlKey=b.ctrlKey,a.vakata.dnd._trigger("move",e))))})}),function(a){a.vakata.html={div:a("
        "),escape:function(b){return a.vakata.html.div.text(b).html()},strip:function(b){return a.vakata.html.div.empty().append(a.parseHTML(b)).text()}};var c={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1};a.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(c,d,e){e===b&&(e=a.vakata.dnd._get()),e.event=d,a(i).triggerHandler("dnd_"+c+".vakata",e)},_get:function(){return{data:c.data,element:c.element,helper:c.helper}},_clean:function(){c.helper&&c.helper.remove(),c.scroll_i&&(clearInterval(c.scroll_i),c.scroll_i=!1),c={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},n=null,a(i).off("mousemove.vakata.jstree touchmove.vakata.jstree",a.vakata.dnd.drag),a(i).off("mouseup.vakata.jstree touchend.vakata.jstree",a.vakata.dnd.stop)},_scroll:function(b){if(!c.scroll_e||!c.scroll_l&&!c.scroll_t)return c.scroll_i&&(clearInterval(c.scroll_i),c.scroll_i=!1),!1;if(!c.scroll_i)return c.scroll_i=setInterval(a.vakata.dnd._scroll,100),!1;if(b===!0)return!1;var d=c.scroll_e.scrollTop(),e=c.scroll_e.scrollLeft();c.scroll_e.scrollTop(d+c.scroll_t*a.vakata.dnd.settings.scroll_speed),c.scroll_e.scrollLeft(e+c.scroll_l*a.vakata.dnd.settings.scroll_speed),(d!==c.scroll_e.scrollTop()||e!==c.scroll_e.scrollLeft())&&a.vakata.dnd._trigger("scroll",c.scroll_e)},start:function(b,d,e){"touchstart"===b.type&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(b.pageX=b.originalEvent.changedTouches[0].pageX,b.pageY=b.originalEvent.changedTouches[0].pageY,b.target=i.elementFromPoint(b.originalEvent.changedTouches[0].pageX-window.pageXOffset,b.originalEvent.changedTouches[0].pageY-window.pageYOffset)),c.is_drag&&a.vakata.dnd.stop({});try{b.currentTarget.unselectable="on",b.currentTarget.onselectstart=function(){return!1},b.currentTarget.style&&(b.currentTarget.style.touchAction="none",b.currentTarget.style.msTouchAction="none",b.currentTarget.style.MozUserSelect="none")}catch(f){}return c.init_x=b.pageX,c.init_y=b.pageY,c.data=d,c.is_down=!0,c.element=b.currentTarget,c.target=b.target,c.is_touch="touchstart"===b.type,e!==!1&&(c.helper=a("
        ").html(e).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),a(i).on("mousemove.vakata.jstree touchmove.vakata.jstree",a.vakata.dnd.drag),a(i).on("mouseup.vakata.jstree touchend.vakata.jstree",a.vakata.dnd.stop),!1},drag:function(b){if("touchmove"===b.type&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(b.pageX=b.originalEvent.changedTouches[0].pageX,b.pageY=b.originalEvent.changedTouches[0].pageY,b.target=i.elementFromPoint(b.originalEvent.changedTouches[0].pageX-window.pageXOffset,b.originalEvent.changedTouches[0].pageY-window.pageYOffset)),c.is_down){if(!c.is_drag){if(!(Math.abs(b.pageX-c.init_x)>(c.is_touch?a.vakata.dnd.settings.threshold_touch:a.vakata.dnd.settings.threshold)||Math.abs(b.pageY-c.init_y)>(c.is_touch?a.vakata.dnd.settings.threshold_touch:a.vakata.dnd.settings.threshold)))return;c.helper&&(c.helper.appendTo(i.body),c.helper_w=c.helper.outerWidth()),c.is_drag=!0,a(c.target).one("click.vakata",!1),a.vakata.dnd._trigger("start",b)}var d=!1,e=!1,f=!1,g=!1,h=!1,j=!1,k=!1,l=!1,m=!1,n=!1;return c.scroll_t=0,c.scroll_l=0,c.scroll_e=!1,a(a(b.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return/^auto|scroll$/.test(a(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var d=a(this),e=d.offset();return this.scrollHeight>this.offsetHeight&&(e.top+d.height()-b.pageYthis.offsetWidth&&(e.left+d.width()-b.pageXg&&b.pageY-kg&&g-(b.pageY-k)j&&b.pageX-lj&&j-(b.pageX-l)f&&(m=f-50),h&&n+c.helper_w>h&&(n=h-(c.helper_w+2)),c.helper.css({left:n+"px",top:m+"px"})),a.vakata.dnd._trigger("move",b),!1}},stop:function(b){if("touchend"===b.type&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(b.pageX=b.originalEvent.changedTouches[0].pageX,b.pageY=b.originalEvent.changedTouches[0].pageY,b.target=i.elementFromPoint(b.originalEvent.changedTouches[0].pageX-window.pageXOffset,b.originalEvent.changedTouches[0].pageY-window.pageYOffset)),c.is_drag)b.target!==c.target&&a(c.target).off("click.vakata"),a.vakata.dnd._trigger("stop",b);else if("touchend"===b.type&&b.target===c.target){var d=setTimeout(function(){a(b.target).trigger("click")},100);a(b.target).one("click",function(){d&&clearTimeout(d)})}return a.vakata.dnd._clean(),!1}}}(a),a.jstree.defaults.massload=null,a.jstree.plugins.massload=function(b,c){this.init=function(a,b){this._data.massload={},c.init.call(this,a,b)},this._load_nodes=function(b,d,e,f){var g=this.settings.massload,h=[],i=this._model.data,j,k,l;if(!e){for(j=0,k=b.length;k>j;j++)(!i[b[j]]||!i[b[j]].state.loaded&&!i[b[j]].state.failed||f)&&(h.push(b[j]),l=this.get_node(b[j],!0),l&&l.length&&l.addClass("jstree-loading").attr("aria-busy",!0));if(this._data.massload={},h.length){if(a.vakata.is_function(g))return g.call(this,h,function(a){var g,h;if(a)for(g in a)a.hasOwnProperty(g)&&(this._data.massload[g]=a[g]);for(g=0,h=b.length;h>g;g++)l=this.get_node(b[g],!0),l&&l.length&&l.removeClass("jstree-loading").attr("aria-busy",!1);c._load_nodes.call(this,b,d,e,f)}.bind(this));if("object"==typeof g&&g&&g.url)return g=a.extend(!0,{},g),a.vakata.is_function(g.url)&&(g.url=g.url.call(this,h)),a.vakata.is_function(g.data)&&(g.data=g.data.call(this,h)),a.ajax(g).done(function(a,g,h){var i,j;if(a)for(i in a)a.hasOwnProperty(i)&&(this._data.massload[i]=a[i]);for(i=0,j=b.length;j>i;i++)l=this.get_node(b[i],!0),l&&l.length&&l.removeClass("jstree-loading").attr("aria-busy",!1);c._load_nodes.call(this,b,d,e,f)}.bind(this)).fail(function(a){c._load_nodes.call(this,b,d,e,f)}.bind(this))}}return c._load_nodes.call(this,b,d,e,f)},this._load_node=function(b,d){var e=this._data.massload[b.id],f=null,g;return e?(f=this["string"==typeof e?"_append_html_data":"_append_json_data"](b,"string"==typeof e?a(a.parseHTML(e)).filter(function(){return 3!==this.nodeType}):e,function(a){d.call(this,a)}),g=this.get_node(b.id,!0),g&&g.length&&g.removeClass("jstree-loading").attr("aria-busy",!1),delete this._data.massload[b.id],f):c._load_node.call(this,b,d)}},a.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},a.jstree.plugins.search=function(c,d){this.bind=function(){d.bind.call(this),this._data.search.str="",this._data.search.dom=a(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this._data.search.hdn=[],this.element.on("search.jstree",function(b,c){if(this._data.search.som&&c.res.length){var d=this._model.data,e,f,g=[],h,i;for(e=0,f=c.res.length;f>e;e++)if(d[c.res[e]]&&!d[c.res[e]].state.hidden&&(g.push(c.res[e]),g=g.concat(d[c.res[e]].parents),this._data.search.smc))for(h=0,i=d[c.res[e]].children_d.length;i>h;h++)d[d[c.res[e]].children_d[h]]&&!d[d[c.res[e]].children_d[h]].state.hidden&&g.push(d[c.res[e]].children_d[h]);g=a.vakata.array_remove_item(a.vakata.array_unique(g),a.jstree.root),this._data.search.hdn=this.hide_all(!0),this.show_node(g,!0),this.redraw(!0)}}.bind(this)).on("clear_search.jstree",function(a,b){this._data.search.som&&b.res.length&&(this.show_node(this._data.search.hdn,!0),this.redraw(!0))}.bind(this))},this.search=function(c,d,e,f,g,h){if(c===!1||""===a.vakata.trim(c.toString()))return this.clear_search();f=this.get_node(f),f=f&&f.id?f.id:null,c=c.toString();var i=this.settings.search,j=i.ajax?i.ajax:!1,k=this._model.data,l=null,m=[],n=[],o,p;if(this._data.search.res.length&&!g&&this.clear_search(),e===b&&(e=i.show_only_matches),h===b&&(h=i.show_only_matches_children),!d&&j!==!1)return a.vakata.is_function(j)?j.call(this,c,function(b){b&&b.d&&(b=b.d),this._load_nodes(a.vakata.is_array(b)?a.vakata.array_unique(b):[],function(){this.search(c,!0,e,f,g,h)})}.bind(this),f):(j=a.extend({},j),j.data||(j.data={}),j.data.str=c,f&&(j.data.inside=f),this._data.search.lastRequest&&this._data.search.lastRequest.abort(),this._data.search.lastRequest=a.ajax(j).fail(function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(j)},this.settings.core.error.call(this,this._data.core.last_error)}.bind(this)).done(function(b){b&&b.d&&(b=b.d),this._load_nodes(a.vakata.is_array(b)?a.vakata.array_unique(b):[],function(){this.search(c,!0,e,f,g,h)})}.bind(this)),this._data.search.lastRequest);if(g||(this._data.search.str=c,this._data.search.dom=a(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=e,this._data.search.smc=h),l=new a.vakata.search(c,!0,{caseSensitive:i.case_sensitive,fuzzy:i.fuzzy}),a.each(k[f?f:a.jstree.root].children_d,function(a,b){var d=k[b];d.text&&!d.state.hidden&&(!i.search_leaves_only||d.state.loaded&&0===d.children.length)&&(i.search_callback&&i.search_callback.call(this,c,d)||!i.search_callback&&l.search(d.text).isMatch)&&(m.push(b),n=n.concat(d.parents))}),m.length){for(n=a.vakata.array_unique(n),o=0,p=n.length;p>o;o++)n[o]!==a.jstree.root&&k[n[o]]&&this.open_node(n[o],null,0)===!0&&this._data.search.opn.push(n[o]);g?(this._data.search.dom=this._data.search.dom.add(a(this.element[0].querySelectorAll("#"+a.map(m,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #")))),this._data.search.res=a.vakata.array_unique(this._data.search.res.concat(m))):(this._data.search.dom=a(this.element[0].querySelectorAll("#"+a.map(m,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.res=m),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")}this.trigger("search",{nodes:this._data.search.dom,str:c,res:this._data.search.res,show_only_matches:e})},this.clear_search=function(){this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.res.length&&(this._data.search.dom=a(this.element[0].querySelectorAll("#"+a.map(this._data.search.res,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search")),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=a()},this.redraw_node=function(b,c,e,f){if(b=d.redraw_node.apply(this,arguments),b&&-1!==a.inArray(b.id,this._data.search.res)){var g,h,i=null;for(g=0,h=b.childNodes.length;h>g;g++)if(b.childNodes[g]&&b.childNodes[g].className&&-1!==b.childNodes[g].className.indexOf("jstree-anchor")){i=b.childNodes[g];break}i&&(i.className+=" jstree-search")}return b}},function(a){a.vakata.search=function(b,c,d){d=d||{},d=a.extend({},a.vakata.search.defaults,d),d.fuzzy!==!1&&(d.fuzzy=!0),b=d.caseSensitive?b:b.toLowerCase();var e=d.location,f=d.distance,g=d.threshold,h=b.length,i,j,k,l;return h>32&&(d.fuzzy=!1),d.fuzzy&&(i=1<c;c++)a[b.charAt(c)]=0;for(c=0;h>c;c++)a[b.charAt(c)]|=1<c;c++){o=0,p=q;while(p>o)k(c,e+p)<=m?o=p:q=p,p=Math.floor((q-o)/2+o);for(q=p,s=Math.max(1,e-p+1),t=Math.min(e+p,l)+h,u=new Array(t+2),u[t+1]=(1<=s;f--)if(v=j[a.charAt(f-1)],0===c?u[f]=(u[f+1]<<1|1)&v:u[f]=(u[f+1]<<1|1)&v|((r[f+1]|r[f])<<1|1)|r[f+1],u[f]&i&&(w=k(c,f-1),m>=w)){if(m=w,n=f-1,x.push(n),!(n>e))break;s=Math.max(1,2*e-n)}if(k(c+1,e)>m)break;r=u}return{isMatch:n>=0,score:w}},c===!0?{search:l}:l(c)},a.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(a),a.jstree.defaults.sort=function(a,b){return this.get_text(a)>this.get_text(b)?1:-1},a.jstree.plugins.sort=function(a,b){this.bind=function(){b.bind.call(this),this.element.on("model.jstree",function(a,b){this.sort(b.parent,!0)}.bind(this)).on("rename_node.jstree create_node.jstree",function(a,b){this.sort(b.parent||b.node.parent,!1),this.redraw_node(b.parent||b.node.parent,!0)}.bind(this)).on("move_node.jstree copy_node.jstree",function(a,b){this.sort(b.parent,!1),this.redraw_node(b.parent,!0)}.bind(this))},this.sort=function(a,b){var c,d;if(a=this.get_node(a),a&&a.children&&a.children.length&&(a.children.sort(this.settings.sort.bind(this)),b))for(c=0,d=a.children_d.length;d>c;c++)this.sort(a.children_d[c],!1)}};var o=!1;a.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1,preserve_loaded:!1},a.jstree.plugins.state=function(b,c){this.bind=function(){c.bind.call(this);var a=function(){this.element.on(this.settings.state.events,function(){o&&clearTimeout(o),o=setTimeout(function(){this.save_state()}.bind(this),100)}.bind(this)),this.trigger("state_ready")}.bind(this);this.element.on("ready.jstree",function(b,c){this.element.one("restore_state.jstree",a),this.restore_state()||a()}.bind(this))},this.save_state=function(){var b=this.get_state();this.settings.state.preserve_loaded||delete b.core.loaded;var c={state:b,ttl:this.settings.state.ttl,sec:+new Date};a.vakata.storage.set(this.settings.state.key,JSON.stringify(c))},this.restore_state=function(){var b=a.vakata.storage.get(this.settings.state.key);if(b)try{b=JSON.parse(b)}catch(c){return!1}return b&&b.ttl&&b.sec&&+new Date-b.sec>b.ttl?!1:(b&&b.state&&(b=b.state),b&&a.vakata.is_function(this.settings.state.filter)&&(b=this.settings.state.filter.call(this,b)),b?(this.settings.state.preserve_loaded||delete b.core.loaded,this.element.one("set_state.jstree",function(c,d){d.instance.trigger("restore_state",{state:a.extend(!0,{},b)})}),this.set_state(b),!0):!1)},this.clear_state=function(){return a.vakata.storage.del(this.settings.state.key)}},function(a,b){a.vakata.storage={set:function(a,b){return window.localStorage.setItem(a,b)},get:function(a){return window.localStorage.getItem(a)},del:function(a){return window.localStorage.removeItem(a)}}}(a),a.jstree.defaults.types={ +"default":{}},a.jstree.defaults.types[a.jstree.root]={},a.jstree.plugins.types=function(c,d){this.init=function(c,e){var f,g;if(e&&e.types&&e.types["default"])for(f in e.types)if("default"!==f&&f!==a.jstree.root&&e.types.hasOwnProperty(f))for(g in e.types["default"])e.types["default"].hasOwnProperty(g)&&e.types[f][g]===b&&(e.types[f][g]=e.types["default"][g]);d.init.call(this,c,e),this._model.data[a.jstree.root].type=a.jstree.root},this.refresh=function(b,c){d.refresh.call(this,b,c),this._model.data[a.jstree.root].type=a.jstree.root},this.bind=function(){this.element.on("model.jstree",function(c,d){var e=this._model.data,f=d.nodes,g=this.settings.types,h,i,j="default",k;for(h=0,i=f.length;i>h;h++){if(j="default",e[f[h]].original&&e[f[h]].original.type&&g[e[f[h]].original.type]&&(j=e[f[h]].original.type),e[f[h]].data&&e[f[h]].data.jstree&&e[f[h]].data.jstree.type&&g[e[f[h]].data.jstree.type]&&(j=e[f[h]].data.jstree.type),e[f[h]].type=j,e[f[h]].icon===!0&&g[j].icon!==b&&(e[f[h]].icon=g[j].icon),g[j].li_attr!==b&&"object"==typeof g[j].li_attr)for(k in g[j].li_attr)if(g[j].li_attr.hasOwnProperty(k)){if("id"===k)continue;e[f[h]].li_attr[k]===b?e[f[h]].li_attr[k]=g[j].li_attr[k]:"class"===k&&(e[f[h]].li_attr["class"]=g[j].li_attr["class"]+" "+e[f[h]].li_attr["class"])}if(g[j].a_attr!==b&&"object"==typeof g[j].a_attr)for(k in g[j].a_attr)if(g[j].a_attr.hasOwnProperty(k)){if("id"===k)continue;e[f[h]].a_attr[k]===b?e[f[h]].a_attr[k]=g[j].a_attr[k]:"href"===k&&"#"===e[f[h]].a_attr[k]?e[f[h]].a_attr.href=g[j].a_attr.href:"class"===k&&(e[f[h]].a_attr["class"]=g[j].a_attr["class"]+" "+e[f[h]].a_attr["class"])}}e[a.jstree.root].type=a.jstree.root}.bind(this)),d.bind.call(this)},this.get_json=function(b,c,e){var f,g,h=this._model.data,i=c?a.extend(!0,{},c,{no_id:!1}):{},j=d.get_json.call(this,b,i,e);if(j===!1)return!1;if(a.vakata.is_array(j))for(f=0,g=j.length;g>f;f++)j[f].type=j[f].id&&h[j[f].id]&&h[j[f].id].type?h[j[f].id].type:"default",c&&c.no_id&&(delete j[f].id,j[f].li_attr&&j[f].li_attr.id&&delete j[f].li_attr.id,j[f].a_attr&&j[f].a_attr.id&&delete j[f].a_attr.id);else j.type=j.id&&h[j.id]&&h[j.id].type?h[j.id].type:"default",c&&c.no_id&&(j=this._delete_ids(j));return j},this._delete_ids=function(b){if(a.vakata.is_array(b)){for(var c=0,d=b.length;d>c;c++)b[c]=this._delete_ids(b[c]);return b}return delete b.id,b.li_attr&&b.li_attr.id&&delete b.li_attr.id,b.a_attr&&b.a_attr.id&&delete b.a_attr.id,b.children&&a.vakata.is_array(b.children)&&(b.children=this._delete_ids(b.children)),b},this.check=function(c,e,f,g,h){if(d.check.call(this,c,e,f,g,h)===!1)return!1;e=e&&e.id?e:this.get_node(e),f=f&&f.id?f:this.get_node(f);var i=e&&e.id?h&&h.origin?h.origin:a.jstree.reference(e.id):null,j,k,l,m;switch(i=i&&i._model&&i._model.data?i._model.data:null,c){case"create_node":case"move_node":case"copy_node":if("move_node"!==c||-1===a.inArray(e.id,f.children)){if(j=this.get_rules(f),j.max_children!==b&&-1!==j.max_children&&j.max_children===f.children.length)return this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;if(j.valid_children!==b&&-1!==j.valid_children&&-1===a.inArray(e.type||"default",j.valid_children))return this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;if(i&&e.children_d&&e.parents){for(k=0,l=0,m=e.children_d.length;m>l;l++)k=Math.max(k,i[e.children_d[l]].parents.length);k=k-e.parents.length+1}(0>=k||k===b)&&(k=1);do{if(j.max_depth!==b&&-1!==j.max_depth&&j.max_depthg;g++)this.set_type(c[g],d);return!0}if(f=this.settings.types,c=this.get_node(c),!f[d]||!c)return!1;if(l=this.get_node(c,!0),l&&l.length&&(m=l.children(".jstree-anchor")),i=c.type,j=this.get_icon(c),c.type=d,(j===!0||!f[i]||f[i].icon!==b&&j===f[i].icon)&&this.set_icon(c,f[d].icon!==b?f[d].icon:!0),f[i]&&f[i].li_attr!==b&&"object"==typeof f[i].li_attr)for(k in f[i].li_attr)if(f[i].li_attr.hasOwnProperty(k)){if("id"===k)continue;"class"===k?(e[c.id].li_attr["class"]=(e[c.id].li_attr["class"]||"").replace(f[i].li_attr[k],""),l&&l.removeClass(f[i].li_attr[k])):e[c.id].li_attr[k]===f[i].li_attr[k]&&(e[c.id].li_attr[k]=null,l&&l.removeAttr(k))}if(f[i]&&f[i].a_attr!==b&&"object"==typeof f[i].a_attr)for(k in f[i].a_attr)if(f[i].a_attr.hasOwnProperty(k)){if("id"===k)continue;"class"===k?(e[c.id].a_attr["class"]=(e[c.id].a_attr["class"]||"").replace(f[i].a_attr[k],""),m&&m.removeClass(f[i].a_attr[k])):e[c.id].a_attr[k]===f[i].a_attr[k]&&("href"===k?(e[c.id].a_attr[k]="#",m&&m.attr("href","#")):(delete e[c.id].a_attr[k],m&&m.removeAttr(k)))}if(f[d].li_attr!==b&&"object"==typeof f[d].li_attr)for(k in f[d].li_attr)if(f[d].li_attr.hasOwnProperty(k)){if("id"===k)continue;e[c.id].li_attr[k]===b?(e[c.id].li_attr[k]=f[d].li_attr[k],l&&("class"===k?l.addClass(f[d].li_attr[k]):l.attr(k,f[d].li_attr[k]))):"class"===k&&(e[c.id].li_attr["class"]=f[d].li_attr[k]+" "+e[c.id].li_attr["class"],l&&l.addClass(f[d].li_attr[k]))}if(f[d].a_attr!==b&&"object"==typeof f[d].a_attr)for(k in f[d].a_attr)if(f[d].a_attr.hasOwnProperty(k)){if("id"===k)continue;e[c.id].a_attr[k]===b?(e[c.id].a_attr[k]=f[d].a_attr[k],m&&("class"===k?m.addClass(f[d].a_attr[k]):m.attr(k,f[d].a_attr[k]))):"href"===k&&"#"===e[c.id].a_attr[k]?(e[c.id].a_attr.href=f[d].a_attr.href,m&&m.attr("href",f[d].a_attr.href)):"class"===k&&(e[c.id].a_attr["class"]=f[d].a_attr["class"]+" "+e[c.id].a_attr["class"],m&&m.addClass(f[d].a_attr[k]))}return!0}},a.jstree.defaults.unique={case_sensitive:!1,trim_whitespace:!1,duplicate:function(a,b){return a+" ("+b+")"}},a.jstree.plugins.unique=function(c,d){this.check=function(b,c,e,f,g){if(d.check.call(this,b,c,e,f,g)===!1)return!1;if(c=c&&c.id?c:this.get_node(c),e=e&&e.id?e:this.get_node(e),!e||!e.children)return!0;var h="rename_node"===b?f:c.text,i=[],j=this.settings.unique.case_sensitive,k=this.settings.unique.trim_whitespace,l=this._model.data,m,n,o;for(m=0,n=e.children.length;n>m;m++)o=l[e.children[m]].text,j||(o=o.toLowerCase()),k&&(o=o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),i.push(o);switch(j||(h=h.toLowerCase()),k&&(h=h.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),b){case"delete_node":return!0;case"rename_node":return o=c.text||"",j||(o=o.toLowerCase()),k&&(o=o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),m=-1===a.inArray(h,i)||c.text&&o===h,m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m;case"create_node":return m=-1===a.inArray(h,i),m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m;case"copy_node":return m=-1===a.inArray(h,i),m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m;case"move_node":return m=c.parent===e.id&&(!g||!g.is_multi)||-1===a.inArray(h,i),m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m}return!0},this.create_node=function(c,e,f,g,h){if(!e||e.text===b){if(null===c&&(c=a.jstree.root),c=this.get_node(c),!c)return d.create_node.call(this,c,e,f,g,h);if(f=f===b?"last":f,!f.toString().match(/^(before|after)$/)&&!h&&!this.is_loaded(c))return d.create_node.call(this,c,e,f,g,h);e||(e={});var i,j,k,l,m,n=this._model.data,o=this.settings.unique.case_sensitive,p=this.settings.unique.trim_whitespace,q=this.settings.unique.duplicate,r;for(j=i=this.get_string("New node"),k=[],l=0,m=c.children.length;m>l;l++)r=n[c.children[l]].text,o||(r=r.toLowerCase()),p&&(r=r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),k.push(r);l=1,r=j,o||(r=r.toLowerCase()),p&&(r=r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));while(-1!==a.inArray(r,k))j=q.call(this,i,++l).toString(),r=j,o||(r=r.toLowerCase()),p&&(r=r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));e.text=j}return d.create_node.call(this,c,e,f,g,h)}};var p=i.createElement("DIV");if(p.setAttribute("unselectable","on"),p.setAttribute("role","presentation"),p.className="jstree-wholerow",p.innerHTML=" ",a.jstree.plugins.wholerow=function(b,c){this.bind=function(){c.bind.call(this),this.element.on("ready.jstree set_state.jstree",function(){this.hide_dots()}.bind(this)).on("init.jstree loading.jstree ready.jstree",function(){this.get_container_ul().addClass("jstree-wholerow-ul")}.bind(this)).on("deselect_all.jstree",function(a,b){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")}.bind(this)).on("changed.jstree",function(a,b){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");var c=!1,d,e;for(d=0,e=b.selected.length;e>d;d++)c=this.get_node(b.selected[d],!0),c&&c.length&&c.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}.bind(this)).on("open_node.jstree",function(a,b){this.get_node(b.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}.bind(this)).on("hover_node.jstree dehover_node.jstree",function(a,b){"hover_node"===a.type&&this.is_disabled(b.node)||this.get_node(b.node,!0).children(".jstree-wholerow")["hover_node"===a.type?"addClass":"removeClass"]("jstree-wholerow-hovered")}.bind(this)).on("contextmenu.jstree",".jstree-wholerow",function(b){if(this._data.contextmenu){b.preventDefault();var c=a.Event("contextmenu",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey,pageX:b.pageX,pageY:b.pageY});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c)}}.bind(this)).on("click.jstree",".jstree-wholerow",function(b){b.stopImmediatePropagation();var c=a.Event("click",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).trigger("focus")}).on("dblclick.jstree",".jstree-wholerow",function(b){b.stopImmediatePropagation();var c=a.Event("dblclick",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).trigger("focus")}).on("click.jstree",".jstree-leaf > .jstree-ocl",function(b){b.stopImmediatePropagation();var c=a.Event("click",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).trigger("focus")}.bind(this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",function(a){return a.stopImmediatePropagation(),this.is_disabled(a.currentTarget)||this.hover_node(a.currentTarget),!1}.bind(this)).on("mouseleave.jstree",".jstree-node",function(a){this.dehover_node(a.currentTarget)}.bind(this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),c.teardown.call(this)},this.redraw_node=function(b,d,e,f){if(b=c.redraw_node.apply(this,arguments)){var g=p.cloneNode(!0);-1!==a.inArray(b.id,this._data.core.selected)&&(g.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===b.id&&(g.className+=" jstree-wholerow-hovered"),b.insertBefore(g,b.childNodes[0])}return b}},window.customElements&&Object&&Object.create){var q=Object.create(HTMLElement.prototype);q.createdCallback=function(){var b={core:{},plugins:[]},c;for(c in a.jstree.plugins)a.jstree.plugins.hasOwnProperty(c)&&this.attributes[c]&&(b.plugins.push(c),this.getAttribute(c)&&JSON.parse(this.getAttribute(c))&&(b[c]=JSON.parse(this.getAttribute(c))));for(c in a.jstree.defaults.core)a.jstree.defaults.core.hasOwnProperty(c)&&this.attributes[c]&&(b.core[c]=JSON.parse(this.getAttribute(c))||this.getAttribute(c));a(this).jstree(b)};try{window.customElements.define("vakata-jstree",function(){},{prototype:q})}catch(r){}}}}); \ No newline at end of file diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default-dark/32px.png b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default-dark/32px.png new file mode 100644 index 0000000000000000000000000000000000000000..60395729ef6cfda914b211d5a45c9d2c083b3175 GIT binary patch literal 1525 zcmVx=)z#Iou&|Pnl0QE`#>U2ri;Ey2AZTc4hK7d2!^8jo|LExGnVFgL^78xp`|9fI z{{H^%?(X*X_U!EJ`1ttr^z`-h_21v$+uPgY%*@Ql$jFb6k9c@^bbCf0 z0000UbW%=J05J?b7$qwPPhmTy5d)-?xp^Mm+qHy5%#b-oX_@#U>G}Ww1nNmdK~#9! z?VAfz;xH72Nz$||!ongb>TW_>N?RW4>i_?5dkfnECVkjIX4-l`ADw#akseRQ#%u4! zEU(s^P17GAf(=CKfepk4b_;A^Q}G;^oNyiQraC}50XXf|q%93}?!-BF&P{cI9|d>R z(FVGrPfqlOYpxI20Q7OqRZ3Za*8Hyzun*QhRscKzVy}UKQ+R&yMyVt&ZQ$iguK&kL&-MSz z(+T9N?OlF^`0GuglFiyDd3xXX<9HqWjOHGniWzb2n>El+VYDber6MUKRTiK%f8vwN zJzXbBB=_6Bj1rQk4_J~Yl`xur{91)UMyS?i4U9LNxbO;d0zkqW*ERe8WKAyjbe)89 zyL;VjWk_;$%EB;YwBY#k;0&-ZYoJo9T5Nse)7i=Iluv=gQ8_Mn10~?Bk2HKeq{B8}j zJ0EEK4;Q**-mr52?0Eb0fwme5_WX+ZJ`4V~<^%0O2cp=Ui0TBF75<+U{vSQS{(PXV z279k`~+7i1|2l;w?7|f0Y_AvV4NtG z%~w^91nT-n=3k(HYX0`-11&YsPbm)YIKQV1I%wc;dp^(xl%*4Vh2H!yzy~&Jm#?G5lt`K_QK_m1`>Y%G9zeYkF!fS_S+g@ z37$I-rIf+!v7mpyXPYqEFQQPbCq_>qYZV>=hqeZ|EK88j11V?EG+!RxDHTRfYz_%3 zZW5phW<=s1d=rj*ZNW7NPt!TO<+DiD)sH(K{g+ZH(T_ z45I`yck;d8m+#)YzIFe)d!2Qj{ha+fd#(N3&pzio=asRc7B$6R6aWB#T1Q*m1phn) z00@xeM0l-2m@XLrAj~(`H`BnsN=r*;XJ@ait*x)GZ)|LAZfMU9v-4lC^Q;S%y*(adW@ct+XlP_)WNd8w@Zm!f6BAQYQ~coH z6Y*d?Mo&*qUthnpwDiM=4@E^q`2O|l*R!*;^Yily3k!>ji%UyO%gf6vD=UA9#j}d1 z6wfD~Ogxi+)A%=se+b00htI{AFJJJU%gV~i%gZY&Dk>{0tE#H1tE+2jYHDk1zkdB% zS6BD#+qe4q`i6#v#>U2`rl#iR=I`IXx3siCAduG9*0#2`_V#ut6bggEIyyQ!J3G6& zy1Ki&dwP0$dwcu(`uh9(2L=WP2M33ShK7fSM@B|QM@PrT#(w z$*HNS>FH@W96mEMgO6@*Ztm{@5eNi6MkEsXC(PB=)jyH`e|}^@qa4+2Ft<228qqUY^)|F>TY(tJ|ur<_zu6DxmLRe~OiLkgVYp*qdOT5z9yFr4Y zhlPV}V|Jc83#p%5CKaw?pXr4f;*RqsHjejTK^v(v*S1m~Czsl1q#rYU?wPhS_HSkI7 z9<|LA8U=D3j4PvMYwKJ7CTZJhq%{m2eVK}OiK6juJYRwy*;%K4Sm1B z{t3Rjq#^6F_8puu?C7VCB8gbzEjH$TQd|dkTiIRPsTczvW$yvO`JdMv%d>UY&4LWM$Pnq1MQ&R2xb&;!`;8M4Rn9E?azP8UHdV`eD742=vGS`>FluvU(0ET|bddrv=WR7$oz1T6 zzwhFIlWwp6;G$IfzR;vitlBh16jz+z6v9jQd)l?Gno;qyFYEWw^Vep6Q8L`HGkxi6 z2JN%HsMZ!TFUg9RQg964D#=kgTz^)a6RqF%rn-oZP11J?rl*_G5KGQ;JDz6N;jCPM zwxabXnutN_WZafuFv0;eg~yw@&(%g zYrT!4n70OdZ`p_&T*LRN)+$`QfY-~0q4C}`7*qY>ln16y%{$=4^i2d zav(n4(~PI8fxpa`?vb;S<{IWV_|Tf#aW;K*0P$(8IT|2oST3qHmJlZ1x@RcU>ei0t zkM|z=Zg`#ac1~uJRqZj&(@#ENq4#To2Pj_#>(y&4Pf1tf40Suqwo|6}Y&$JHh^D2Z zj$*SYb;u;*LVZdfk0ZQDrJcRlA zRJ?l&tW{-gQ+rt*p?aCgC?h51COhiQL+6CN+OV|mPPkIhBwpll>duCzV1m?3qh3OC@;*{i4gez)Ib!G-#U7Vf9D zyhQBOCzd%p;+B2LCD-?jr{N233kZj>bXpP!JR9Xnhx&NLa^($LiNCHJ!?JMOo|^kJ zTf6O$u^>{5>tF~h6K@r|6Oia*t{vLs$EJSCjfz_GB6=7^M{$O)M6_VnIb`wiGi|Lc zr7;bT>AK=7=kQT2ag~DOnNQ)Y<2849Y7d;Q-K5t0$dEi-bEm^XS#zVamhqG$Zbfik z85LjDG^#HWwj5?U2!D0aZf6sp*@WvSk{Gk?Rp_xin2EZ|zcSu*B)Qi=wZPBS!k12a zTZ2GJ26y};gIJxI=j3zm6PRwZ+m~$${?8qxM#HLp5WY%g`bY$14MVMPng_INEjnH5 zK6kfY-g{gF&vBP{N2dbSgc}4s!)~$M_>n_Q`Rybnpqde3Do6LA?;pb--4LmC6iFlD zt1GXKg_;hjWF2Gv!uu%69KeX)2GH|90v@iItAX~}DzszRej8{qIS_f+1gVvd-ZsQp zdY<1Fs)fommh~UDP=|Gc()U!7M;}zHQ#(*J7W%O)c!K~f;~_*GI@@tn%yW=51E zg7?Y57!O1aw~9Sz82C_dHo$%RbJZC}7k4@0e*&cC&Sr`%755*)8q-fN{ia73*l=vJ>hU#cET)a;ZS21rDkPQMy{+q zKi}*MysQqjP?7eR zZ`~MP9cesZBn{+$K(P-d%`L(#DS@u;uHB9^=AOvX9lqQ$T*7iQY44u_;-)_xLFb0q zszxikW#lcnUzTvB8#_KIT`jwkwaUh z>hXSCA$~pO!9*F=pC7&33gkdYNi(g_n6#y!JRPe)KKk6K6kT$C;Mx&ea){Wz00Tf8`D|`=KvM@^$?75k$O{uXDMZONuy6-pS9jjsIr{TG>EsgiUsFT9S7@=zao_c{8@_?#ry`m=hFVhavGM$^9Po*jia;}1V z4;V&)3bsZ}N>~IIStgYWd&B_=g<&2$$r5!z=UC>mm>*@pp`-dKs9Dx+Kz3K!Vq7yCqP`ufHt16kF32Eu3>c>3LvLTv{ob$jTI zHO!Uam}5Vmm6%Qv;UNi)Jx?h>lWcDwcS2Ry!IzP(;5X#L5J|sIsHs=j64%L+PV5qg zw|BKnunZECLNuB_LR1#7eW#@qf8XbUfKhWa-*V(=5SdE=r!R`1Y#Q&;25 zZw={!KJvz~jd|%+YyMI93BY#HJnok!u^w}M*e|ETR=wi#-5-N0BL|14A7IAz_aJRqB zed{N>+j`pjQSxQ0nZ;0+g6Xku7RuCK5D65v7S3!&uHg)`hTQs|bH2OrIBTNc=V@?h zhgRUt1!d6!ppYU2D4xyl^0e-rxZ|zQrUHqGuVr8fiBFUOd9Ss1$c`DF4{yxIb%lzp zcxqi9bz}Q%Zxjqt?!?OZPHi8&OO4W-RH^5tlj_VW$hNEZ39RgL30zV}N9198gq+RR zfn^!4{pwv*e!?(PvCb3I4@iy9jJWttT-CNPaFh9I6@!+EB zOF$q!_?WJbV5*;9g-T%?tw~e0yP};5!p415fl2}SIhD3I4p^SY$XG@HX{vrvPwNURn}FkOksJO6HOV2{Mf^I`-Zo$G7cKcarafXi4PYS3I+ zW?gIpeN9W)AI?N>C2S^Y(vVn+f`QJfM}jV9U%v+AJm+gP-y4+$twb-O9Twt^xvEwh zK5Q56A%Bs<@X-(g`@J5Ei={o&nZRSlMKCKvMCICF0Ls*QFNlZHqp zotNB44kS{jFRSeg0EMHcX4COdw1c;5QwDB;SWen)ZnZ*X1az+0a=aK3?d1IeirQElA~rwBaHtQkD%IALvOp3=bjKyoK*6V@Z2yAn$qqJ~jTY9uhh@!_I!4c}e1V z+7y1n`nw@@h=U7{#Wu;4h2U#;XHxC-2(rAOM!$sulJMcs3h1LJw(a|!%9;4R$K?aG zG~g7AF25v>G?w4l@N;g`}4(Cg= zm`l>@rrb@{DQ6m5CfyhNyu=IH-m<;FI#G6K>y5t69swsq2(KqS^M||eceYu-jE&@!Bf*j8mrz3=&~7Z>&7eqX2B|0G$|Hw-LuZls_DDI+CV{MO znj!gv6i$7%l`K?^Lric~bB<^YTPOLc=XjSJRUBW*^b4La0a|5VQFSVJo9iU}QzEM1 z1EXFBC7JYhny14I{g0*X9sM*h1A3nO@W)*gLz5$0CdsA6^4{1BT+cP2(vQY&v~wO* zN+k%lB&)GQUdlb#Hm$^jDy5m!DX9 zC6E{id$;$Pa(NF4XB_G)L2T(Jd$w-U@aICJ zEdtK;FHk(Do?Hn5!Gc1$1VD;JE3Oy#tAdeItqYT(=dwwB6#>i^NsM4e315qnrnEV0 zt0u>4!~$n`WboA^x&YMv5hRhbYi=Jy_Tu%yT|_`_wVX?weEqK6g1^t`yq0%p7Xdgp zLZqZ6H}vA*h&5e~+$R8pdER*Q#p$nwZqDU<5IY!VVj%~7$KLU}T^9`863JfDVqPn8 zuusrM5U2>F0EE45d)WU2-t$l{igc#e3*0=j?kuFG#!g`yQa>_$UT?y&T#R%UX?WcAvSnVL??K$nN1omq zZl@9U2!sI5(N?*df5g@{0izm$o>EGiaLl{(7aCog%f+3BriS-;dXlbAGNWbM&yShJ z-N>?PMaWQYas~>48vQ|bBycS&)z~SXB@; zGf)9+P4RH&kvjLiBCL_7W87|Vv^gI4^xBW?`>FA4%gglhlx;d9Pmp5@I@T;ipFC9+ zQtrEQ)ZQgk{9v<1Y5T^5m?{?g#k7up#A|8#3zFJ z?tXLF4>>3uTM}QYz+MZ{)H@rI%(lg{JDZ+PCEk!1nh7>yT`|tD>Z9))DG3ke7Zxb+ zHkm3~U1y7xs$Y2*S~4i{Gd#tFd|%sKMAUz_ExNEkh1aW|E?Vdl)zW(sz}c#Mi6wEs zElUdS+thvv{_WTDv&LX!(xMuqa`=a~LG*A*X)z`2?Wuwdruyyf|a zsSo{}CT)bv1FGQ7H92=8Y)2~!81o*`=jtkd^<3l``GdsYmp2>sI=+4zJ11lxzlgh6RslrzUWOj#?QBaz!MO8j2NL_b z#e=ZnoR)VL@z~*cR{cNwZR#Erg3+`OQrK&vdZDp|lLyq5<(>fZ4>Q!ovQU3+` C_#XrS literal 0 HcmV?d00001 diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default-dark/style.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default-dark/style.css new file mode 100644 index 00000000..d255ca38 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default-dark/style.css @@ -0,0 +1,1150 @@ +/* jsTree default dark theme */ +.jstree-node, +.jstree-children, +.jstree-container-ul { + display: block; + margin: 0; + padding: 0; + list-style-type: none; + list-style-image: none; +} +.jstree-node { + white-space: nowrap; +} +.jstree-anchor { + display: inline-block; + color: black; + white-space: nowrap; + padding: 0 4px 0 1px; + margin: 0; + vertical-align: top; +} +.jstree-anchor:focus { + outline: 0; +} +.jstree-anchor, +.jstree-anchor:link, +.jstree-anchor:visited, +.jstree-anchor:hover, +.jstree-anchor:active { + text-decoration: none; + color: inherit; +} +.jstree-icon { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0; + vertical-align: top; + text-align: center; +} +.jstree-icon:empty { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0; + vertical-align: top; + text-align: center; +} +.jstree-ocl { + cursor: pointer; +} +.jstree-leaf > .jstree-ocl { + cursor: default; +} +.jstree .jstree-open > .jstree-children { + display: block; +} +.jstree .jstree-closed > .jstree-children, +.jstree .jstree-leaf > .jstree-children { + display: none; +} +.jstree-anchor > .jstree-themeicon { + margin-right: 2px; +} +.jstree-no-icons .jstree-themeicon, +.jstree-anchor > .jstree-themeicon-hidden { + display: none; +} +.jstree-hidden, +.jstree-node.jstree-hidden { + display: none; +} +.jstree-rtl .jstree-anchor { + padding: 0 1px 0 4px; +} +.jstree-rtl .jstree-anchor > .jstree-themeicon { + margin-left: 2px; + margin-right: 0; +} +.jstree-rtl .jstree-node { + margin-left: 0; +} +.jstree-rtl .jstree-container-ul > .jstree-node { + margin-right: 0; +} +.jstree-wholerow-ul { + position: relative; + display: inline-block; + min-width: 100%; +} +.jstree-wholerow-ul .jstree-leaf > .jstree-ocl { + cursor: pointer; +} +.jstree-wholerow-ul .jstree-anchor, +.jstree-wholerow-ul .jstree-icon { + position: relative; +} +.jstree-wholerow-ul .jstree-wholerow { + width: 100%; + cursor: pointer; + position: absolute; + left: 0; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.jstree-contextmenu .jstree-anchor { + -webkit-user-select: none; + /* disable selection/Copy of UIWebView */ + -webkit-touch-callout: none; + /* disable the IOS popup when long-press on a link */ + user-select: none; +} +.vakata-context { + display: none; +} +.vakata-context, +.vakata-context ul { + margin: 0; + padding: 2px; + position: absolute; + background: #f5f5f5; + border: 1px solid #979797; + box-shadow: 2px 2px 2px #999999; +} +.vakata-context ul { + list-style: none; + left: 100%; + margin-top: -2.7em; + margin-left: -4px; +} +.vakata-context .vakata-context-right ul { + left: auto; + right: 100%; + margin-left: auto; + margin-right: -4px; +} +.vakata-context li { + list-style: none; +} +.vakata-context li > a { + display: block; + padding: 0 2em 0 2em; + text-decoration: none; + width: auto; + color: black; + white-space: nowrap; + line-height: 2.4em; + text-shadow: 1px 1px 0 white; + border-radius: 1px; +} +.vakata-context li > a:hover { + position: relative; + background-color: #e8eff7; + box-shadow: 0 0 2px #0a6aa1; +} +.vakata-context li > a.vakata-context-parent { + background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw=="); + background-position: right center; + background-repeat: no-repeat; +} +.vakata-context li > a:focus { + outline: 0; +} +.vakata-context .vakata-context-no-icons { + margin-left: 0; +} +.vakata-context .vakata-context-hover > a { + position: relative; + background-color: #e8eff7; + box-shadow: 0 0 2px #0a6aa1; +} +.vakata-context .vakata-context-separator > a, +.vakata-context .vakata-context-separator > a:hover { + background: white; + border: 0; + border-top: 1px solid #e2e3e3; + height: 1px; + min-height: 1px; + max-height: 1px; + padding: 0; + margin: 0 0 0 2.4em; + border-left: 1px solid #e0e0e0; + text-shadow: 0 0 0 transparent; + box-shadow: 0 0 0 transparent; + border-radius: 0; +} +.vakata-context .vakata-contextmenu-disabled a, +.vakata-context .vakata-contextmenu-disabled a:hover { + color: silver; + background-color: transparent; + border: 0; + box-shadow: 0 0 0; +} +.vakata-context .vakata-contextmenu-disabled > a > i { + filter: grayscale(100%); +} +.vakata-context li > a > i { + text-decoration: none; + display: inline-block; + width: 2.4em; + height: 2.4em; + background: transparent; + margin: 0 0 0 -2em; + vertical-align: top; + text-align: center; + line-height: 2.4em; +} +.vakata-context li > a > i:empty { + width: 2.4em; + line-height: 2.4em; +} +.vakata-context li > a .vakata-contextmenu-sep { + display: inline-block; + width: 1px; + height: 2.4em; + background: white; + margin: 0 0.5em 0 0; + border-left: 1px solid #e2e3e3; +} +.vakata-context .vakata-contextmenu-shortcut { + font-size: 0.8em; + color: silver; + opacity: 0.5; + display: none; +} +.vakata-context-rtl ul { + left: auto; + right: 100%; + margin-left: auto; + margin-right: -4px; +} +.vakata-context-rtl li > a.vakata-context-parent { + background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7"); + background-position: left center; + background-repeat: no-repeat; +} +.vakata-context-rtl .vakata-context-separator > a { + margin: 0 2.4em 0 0; + border-left: 0; + border-right: 1px solid #e2e3e3; +} +.vakata-context-rtl .vakata-context-left ul { + right: auto; + left: 100%; + margin-left: -4px; + margin-right: auto; +} +.vakata-context-rtl li > a > i { + margin: 0 -2em 0 0; +} +.vakata-context-rtl li > a .vakata-contextmenu-sep { + margin: 0 0 0 0.5em; + border-left-color: white; + background: #e2e3e3; +} +#jstree-marker { + position: absolute; + top: 0; + left: 0; + margin: -5px 0 0 0; + padding: 0; + border-right: 0; + border-top: 5px solid transparent; + border-bottom: 5px solid transparent; + border-left: 5px solid; + width: 0; + height: 0; + font-size: 0; + line-height: 0; +} +#jstree-dnd { + line-height: 16px; + margin: 0; + padding: 4px; +} +#jstree-dnd .jstree-icon, +#jstree-dnd .jstree-copy { + display: inline-block; + text-decoration: none; + margin: 0 2px 0 0; + padding: 0; + width: 16px; + height: 16px; +} +#jstree-dnd .jstree-ok { + background: green; +} +#jstree-dnd .jstree-er { + background: red; +} +#jstree-dnd .jstree-copy { + margin: 0 2px 0 2px; +} +.jstree-default-dark .jstree-node, +.jstree-default-dark .jstree-icon { + background-repeat: no-repeat; + background-color: transparent; +} +.jstree-default-dark .jstree-anchor, +.jstree-default-dark .jstree-animated, +.jstree-default-dark .jstree-wholerow { + transition: background-color 0.15s, box-shadow 0.15s; +} +.jstree-default-dark .jstree-hovered { + background: #555; + border-radius: 2px; + box-shadow: inset 0 0 1px #555; +} +.jstree-default-dark .jstree-context { + background: #555; + border-radius: 2px; + box-shadow: inset 0 0 1px #555; +} +.jstree-default-dark .jstree-clicked { + background: #5fa2db; + border-radius: 2px; + box-shadow: inset 0 0 1px #666666; +} +.jstree-default-dark .jstree-no-icons .jstree-anchor > .jstree-themeicon { + display: none; +} +.jstree-default-dark .jstree-disabled { + background: transparent; + color: #666666; +} +.jstree-default-dark .jstree-disabled.jstree-hovered { + background: transparent; + box-shadow: none; +} +.jstree-default-dark .jstree-disabled.jstree-clicked { + background: #333333; +} +.jstree-default-dark .jstree-disabled > .jstree-icon { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default-dark .jstree-search { + font-style: italic; + color: #ffffff; + font-weight: bold; +} +.jstree-default-dark .jstree-no-checkboxes .jstree-checkbox { + display: none !important; +} +.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked { + background: transparent; + box-shadow: none; +} +.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered { + background: #555; +} +.jstree-default-dark.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked { + background: transparent; +} +.jstree-default-dark.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered { + background: #555; +} +.jstree-default-dark > .jstree-striped { + min-width: 100%; + display: inline-block; + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat; +} +.jstree-default-dark > .jstree-wholerow-ul .jstree-hovered, +.jstree-default-dark > .jstree-wholerow-ul .jstree-clicked { + background: transparent; + box-shadow: none; + border-radius: 0; +} +.jstree-default-dark .jstree-wholerow { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +.jstree-default-dark .jstree-wholerow-hovered { + background: #555; +} +.jstree-default-dark .jstree-wholerow-clicked { + background: #5fa2db; + background: -webkit-linear-gradient(top, #5fa2db 0%, #5fa2db 100%); + background: linear-gradient(to bottom, #5fa2db 0%, #5fa2db 100%); +} +.jstree-default-dark .jstree-node { + min-height: 24px; + line-height: 24px; + margin-left: 24px; + min-width: 24px; +} +.jstree-default-dark .jstree-anchor { + line-height: 24px; + height: 24px; +} +.jstree-default-dark .jstree-icon { + width: 24px; + height: 24px; + line-height: 24px; +} +.jstree-default-dark .jstree-icon:empty { + width: 24px; + height: 24px; + line-height: 24px; +} +.jstree-default-dark.jstree-rtl .jstree-node { + margin-right: 24px; +} +.jstree-default-dark .jstree-wholerow { + height: 24px; +} +.jstree-default-dark .jstree-node, +.jstree-default-dark .jstree-icon { + background-image: url("32px.png"); +} +.jstree-default-dark .jstree-node { + background-position: -292px -4px; + background-repeat: repeat-y; +} +.jstree-default-dark .jstree-last { + background: transparent; +} +.jstree-default-dark .jstree-open > .jstree-ocl { + background-position: -132px -4px; +} +.jstree-default-dark .jstree-closed > .jstree-ocl { + background-position: -100px -4px; +} +.jstree-default-dark .jstree-leaf > .jstree-ocl { + background-position: -68px -4px; +} +.jstree-default-dark .jstree-themeicon { + background-position: -260px -4px; +} +.jstree-default-dark > .jstree-no-dots .jstree-node, +.jstree-default-dark > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-dark > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -36px -4px; +} +.jstree-default-dark > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -4px -4px; +} +.jstree-default-dark .jstree-disabled { + background: transparent; +} +.jstree-default-dark .jstree-disabled.jstree-hovered { + background: transparent; +} +.jstree-default-dark .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default-dark .jstree-checkbox { + background-position: -164px -4px; +} +.jstree-default-dark .jstree-checkbox:hover { + background-position: -164px -36px; +} +.jstree-default-dark.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, +.jstree-default-dark .jstree-checked > .jstree-checkbox { + background-position: -228px -4px; +} +.jstree-default-dark.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, +.jstree-default-dark .jstree-checked > .jstree-checkbox:hover { + background-position: -228px -36px; +} +.jstree-default-dark .jstree-anchor > .jstree-undetermined { + background-position: -196px -4px; +} +.jstree-default-dark .jstree-anchor > .jstree-undetermined:hover { + background-position: -196px -36px; +} +.jstree-default-dark .jstree-checkbox-disabled { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default-dark > .jstree-striped { + background-size: auto 48px; +} +.jstree-default-dark.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); + background-position: 100% 1px; + background-repeat: repeat-y; +} +.jstree-default-dark.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default-dark.jstree-rtl .jstree-open > .jstree-ocl { + background-position: -132px -36px; +} +.jstree-default-dark.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -100px -36px; +} +.jstree-default-dark.jstree-rtl .jstree-leaf > .jstree-ocl { + background-position: -68px -36px; +} +.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-node, +.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -36px -36px; +} +.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -4px -36px; +} +.jstree-default-dark .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; +} +.jstree-default-dark > .jstree-container-ul .jstree-loading > .jstree-ocl { + background: url("throbber.gif") center center no-repeat; +} +.jstree-default-dark .jstree-file { + background: url("32px.png") -100px -68px no-repeat; +} +.jstree-default-dark .jstree-folder { + background: url("32px.png") -260px -4px no-repeat; +} +.jstree-default-dark > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; +} +#jstree-dnd.jstree-default-dark { + line-height: 24px; + padding: 0 4px; +} +#jstree-dnd.jstree-default-dark .jstree-ok, +#jstree-dnd.jstree-default-dark .jstree-er { + background-image: url("32px.png"); + background-repeat: no-repeat; + background-color: transparent; +} +#jstree-dnd.jstree-default-dark i { + background: transparent; + width: 24px; + height: 24px; + line-height: 24px; +} +#jstree-dnd.jstree-default-dark .jstree-ok { + background-position: -4px -68px; +} +#jstree-dnd.jstree-default-dark .jstree-er { + background-position: -36px -68px; +} +.jstree-default-dark .jstree-ellipsis { + overflow: hidden; +} +.jstree-default-dark .jstree-ellipsis .jstree-anchor { + width: calc(100% - 29px); + text-overflow: ellipsis; + overflow: hidden; +} +.jstree-default-dark.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); +} +.jstree-default-dark.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default-dark-small .jstree-node { + min-height: 18px; + line-height: 18px; + margin-left: 18px; + min-width: 18px; +} +.jstree-default-dark-small .jstree-anchor { + line-height: 18px; + height: 18px; +} +.jstree-default-dark-small .jstree-icon { + width: 18px; + height: 18px; + line-height: 18px; +} +.jstree-default-dark-small .jstree-icon:empty { + width: 18px; + height: 18px; + line-height: 18px; +} +.jstree-default-dark-small.jstree-rtl .jstree-node { + margin-right: 18px; +} +.jstree-default-dark-small .jstree-wholerow { + height: 18px; +} +.jstree-default-dark-small .jstree-node, +.jstree-default-dark-small .jstree-icon { + background-image: url("32px.png"); +} +.jstree-default-dark-small .jstree-node { + background-position: -295px -7px; + background-repeat: repeat-y; +} +.jstree-default-dark-small .jstree-last { + background: transparent; +} +.jstree-default-dark-small .jstree-open > .jstree-ocl { + background-position: -135px -7px; +} +.jstree-default-dark-small .jstree-closed > .jstree-ocl { + background-position: -103px -7px; +} +.jstree-default-dark-small .jstree-leaf > .jstree-ocl { + background-position: -71px -7px; +} +.jstree-default-dark-small .jstree-themeicon { + background-position: -263px -7px; +} +.jstree-default-dark-small > .jstree-no-dots .jstree-node, +.jstree-default-dark-small > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-dark-small > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -39px -7px; +} +.jstree-default-dark-small > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -7px -7px; +} +.jstree-default-dark-small .jstree-disabled { + background: transparent; +} +.jstree-default-dark-small .jstree-disabled.jstree-hovered { + background: transparent; +} +.jstree-default-dark-small .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default-dark-small .jstree-checkbox { + background-position: -167px -7px; +} +.jstree-default-dark-small .jstree-checkbox:hover { + background-position: -167px -39px; +} +.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, +.jstree-default-dark-small .jstree-checked > .jstree-checkbox { + background-position: -231px -7px; +} +.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, +.jstree-default-dark-small .jstree-checked > .jstree-checkbox:hover { + background-position: -231px -39px; +} +.jstree-default-dark-small .jstree-anchor > .jstree-undetermined { + background-position: -199px -7px; +} +.jstree-default-dark-small .jstree-anchor > .jstree-undetermined:hover { + background-position: -199px -39px; +} +.jstree-default-dark-small .jstree-checkbox-disabled { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default-dark-small > .jstree-striped { + background-size: auto 36px; +} +.jstree-default-dark-small.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); + background-position: 100% 1px; + background-repeat: repeat-y; +} +.jstree-default-dark-small.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default-dark-small.jstree-rtl .jstree-open > .jstree-ocl { + background-position: -135px -39px; +} +.jstree-default-dark-small.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -103px -39px; +} +.jstree-default-dark-small.jstree-rtl .jstree-leaf > .jstree-ocl { + background-position: -71px -39px; +} +.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-node, +.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -39px -39px; +} +.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -7px -39px; +} +.jstree-default-dark-small .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; +} +.jstree-default-dark-small > .jstree-container-ul .jstree-loading > .jstree-ocl { + background: url("throbber.gif") center center no-repeat; +} +.jstree-default-dark-small .jstree-file { + background: url("32px.png") -103px -71px no-repeat; +} +.jstree-default-dark-small .jstree-folder { + background: url("32px.png") -263px -7px no-repeat; +} +.jstree-default-dark-small > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; +} +#jstree-dnd.jstree-default-dark-small { + line-height: 18px; + padding: 0 4px; +} +#jstree-dnd.jstree-default-dark-small .jstree-ok, +#jstree-dnd.jstree-default-dark-small .jstree-er { + background-image: url("32px.png"); + background-repeat: no-repeat; + background-color: transparent; +} +#jstree-dnd.jstree-default-dark-small i { + background: transparent; + width: 18px; + height: 18px; + line-height: 18px; +} +#jstree-dnd.jstree-default-dark-small .jstree-ok { + background-position: -7px -71px; +} +#jstree-dnd.jstree-default-dark-small .jstree-er { + background-position: -39px -71px; +} +.jstree-default-dark-small .jstree-ellipsis { + overflow: hidden; +} +.jstree-default-dark-small .jstree-ellipsis .jstree-anchor { + width: calc(100% - 23px); + text-overflow: ellipsis; + overflow: hidden; +} +.jstree-default-dark-small.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg=="); +} +.jstree-default-dark-small.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default-dark-large .jstree-node { + min-height: 32px; + line-height: 32px; + margin-left: 32px; + min-width: 32px; +} +.jstree-default-dark-large .jstree-anchor { + line-height: 32px; + height: 32px; +} +.jstree-default-dark-large .jstree-icon { + width: 32px; + height: 32px; + line-height: 32px; +} +.jstree-default-dark-large .jstree-icon:empty { + width: 32px; + height: 32px; + line-height: 32px; +} +.jstree-default-dark-large.jstree-rtl .jstree-node { + margin-right: 32px; +} +.jstree-default-dark-large .jstree-wholerow { + height: 32px; +} +.jstree-default-dark-large .jstree-node, +.jstree-default-dark-large .jstree-icon { + background-image: url("32px.png"); +} +.jstree-default-dark-large .jstree-node { + background-position: -288px 0px; + background-repeat: repeat-y; +} +.jstree-default-dark-large .jstree-last { + background: transparent; +} +.jstree-default-dark-large .jstree-open > .jstree-ocl { + background-position: -128px 0px; +} +.jstree-default-dark-large .jstree-closed > .jstree-ocl { + background-position: -96px 0px; +} +.jstree-default-dark-large .jstree-leaf > .jstree-ocl { + background-position: -64px 0px; +} +.jstree-default-dark-large .jstree-themeicon { + background-position: -256px 0px; +} +.jstree-default-dark-large > .jstree-no-dots .jstree-node, +.jstree-default-dark-large > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-dark-large > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -32px 0px; +} +.jstree-default-dark-large > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: 0px 0px; +} +.jstree-default-dark-large .jstree-disabled { + background: transparent; +} +.jstree-default-dark-large .jstree-disabled.jstree-hovered { + background: transparent; +} +.jstree-default-dark-large .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default-dark-large .jstree-checkbox { + background-position: -160px 0px; +} +.jstree-default-dark-large .jstree-checkbox:hover { + background-position: -160px -32px; +} +.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, +.jstree-default-dark-large .jstree-checked > .jstree-checkbox { + background-position: -224px 0px; +} +.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, +.jstree-default-dark-large .jstree-checked > .jstree-checkbox:hover { + background-position: -224px -32px; +} +.jstree-default-dark-large .jstree-anchor > .jstree-undetermined { + background-position: -192px 0px; +} +.jstree-default-dark-large .jstree-anchor > .jstree-undetermined:hover { + background-position: -192px -32px; +} +.jstree-default-dark-large .jstree-checkbox-disabled { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default-dark-large > .jstree-striped { + background-size: auto 64px; +} +.jstree-default-dark-large.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); + background-position: 100% 1px; + background-repeat: repeat-y; +} +.jstree-default-dark-large.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default-dark-large.jstree-rtl .jstree-open > .jstree-ocl { + background-position: -128px -32px; +} +.jstree-default-dark-large.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -96px -32px; +} +.jstree-default-dark-large.jstree-rtl .jstree-leaf > .jstree-ocl { + background-position: -64px -32px; +} +.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-node, +.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -32px -32px; +} +.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: 0px -32px; +} +.jstree-default-dark-large .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; +} +.jstree-default-dark-large > .jstree-container-ul .jstree-loading > .jstree-ocl { + background: url("throbber.gif") center center no-repeat; +} +.jstree-default-dark-large .jstree-file { + background: url("32px.png") -96px -64px no-repeat; +} +.jstree-default-dark-large .jstree-folder { + background: url("32px.png") -256px 0px no-repeat; +} +.jstree-default-dark-large > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; +} +#jstree-dnd.jstree-default-dark-large { + line-height: 32px; + padding: 0 4px; +} +#jstree-dnd.jstree-default-dark-large .jstree-ok, +#jstree-dnd.jstree-default-dark-large .jstree-er { + background-image: url("32px.png"); + background-repeat: no-repeat; + background-color: transparent; +} +#jstree-dnd.jstree-default-dark-large i { + background: transparent; + width: 32px; + height: 32px; + line-height: 32px; +} +#jstree-dnd.jstree-default-dark-large .jstree-ok { + background-position: 0px -64px; +} +#jstree-dnd.jstree-default-dark-large .jstree-er { + background-position: -32px -64px; +} +.jstree-default-dark-large .jstree-ellipsis { + overflow: hidden; +} +.jstree-default-dark-large .jstree-ellipsis .jstree-anchor { + width: calc(100% - 37px); + text-overflow: ellipsis; + overflow: hidden; +} +.jstree-default-dark-large.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg=="); +} +.jstree-default-dark-large.jstree-rtl .jstree-last { + background: transparent; +} +@media (max-width: 768px) { + #jstree-dnd.jstree-dnd-responsive { + line-height: 40px; + font-weight: bold; + font-size: 1.1em; + text-shadow: 1px 1px white; + } + #jstree-dnd.jstree-dnd-responsive > i { + background: transparent; + width: 40px; + height: 40px; + } + #jstree-dnd.jstree-dnd-responsive > .jstree-ok { + background-image: url("40px.png"); + background-position: 0 -200px; + background-size: 120px 240px; + } + #jstree-dnd.jstree-dnd-responsive > .jstree-er { + background-image: url("40px.png"); + background-position: -40px -200px; + background-size: 120px 240px; + } + #jstree-marker.jstree-dnd-responsive { + border-left-width: 10px; + border-top-width: 10px; + border-bottom-width: 10px; + margin-top: -10px; + } +} +@media (max-width: 768px) { + .jstree-default-dark-responsive { + /* + .jstree-open > .jstree-ocl, + .jstree-closed > .jstree-ocl { border-radius:20px; background-color:white; } + */ + } + .jstree-default-dark-responsive .jstree-icon { + background-image: url("40px.png"); + } + .jstree-default-dark-responsive .jstree-node, + .jstree-default-dark-responsive .jstree-leaf > .jstree-ocl { + background: transparent; + } + .jstree-default-dark-responsive .jstree-node { + min-height: 40px; + line-height: 40px; + margin-left: 40px; + min-width: 40px; + white-space: nowrap; + } + .jstree-default-dark-responsive .jstree-anchor { + line-height: 40px; + height: 40px; + } + .jstree-default-dark-responsive .jstree-icon, + .jstree-default-dark-responsive .jstree-icon:empty { + width: 40px; + height: 40px; + line-height: 40px; + } + .jstree-default-dark-responsive > .jstree-container-ul > .jstree-node { + margin-left: 0; + } + .jstree-default-dark-responsive.jstree-rtl .jstree-node { + margin-left: 0; + margin-right: 40px; + background: transparent; + } + .jstree-default-dark-responsive.jstree-rtl .jstree-container-ul > .jstree-node { + margin-right: 0; + } + .jstree-default-dark-responsive .jstree-ocl, + .jstree-default-dark-responsive .jstree-themeicon, + .jstree-default-dark-responsive .jstree-checkbox { + background-size: 120px 240px; + } + .jstree-default-dark-responsive .jstree-leaf > .jstree-ocl, + .jstree-default-dark-responsive.jstree-rtl .jstree-leaf > .jstree-ocl { + background: transparent; + } + .jstree-default-dark-responsive .jstree-open > .jstree-ocl { + background-position: 0 0 !important; + } + .jstree-default-dark-responsive .jstree-closed > .jstree-ocl { + background-position: 0 -40px !important; + } + .jstree-default-dark-responsive.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -40px 0 !important; + } + .jstree-default-dark-responsive .jstree-themeicon { + background-position: -40px -40px; + } + .jstree-default-dark-responsive .jstree-checkbox, + .jstree-default-dark-responsive .jstree-checkbox:hover { + background-position: -40px -80px; + } + .jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, + .jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, + .jstree-default-dark-responsive .jstree-checked > .jstree-checkbox, + .jstree-default-dark-responsive .jstree-checked > .jstree-checkbox:hover { + background-position: 0 -80px; + } + .jstree-default-dark-responsive .jstree-anchor > .jstree-undetermined, + .jstree-default-dark-responsive .jstree-anchor > .jstree-undetermined:hover { + background-position: 0 -120px; + } + .jstree-default-dark-responsive .jstree-anchor { + font-weight: bold; + font-size: 1.1em; + text-shadow: 1px 1px white; + } + .jstree-default-dark-responsive > .jstree-striped { + background: transparent; + } + .jstree-default-dark-responsive .jstree-wholerow { + border-top: 1px solid #666; + border-bottom: 1px solid #000; + background: #333333; + height: 40px; + } + .jstree-default-dark-responsive .jstree-wholerow-hovered { + background: #555; + } + .jstree-default-dark-responsive .jstree-wholerow-clicked { + background: #5fa2db; + } + .jstree-default-dark-responsive .jstree-children .jstree-last > .jstree-wholerow { + box-shadow: inset 0 -6px 3px -5px #111111; + } + .jstree-default-dark-responsive .jstree-children .jstree-open > .jstree-wholerow { + box-shadow: inset 0 6px 3px -5px #111111; + border-top: 0; + } + .jstree-default-dark-responsive .jstree-children .jstree-open + .jstree-open { + box-shadow: none; + } + .jstree-default-dark-responsive .jstree-node, + .jstree-default-dark-responsive .jstree-icon, + .jstree-default-dark-responsive .jstree-node > .jstree-ocl, + .jstree-default-dark-responsive .jstree-themeicon, + .jstree-default-dark-responsive .jstree-checkbox { + background-image: url("40px.png"); + background-size: 120px 240px; + } + .jstree-default-dark-responsive .jstree-node { + background-position: -80px 0; + background-repeat: repeat-y; + } + .jstree-default-dark-responsive .jstree-last { + background: transparent; + } + .jstree-default-dark-responsive .jstree-leaf > .jstree-ocl { + background-position: -40px -120px; + } + .jstree-default-dark-responsive .jstree-last > .jstree-ocl { + background-position: -40px -160px; + } + .jstree-default-dark-responsive .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; + } + .jstree-default-dark-responsive .jstree-file { + background: url("40px.png") 0 -160px no-repeat; + background-size: 120px 240px; + } + .jstree-default-dark-responsive .jstree-folder { + background: url("40px.png") -40px -40px no-repeat; + background-size: 120px 240px; + } + .jstree-default-dark-responsive > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; + } +} +.jstree-default-dark { + background: #333; +} +.jstree-default-dark .jstree-anchor { + color: #999; + text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5); +} +.jstree-default-dark .jstree-clicked, +.jstree-default-dark .jstree-checked { + color: white; +} +.jstree-default-dark .jstree-hovered { + color: white; +} +#jstree-marker.jstree-default-dark { + border-left-color: #999; + background: transparent; +} +.jstree-default-dark .jstree-anchor > .jstree-icon { + opacity: 0.75; +} +.jstree-default-dark .jstree-clicked > .jstree-icon, +.jstree-default-dark .jstree-hovered > .jstree-icon, +.jstree-default-dark .jstree-checked > .jstree-icon { + opacity: 1; +} +.jstree-default-dark.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); +} +.jstree-default-dark.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default-dark-small.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg=="); +} +.jstree-default-dark-small.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default-dark-large.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg=="); +} +.jstree-default-dark-large.jstree-rtl .jstree-last { + background: transparent; +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default-dark/style.min.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default-dark/style.min.css new file mode 100644 index 00000000..f3c323fe --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default-dark/style.min.css @@ -0,0 +1 @@ +.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:black;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-hidden,.jstree-node.jstree-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jstree-contextmenu .jstree-anchor{-webkit-user-select:none;-webkit-touch-callout:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;box-shadow:2px 2px 2px #999999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none}.vakata-context li>a{display:block;padding:0 2em 0 2em;text-decoration:none;width:auto;color:black;white-space:nowrap;line-height:2.4em;text-shadow:1px 1px 0 white;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==");background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-no-icons{margin-left:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:white;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;text-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context .vakata-contextmenu-disabled>a>i{filter:grayscale(100%)}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:transparent;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:white;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7");background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:white;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px 0 2px}.jstree-default-dark .jstree-node,.jstree-default-dark .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-default-dark .jstree-anchor,.jstree-default-dark .jstree-animated,.jstree-default-dark .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default-dark .jstree-hovered{background:#555;border-radius:2px;box-shadow:inset 0 0 1px #555}.jstree-default-dark .jstree-context{background:#555;border-radius:2px;box-shadow:inset 0 0 1px #555}.jstree-default-dark .jstree-clicked{background:#5fa2db;border-radius:2px;box-shadow:inset 0 0 1px #666666}.jstree-default-dark .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default-dark .jstree-disabled{background:transparent;color:#666666}.jstree-default-dark .jstree-disabled.jstree-hovered{background:transparent;box-shadow:none}.jstree-default-dark .jstree-disabled.jstree-clicked{background:#333333}.jstree-default-dark .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-dark .jstree-search{font-style:italic;color:#ffffff;font-weight:bold}.jstree-default-dark .jstree-no-checkboxes .jstree-checkbox{display:none !important}.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked{background:transparent;box-shadow:none}.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#555}.jstree-default-dark.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:transparent}.jstree-default-dark.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#555}.jstree-default-dark>.jstree-striped{min-width:100%;display:inline-block;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat}.jstree-default-dark>.jstree-wholerow-ul .jstree-hovered,.jstree-default-dark>.jstree-wholerow-ul .jstree-clicked{background:transparent;box-shadow:none;border-radius:0}.jstree-default-dark .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default-dark .jstree-wholerow-hovered{background:#555}.jstree-default-dark .jstree-wholerow-clicked{background:#5fa2db;background:-webkit-linear-gradient(top, #5fa2db 0, #5fa2db 100%);background:linear-gradient(to bottom, #5fa2db 0, #5fa2db 100%)}.jstree-default-dark .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default-dark .jstree-anchor{line-height:24px;height:24px}.jstree-default-dark .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default-dark .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default-dark.jstree-rtl .jstree-node{margin-right:24px}.jstree-default-dark .jstree-wholerow{height:24px}.jstree-default-dark .jstree-node,.jstree-default-dark .jstree-icon{background-image:url("32px.png")}.jstree-default-dark .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default-dark .jstree-last{background:transparent}.jstree-default-dark .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default-dark .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default-dark .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default-dark .jstree-themeicon{background-position:-260px -4px}.jstree-default-dark>.jstree-no-dots .jstree-node,.jstree-default-dark>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default-dark>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default-dark .jstree-disabled{background:transparent}.jstree-default-dark .jstree-disabled.jstree-hovered{background:transparent}.jstree-default-dark .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-dark .jstree-checkbox{background-position:-164px -4px}.jstree-default-dark .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default-dark.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark .jstree-checked>.jstree-checkbox{background-position:-228px -4px}.jstree-default-dark.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark .jstree-checked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default-dark .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default-dark .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default-dark .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-dark>.jstree-striped{background-size:auto 48px}.jstree-default-dark.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");background-position:100% 1px;background-repeat:repeat-y}.jstree-default-dark.jstree-rtl .jstree-last{background:transparent}.jstree-default-dark.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default-dark.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default-dark.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default-dark .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url("throbber.gif") center center no-repeat}.jstree-default-dark .jstree-file{background:url("32px.png") -100px -68px no-repeat}.jstree-default-dark .jstree-folder{background:url("32px.png") -260px -4px no-repeat}.jstree-default-dark>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-dark{line-height:24px;padding:0 4px}#jstree-dnd.jstree-default-dark .jstree-ok,#jstree-dnd.jstree-default-dark .jstree-er{background-image:url("32px.png");background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-dark i{background:transparent;width:24px;height:24px;line-height:24px}#jstree-dnd.jstree-default-dark .jstree-ok{background-position:-4px -68px}#jstree-dnd.jstree-default-dark .jstree-er{background-position:-36px -68px}.jstree-default-dark .jstree-ellipsis{overflow:hidden}.jstree-default-dark .jstree-ellipsis .jstree-anchor{width:calc(100% - 29px);text-overflow:ellipsis;overflow:hidden}.jstree-default-dark.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==")}.jstree-default-dark.jstree-rtl .jstree-last{background:transparent}.jstree-default-dark-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-dark-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-dark-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-dark-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-dark-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-dark-small .jstree-wholerow{height:18px}.jstree-default-dark-small .jstree-node,.jstree-default-dark-small .jstree-icon{background-image:url("32px.png")}.jstree-default-dark-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-dark-small .jstree-last{background:transparent}.jstree-default-dark-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-dark-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-dark-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-dark-small .jstree-themeicon{background-position:-263px -7px}.jstree-default-dark-small>.jstree-no-dots .jstree-node,.jstree-default-dark-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-dark-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-dark-small .jstree-disabled{background:transparent}.jstree-default-dark-small .jstree-disabled.jstree-hovered{background:transparent}.jstree-default-dark-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-dark-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-dark-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-dark-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-dark-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-dark-small .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-dark-small>.jstree-striped{background-size:auto 36px}.jstree-default-dark-small.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");background-position:100% 1px;background-repeat:repeat-y}.jstree-default-dark-small.jstree-rtl .jstree-last{background:transparent}.jstree-default-dark-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-dark-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-dark-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-dark-small .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url("throbber.gif") center center no-repeat}.jstree-default-dark-small .jstree-file{background:url("32px.png") -103px -71px no-repeat}.jstree-default-dark-small .jstree-folder{background:url("32px.png") -263px -7px no-repeat}.jstree-default-dark-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-dark-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-default-dark-small .jstree-ok,#jstree-dnd.jstree-default-dark-small .jstree-er{background-image:url("32px.png");background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-dark-small i{background:transparent;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-default-dark-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-default-dark-small .jstree-er{background-position:-39px -71px}.jstree-default-dark-small .jstree-ellipsis{overflow:hidden}.jstree-default-dark-small .jstree-ellipsis .jstree-anchor{width:calc(100% - 23px);text-overflow:ellipsis;overflow:hidden}.jstree-default-dark-small.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==")}.jstree-default-dark-small.jstree-rtl .jstree-last{background:transparent}.jstree-default-dark-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-dark-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-dark-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-dark-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-dark-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-dark-large .jstree-wholerow{height:32px}.jstree-default-dark-large .jstree-node,.jstree-default-dark-large .jstree-icon{background-image:url("32px.png")}.jstree-default-dark-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-dark-large .jstree-last{background:transparent}.jstree-default-dark-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-dark-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-dark-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-dark-large .jstree-themeicon{background-position:-256px 0}.jstree-default-dark-large>.jstree-no-dots .jstree-node,.jstree-default-dark-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-dark-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-dark-large .jstree-disabled{background:transparent}.jstree-default-dark-large .jstree-disabled.jstree-hovered{background:transparent}.jstree-default-dark-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-dark-large .jstree-checkbox{background-position:-160px 0}.jstree-default-dark-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-dark-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-dark-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-dark-large .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-dark-large>.jstree-striped{background-size:auto 64px}.jstree-default-dark-large.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");background-position:100% 1px;background-repeat:repeat-y}.jstree-default-dark-large.jstree-rtl .jstree-last{background:transparent}.jstree-default-dark-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-dark-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-dark-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-dark-large .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url("throbber.gif") center center no-repeat}.jstree-default-dark-large .jstree-file{background:url("32px.png") -96px -64px no-repeat}.jstree-default-dark-large .jstree-folder{background:url("32px.png") -256px 0 no-repeat}.jstree-default-dark-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-dark-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-default-dark-large .jstree-ok,#jstree-dnd.jstree-default-dark-large .jstree-er{background-image:url("32px.png");background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-dark-large i{background:transparent;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-default-dark-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-default-dark-large .jstree-er{background-position:-32px -64px}.jstree-default-dark-large .jstree-ellipsis{overflow:hidden}.jstree-default-dark-large .jstree-ellipsis .jstree-anchor{width:calc(100% - 37px);text-overflow:ellipsis;overflow:hidden}.jstree-default-dark-large.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==")}.jstree-default-dark-large.jstree-rtl .jstree-last{background:transparent}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:40px;font-weight:bold;font-size:1.1em;text-shadow:1px 1px white}#jstree-dnd.jstree-dnd-responsive>i{background:transparent;width:40px;height:40px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url("40px.png");background-position:0 -200px;background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url("40px.png");background-position:-40px -200px;background-size:120px 240px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-default-dark-responsive .jstree-icon{background-image:url("40px.png")}.jstree-default-dark-responsive .jstree-node,.jstree-default-dark-responsive .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-dark-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-dark-responsive .jstree-icon,.jstree-default-dark-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-dark-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-dark-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px;background:transparent}.jstree-default-dark-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-dark-responsive .jstree-ocl,.jstree-default-dark-responsive .jstree-themeicon,.jstree-default-dark-responsive .jstree-checkbox{background-size:120px 240px}.jstree-default-dark-responsive .jstree-leaf>.jstree-ocl,.jstree-default-dark-responsive.jstree-rtl .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-dark-responsive .jstree-open>.jstree-ocl{background-position:0 0 !important}.jstree-default-dark-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px !important}.jstree-default-dark-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0 !important}.jstree-default-dark-responsive .jstree-themeicon{background-position:-40px -40px}.jstree-default-dark-responsive .jstree-checkbox,.jstree-default-dark-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark-responsive .jstree-checked>.jstree-checkbox,.jstree-default-dark-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-dark-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-dark-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-dark-responsive .jstree-anchor{font-weight:bold;font-size:1.1em;text-shadow:1px 1px white}.jstree-default-dark-responsive>.jstree-striped{background:transparent}.jstree-default-dark-responsive .jstree-wholerow{border-top:1px solid #666;border-bottom:1px solid #000;background:#333333;height:40px}.jstree-default-dark-responsive .jstree-wholerow-hovered{background:#555}.jstree-default-dark-responsive .jstree-wholerow-clicked{background:#5fa2db}.jstree-default-dark-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #111111}.jstree-default-dark-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #111111;border-top:0}.jstree-default-dark-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-dark-responsive .jstree-node,.jstree-default-dark-responsive .jstree-icon,.jstree-default-dark-responsive .jstree-node>.jstree-ocl,.jstree-default-dark-responsive .jstree-themeicon,.jstree-default-dark-responsive .jstree-checkbox{background-image:url("40px.png");background-size:120px 240px}.jstree-default-dark-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-dark-responsive .jstree-last{background:transparent}.jstree-default-dark-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-dark-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-dark-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark-responsive .jstree-file{background:url("40px.png") 0 -160px no-repeat;background-size:120px 240px}.jstree-default-dark-responsive .jstree-folder{background:url("40px.png") -40px -40px no-repeat;background-size:120px 240px}.jstree-default-dark-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}}.jstree-default-dark{background:#333}.jstree-default-dark .jstree-anchor{color:#999;text-shadow:1px 1px 0 rgba(0,0,0,0.5)}.jstree-default-dark .jstree-clicked,.jstree-default-dark .jstree-checked{color:white}.jstree-default-dark .jstree-hovered{color:white}#jstree-marker.jstree-default-dark{border-left-color:#999;background:transparent}.jstree-default-dark .jstree-anchor>.jstree-icon{opacity:.75}.jstree-default-dark .jstree-clicked>.jstree-icon,.jstree-default-dark .jstree-hovered>.jstree-icon,.jstree-default-dark .jstree-checked>.jstree-icon{opacity:1}.jstree-default-dark.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==")}.jstree-default-dark.jstree-rtl .jstree-last{background:transparent}.jstree-default-dark-small.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==")}.jstree-default-dark-small.jstree-rtl .jstree-last{background:transparent}.jstree-default-dark-large.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==")}.jstree-default-dark-large.jstree-rtl .jstree-last{background:transparent} \ No newline at end of file diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default-dark/throbber.gif b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default-dark/throbber.gif new file mode 100644 index 0000000000000000000000000000000000000000..169062cda53296196d81c1e47816e40358d2523d GIT binary patch literal 1464 zcmZvceN0nV7>Ca-x8)Wpy+Fkag4|n5Efb_r&{j9n7J<@Wy@FyvG_6Bu)oDeY-6HOm z^3gJs3Jj_`bvlivkopWdo^HYA_f&J3A?gB1zKWaA-7|`uci_M55E_tX8YtZda?-Mx(K#qeCPT z5q|}$GPdNU%gBu6)j~fA06_d1kzTf2dw6#-epG*0hims}jr$I0i&yLSmmC1Z3z!}N z*dX3_(ie#WDQuYa*65ZW8E(5Y7Rs%ywc!;amUL1HW`Vy4lXCMS@OY%gaUqbvYFxZf zC5NMgDaToQarKDVeHMfzcx*p4#^&^?kLH(=spG8DcKV68xN^-OXW%df!d#cc;v69S zAa;SsgyS%5V+X%E1luf;A+p)WDVrCxI`OrFJ;_>B{0%NE*1Qm9nn@leW!NSY0KXCtvx1n6Hfojth$ zt3xV&07J*R>ZtsIa`&aCOxKN67(r++I~#bw08@2I*Jjv~xsONkxNib3yfT1`X1#Gs zzD;(lZHk1SM?w!$r}#@ZEOQ}v?1}Sm^&KML$!M#2BvV^f#MYj#p29HJ=2p@`l`(F# z6AxDioPin^357J@tF)EZ{U~Qvj7F|t_VT9_zV3g9E%G6YwFdbDGf=Np?obEC!6Va? z1YJPiS!$aiQHw#nbLl2?xAvLxH+w%!3Fj-KWZp7wQ(8Jp)+|wd5yh47RhC@j&`261 z!>7|LVS*NKUO?G9>irdQP7(Y(8)PG(7M`lt5PMT$6vGM7;Yp4k>u!bqBHzNZ zjOpOUVOIJ{Vc!5;`bOhFkh>_JGb5^Ski>S+cMOs7rm@pW-cN6h)O* za_$~c+|_=%JGib13*VPwJQM0t z(m(OO`1*$)FKz5ND>Cis98Nq~qm;Y`2Yhhr zKBvl?UNZD}fcQPY=9!V7WzkO$beCP`TLw*W1=rC)djBa*><=;1OE3Xam5_7DV2?6A zuhtw9RHWYLp9257^QybWIQ6VIJG#@zC84YC45mESiaZH!o83qi(rFXcaaSq(j-Owa z6CIkzqTzH?&sIi53vbMj7F6%rH6u#lLFP(4SVUU_nzw0O(G0%gHpQ*I+>3=mufOJE zafP$lxzy$Pke=Qav-?=?9H^LqhV&8ls=DoW(1KO5zW?mAaDb{Y(>Koc49sZgb+^uF qc@C8(Mp%rgx+mJC3dQo~8dbUO?Q85zP5Hs^+UpbJR`hQGVEx}cw(Vm8 literal 0 HcmV?d00001 diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/32px.png b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/32px.png new file mode 100644 index 0000000000000000000000000000000000000000..ca6af206777a87fb9d27dccf2184934065ceeae8 GIT binary patch literal 5660 zcmaKwcTiJNv%r%WFcGALDoU@?QKU+XpcDy62Pr|CN=JGP2mvWlq!W4-L_mu4E?uNZ zliooIO{54(UhtbYZ|2RL_s`ukyL-=`JNKOP+ub+Xh)372FQMK{)O_inBpdX|pMDt68DqVz@s5*+T;~Wh@8P6Na-8@H#{zVJ~pPtP0xU zSUM(l*7_=N)3a1Ipp1XM?ZSD!)Cr0@vS0o*i97KkJ^A)!y?$!Z`Cv*&*b3<8>WVXu zBI$!h)37n{D$=ttF#Hp|q6m~J24IXbHT@?r?NUTvkoDyY{{-lq`IwcFaZ7Iz+oK)h z7*JDMaCb3ZewZ2mDfyl32FJB@^T3UPknAE;5t`Z; zCa)tp*+JGHN)A{f&IvwS*E2B*Agd~Bl^zaSI=Z|#KEaStBfeyY{CcA~;oLe#($`AK zsB|1d)TXeAKzNnvk;va6k)cO{PgoAG{nkbfy_wGQjrAE4100M{Tu;}8!-u?&_I!o$7!z&41P^fNy)ZAU4(#Wp)<5JTt#DU z#t3E2S~aH$h8$|U@wXgDe@QW4Pl21)dtJmh=?{#1UF8Kx8Juo)o!u0Z;$_KC0<1e$ zyyn;tD!#HDsB&Z|TRNlub=kzIR0;xL|oom-N*Si!fSv={5 zzhrd=tvbv|nDUYJo@H1{`Mr{*xY5>AIG`G8Hj8SW14S%8(MS2MQmj;WRadUUBbsr? zpzoQd^cFnLv3(dih^leKQevS|(o&Q}^;~$_?VIXe$022ONah25+U^1I8L(6Ay}tfIUF_b2KQo5eRtxXN zAYy@`u~rM+Ugse%N$UU9Pz(-#3k_-%N#5c`9u&Sg<#2*EzqSYw&$SW}0;{^^8{lUU zsK`?$brgjrs^&LyCU`qW(l?qi-3sJ@IJYP!EA6KOJ=WAvQCH{J(H)OV4t$_0N+vxs z0}nkr#Pd~hb6Baxm!8{3QL(8xde%_V^Std$Kl)rLZ*}eBPH~5bJ(GlW>lMOK+j2HE ze}7rYd2M4Y0U-492rJX@Zu907t!Ie2yZdsI0J4hK=o{e=mu6d5vX|Z~HnaZbUyz=? zD*vcywVX3R^j;5H1t~?xriIWGGx=i>*H0d}O7vF_;Fyx3@93z*JI+P_x3oE&G{{#! z2;yDo@$ql;*cH;r)zlI3Dyhj?Xu&EBIH;f#SNj?$hyiyu!VX(7a#X&jrzRm?lGU;siS5*}iDf;km^N`QJQHYX ztuP0Ux%t)5BdZ^y2E>XRT|f?v=h@cD+{#*=QBhNz^1>{>I2$fAE!Ydu85u!(SbM2!Fk4Yj9R-pm}Cw*U$K;{V}h41 zXUip$uKqbttzu^2s)6O46pd~;1#&Sn7>Agt%+7x^p7TU=JoJq=02N@(Xj-W$g?CXO zEgJF$O$^-$7fPY5^JY!hNvz=$l$W#@mntf8e~08zXa4$I7+dz$>1dMaxwloH5bfWt5cDlYI(CM6?L`l1WgqkaO@TTEUP>6 z=HK$IFrYwlrGO_v=rA8wa8!{FFf+^M9=-iWt6}9eS21M7++R~3cqf_@eK9b>Vk4>I zS4}QC_`%WGIL)5~!pu-k|J;>3;!e$ny_eCAhPEX>x3f4DRh+<@5Uh*`V3gtQq;PdO zOW6ih{YL=SwE%Etf-Ex5@n-~F7x>kod>zpF}}L;t*@+^$BnTy$tRHSu>((*vR5684;*U z6VQza-8rYsRvIK&d+e5-MM4b)=8@M0F9xU&HiL1wzv7^R* zRh0<$H)O8Nrs!L5>(fy|!?LDK(dod!6N62qFIW?$-X2=YJ+O@ ztb6*MPp`c;M|dY0LrXYr(@*er`PY&>f6xCo*y6%;N6<8cZ&e*5MA>on31Z3@+Z`4O z*%83QphafWfsW;Z_O&F8<*}WgaCcp$d}D}oh5bKt6>9$*iQgVE3`qcVbvpHd3dUqe zB+|hp{>;b+ZNQsRU}jC-1;Xt>T}(n-+A|)Y0c2a>y5}i1tfX%;U!7ddhMIQ1@?FjV zh&;{dJ)dgNfbO1Uz=k+@tvOtEbu)tBoTvJ!?QKuS6y$dQjZ!kvxghe5Os3aVtB+2l zHZ*S$ECb3fp5;p-XU@|0wNAdkaA3h!acYZh&CbLnJ9f>jX$>-#bV^SDm@xtwrn z`6qx~>frB+W!6#oQ$bhSN!#e&#t*mm2h&Lvu81)|{k<7^ZXUeX+7|iei5BYPJ6WH< zJKHhRuHV{E<^Y1tfA84dVhWz_`bG81MQ$P1hi(spy^@_je=r#@pUSivHX3XmamZTM zPgO4l9a)CPQ3Q@<#Bx;TFQ8(SLf+;{?*y?cZYDY}eiYP@4gWNxQJ>}xl6)7Nf6=3& zXKk8LXp|z9P_0)xnPUuzzIS7w%ZeR-=AEODqOTo3(^w=f$d80| zC+G@+CP0Cw`?$M+rbYBXS*zLO!u7(-{gHRr=Wbm~;r#_XrkUa;MX-kjjt)2FK^367 zPhLIXv^7l6NV^;z$PWAKm^5N2>Vmx@b<;~*o_ypMczTBh89*eb$$2&mdH7j34Dc=Y z$d^2F^|+m}jiJym6jH&eWc(8v4;Fz?_Y6LG#uRA4a8r*a#{(9MZdYSuJ%BaCpF*Lv zoq$o_uv)ZT3Du$}LwqZSM40hrUMpa`!4q?>i^l%PNUm_uA~Ha+uGfZ z5Fu5W&m<}b@Q9RS2z0lq-_;9C$7x~;&6_Qw3GtiXp%MMDqY0TgbI3dPIFq2JuC6|2 z#H51?HU(Q+wRqh2WV}C~l4Y5XGW0%^nBq|&DSr#pDJ&?+6FxrVl*hTpV(^I%#QnJ; zT_rBu5HnlbkA3gH{eCxlc;8;2L~PVLPOVx%>1UR|KX0PO!FT$cgx!e4A@5uA)mL~$ zcAGQ*d?@Z2!1;sU%Lh zf5O(@_(w$TrB`w0!F#S+omZQpm$*gdpIv$AvAvQ}hg9m>RUr77&S$z7yxKe1U1{+hA#w8$q#FkNTF1_Ufyr6oRz8t*Xt+P z_B7SEkJJf8ntKE94JPM4pWxTk>wRl=0v#}@kYK+9gHT>YWGR117Lug&_$jVK2242J zD#Jqz4X5mEs3qdSzi8M3$e7ACOii0F?rOv>gG+(|vjO}2znvd8-`bFD*9&;BIsXMPQyJustmX=N2_OQk>yt_9}vu>io3@v(Q&mV3TO5)dC_hc#Mr3E&U zFkZvQ!QV!Ay??2)K8`u)WFxTn_BTCXrHcg)z{rye99Ma(_mP_ex_D<)=fgp+pF9EKu63&Op4osuU!56omX*M zsDNFR8%{hjQ0;OnV%)5tEsd1N6)w;$OM{u~^E05=9GFoNWq4aT?C-VRr@K4}mYckK zW=ej*y60lMNAq4OJW<7(418*F=&qz#IrPPgarGUo_!qvQTWi;=3rQ6WJJG~EmnJ8@ zx?Migq9Lfze)wGn%-1=2KNLa5m1~$2ngu!$F)>YQX5A`o%ylfJv3Du48RT#A9#B?F zaMTIqO6BD%;F|s{;>N4>@yGJ+?zlF{p^tq(F86`Ipshx2!YSqE1&*>ja$KPv#JS$Db3Fy3`!y=X7WJ-m&pP7avqSrz%WGZOR39GdDd|nEbMfZP7(Xn;Xa9=CQM@5!H8}ebF7eEoK+G zQ}@}ah0`d()0|epZW?Cklp!JN?ZaOBYLmp|T4nC~=KA`&xOE>DtFFF2-J7>Oa*ufg z+=nXACNg;5N|%2@y*X+=_x_F*!kUcWet(?WOT5sdW%~;7qHuY2?vxUTjE*9sAfqO2 zY8-Re>k4ILahA2074|;cZKC$sYgruK6R)MoRYTbn+VC_U<~PqhoWVk%#9Nj4Io{k6 z@7Az*i{t7R6CTB%dwx|d!A?#Y@Y%XBss+#4_re279F*Wln{Z{XTm&Lxt12Bsy1JyX zOiIbJ<0vRGnV6WoMDLWGQ?IOTBA5+&03+5mM21g>vrEm4Eo9_jc{ENZ&l_iU{frta z-Ul#t68B+?W)c4@8yh-)e*Vy{0qrN|!2^-%dWLChmaZ`tUbDsVq zDh)kHtWNClF2ncpY>yvhe;=Y3!d-Oi_#{)>eXET)SK3cvBj;6&0Z&g$mcDPLN@Vx` zB_SlMGh3=Th$#P2@A1-uvQ|j8|A8CHuLE^q;may)zbq^&>azZdA_`>wzb2_+wdQ4S tl-L|?sIRZTY>v9R-b=Vd*EsEI(C%%u)9mPYA7a-Rpr(RQ{s>2g{1@mKk){9u literal 0 HcmV?d00001 diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/40px.png b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/40px.png new file mode 100644 index 0000000000000000000000000000000000000000..2a3fcb9dfacf4e82a4c3ac3a6cd1650af966fc29 GIT binary patch literal 2215 zcmZuzdpr|rA0P9&=N6Vrbc&;6OvQ;bysG804oRQpZq($GSx1;iE@jnT7TOk}w=~m@ zc?mHyjiU%P6}84pNH*p&Gq)Wl@25|l_x=6xe7}D@m*4mM{GQ+Exq8&gZIh~@DgXf3 z;06CsAaGgD})FP|{?C6o>uywSxwUvF1b+R5pp>TtI8`*63H~zl_3Wbss z{x!e8k>0suUcT!nC$Ffetg4~A)%2&M{z1Vjt7`)%*X#iRr4^4uuE((-gxrZn&QA68 zVJ+{|-H)uBW$==osQl{pnK{b&(#5_~^EB*9BegpiNPk7}k-Zlm$AFmWazI7(ExV9^ zk-Y#0cT9eW-qNkGHm0{Z5O5JoX;Wk-RbBUUS)3qhKUAusZx0vpau5fs01FHZ*5-?z zR(+Oi^6((%=UlpwA0d*UKQ&wPFC{rFz9!Hm4Gp+@y_JjJvx8-P$lzg7qfPSk?z5(G zMp(`*y5vejLA{Fcg2gn~W@t!_QJ zF>k419eO3fyyo5sZkW)>7~sxY&>|0 z9B_}^J8x6&VRQXUC`8CXH!3|IB2pyjh_v|*6t--jOrorku5t0Px($|-khHKLzCvFO;u*P&09w^Sb-08AfxmU}| zmzOfPpA)O=S8<7>?)SibXpdi#!uE?EU=Ut2;6po`U@i_HW{%JXdQN({pHZ{gwpS4i z3Iy8YyE6jY7nnKWS-ic~FigRKSp!V{CcMZM-=UMCbjQ3vsT^kpaGy~&pHa_1<&(1e zNx2CTjTC+TK0nA?$Hn0KH#&Z zow#nhAIj$MioaGA#>8sbqHUC5p+*|qR>2}2%;#MjOg5-gergaj!tLutFMFzFOwz@x zf`$T;a>KhoPH$xjP9=S^Ibl^m4-Bxy66(uub0xR}d4zUiF|W*JdQ)0G;*b@9H2Y3H zuCX;`+EK{+updqBuV3rgDVp+myKPZ4_k1UIwLODczE8CDaEDLkucD={gFbn?MMYRE zRXa6jLvcX!Jxw?1VWr0-HHNnclAB^pMyR zaUm6lE2xbaXWc)WlC1zh&LL;+-I6{U^=}Qo8ZW+zouOz8;nsY7=oe658`=Je4Y|_> z8562Sw()rtGP^DG(%t3?7~`dT%6m49as5bgSkaN(x@W1{QMzRL|Lfb2)#MGFLR`A5 z{qf05chiRWp9&o@)5lz6c~kBG?qsfZT}a3nI{NCd>Pl|@1tL$->aCd8)q&Q{#N%AR z4oTyss`N}$hvkKSyRWZ%m!rtXB9jAXC5r#;65pqdk!buNg9gLgebf4nP3tNam}!nQS?nGW zNY)j^>s|Y$RB=VC7s$X{$S>cH04{siWUThqWVCQQYM?k%p~Pdmb+yaMxKpztR@sFm z;(HzB2+u_pP~ReRaPnIifi5sZBY-mCmR-F2t>+i|&TB62;TU|M%Z76&l-Hm}i>Ely zqL}Yn+r~t5TK6{vKHroKwV|b-M|=}yvM(T3e{AA&tjQU1>|-8biB$y_ty1M2 zQn`uV*Tqee#kymnX8!EtX1Y|m;4;ZUHmP-vahom%T40;9;QGc4$VUlkd5Wu9t}G~4 zJHOam&@cMXEHlbM413uRH;ofBS;6Nkhuc$HO0qy5Da%1+W%m`_mUUnjwklqNh;uoF zaxG&J{`7(S!X)2i`{2!PzDiyKC@~M+n-bmeAZ97jlG!ub6Q>JxzWsu;e?JOt`rBrQ zr!{`iV0Y&$F?E)&Z6k$}Kkl5!L4X{lhG$g;do=mQ2;hL;)R2~7I}M&4;9vDK<^c|_ z8-ECiU>v^tIY!q(9or|F)`1as4-nllb}`cIvF#keoVTT)%JLsQO;`&^7s@ijz{w+KUWF5I$uu8et;cSaKgDyMzyvMU8o;T`3T z6U>KL=7#yfkQ}N+-7WaVVdb!Qdy@MfwBX7rKkc|=D4L8+73~bx8}82vbsJ&bW)TOi z2T;tavYDAY(!)7469VkflwAv-0C9g;!9-}^zfpJGF3>W`3R??#Z-kvT+J|-yqR$68 z4G2w)6;V*nEPM=rnoH_Y&IL5Fo$8_~jHl#~t^Qr9>Ab{DZXSJp7Y*EQL_{VbN5hN< zh#ljWG)_yMotEI*Nc>g@a_!41lU&a>YUA$;#a;pW?{K)xVCnfvd1^k1qMBZfM9@no znUdmv#^!V&Y2e^qB5zlee2IH3^&;K+H~dlI5Hs+;C2YH{@G_pYp!&8&YA03I-}LzM@R GnSTO{AtE3E literal 0 HcmV?d00001 diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/style.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/style.css new file mode 100644 index 00000000..b50e6a2c --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/style.css @@ -0,0 +1,1106 @@ +/* jsTree default theme */ +.jstree-node, +.jstree-children, +.jstree-container-ul { + display: block; + margin: 0; + padding: 0; + list-style-type: none; + list-style-image: none; +} +.jstree-node { + white-space: nowrap; +} +.jstree-anchor { + display: inline-block; + color: black; + white-space: nowrap; + padding: 0 4px 0 1px; + margin: 0; + vertical-align: top; +} +.jstree-anchor:focus { + outline: 0; +} +.jstree-anchor, +.jstree-anchor:link, +.jstree-anchor:visited, +.jstree-anchor:hover, +.jstree-anchor:active { + text-decoration: none; + color: inherit; +} +.jstree-icon { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0; + vertical-align: top; + text-align: center; +} +.jstree-icon:empty { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0; + vertical-align: top; + text-align: center; +} +.jstree-ocl { + cursor: pointer; +} +.jstree-leaf > .jstree-ocl { + cursor: default; +} +.jstree .jstree-open > .jstree-children { + display: block; +} +.jstree .jstree-closed > .jstree-children, +.jstree .jstree-leaf > .jstree-children { + display: none; +} +.jstree-anchor > .jstree-themeicon { + margin-right: 2px; +} +.jstree-no-icons .jstree-themeicon, +.jstree-anchor > .jstree-themeicon-hidden { + display: none; +} +.jstree-hidden, +.jstree-node.jstree-hidden { + display: none; +} +.jstree-rtl .jstree-anchor { + padding: 0 1px 0 4px; +} +.jstree-rtl .jstree-anchor > .jstree-themeicon { + margin-left: 2px; + margin-right: 0; +} +.jstree-rtl .jstree-node { + margin-left: 0; +} +.jstree-rtl .jstree-container-ul > .jstree-node { + margin-right: 0; +} +.jstree-wholerow-ul { + position: relative; + display: inline-block; + min-width: 100%; +} +.jstree-wholerow-ul .jstree-leaf > .jstree-ocl { + cursor: pointer; +} +.jstree-wholerow-ul .jstree-anchor, +.jstree-wholerow-ul .jstree-icon { + position: relative; +} +.jstree-wholerow-ul .jstree-wholerow { + width: 100%; + cursor: pointer; + position: absolute; + left: 0; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.jstree-contextmenu .jstree-anchor { + -webkit-user-select: none; + /* disable selection/Copy of UIWebView */ + -webkit-touch-callout: none; + /* disable the IOS popup when long-press on a link */ + user-select: none; +} +.vakata-context { + display: none; +} +.vakata-context, +.vakata-context ul { + margin: 0; + padding: 2px; + position: absolute; + background: #f5f5f5; + border: 1px solid #979797; + box-shadow: 2px 2px 2px #999999; +} +.vakata-context ul { + list-style: none; + left: 100%; + margin-top: -2.7em; + margin-left: -4px; +} +.vakata-context .vakata-context-right ul { + left: auto; + right: 100%; + margin-left: auto; + margin-right: -4px; +} +.vakata-context li { + list-style: none; +} +.vakata-context li > a { + display: block; + padding: 0 2em 0 2em; + text-decoration: none; + width: auto; + color: black; + white-space: nowrap; + line-height: 2.4em; + text-shadow: 1px 1px 0 white; + border-radius: 1px; +} +.vakata-context li > a:hover { + position: relative; + background-color: #e8eff7; + box-shadow: 0 0 2px #0a6aa1; +} +.vakata-context li > a.vakata-context-parent { + background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw=="); + background-position: right center; + background-repeat: no-repeat; +} +.vakata-context li > a:focus { + outline: 0; +} +.vakata-context .vakata-context-no-icons { + margin-left: 0; +} +.vakata-context .vakata-context-hover > a { + position: relative; + background-color: #e8eff7; + box-shadow: 0 0 2px #0a6aa1; +} +.vakata-context .vakata-context-separator > a, +.vakata-context .vakata-context-separator > a:hover { + background: white; + border: 0; + border-top: 1px solid #e2e3e3; + height: 1px; + min-height: 1px; + max-height: 1px; + padding: 0; + margin: 0 0 0 2.4em; + border-left: 1px solid #e0e0e0; + text-shadow: 0 0 0 transparent; + box-shadow: 0 0 0 transparent; + border-radius: 0; +} +.vakata-context .vakata-contextmenu-disabled a, +.vakata-context .vakata-contextmenu-disabled a:hover { + color: silver; + background-color: transparent; + border: 0; + box-shadow: 0 0 0; +} +.vakata-context .vakata-contextmenu-disabled > a > i { + filter: grayscale(100%); +} +.vakata-context li > a > i { + text-decoration: none; + display: inline-block; + width: 2.4em; + height: 2.4em; + background: transparent; + margin: 0 0 0 -2em; + vertical-align: top; + text-align: center; + line-height: 2.4em; +} +.vakata-context li > a > i:empty { + width: 2.4em; + line-height: 2.4em; +} +.vakata-context li > a .vakata-contextmenu-sep { + display: inline-block; + width: 1px; + height: 2.4em; + background: white; + margin: 0 0.5em 0 0; + border-left: 1px solid #e2e3e3; +} +.vakata-context .vakata-contextmenu-shortcut { + font-size: 0.8em; + color: silver; + opacity: 0.5; + display: none; +} +.vakata-context-rtl ul { + left: auto; + right: 100%; + margin-left: auto; + margin-right: -4px; +} +.vakata-context-rtl li > a.vakata-context-parent { + background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7"); + background-position: left center; + background-repeat: no-repeat; +} +.vakata-context-rtl .vakata-context-separator > a { + margin: 0 2.4em 0 0; + border-left: 0; + border-right: 1px solid #e2e3e3; +} +.vakata-context-rtl .vakata-context-left ul { + right: auto; + left: 100%; + margin-left: -4px; + margin-right: auto; +} +.vakata-context-rtl li > a > i { + margin: 0 -2em 0 0; +} +.vakata-context-rtl li > a .vakata-contextmenu-sep { + margin: 0 0 0 0.5em; + border-left-color: white; + background: #e2e3e3; +} +#jstree-marker { + position: absolute; + top: 0; + left: 0; + margin: -5px 0 0 0; + padding: 0; + border-right: 0; + border-top: 5px solid transparent; + border-bottom: 5px solid transparent; + border-left: 5px solid; + width: 0; + height: 0; + font-size: 0; + line-height: 0; +} +#jstree-dnd { + line-height: 16px; + margin: 0; + padding: 4px; +} +#jstree-dnd .jstree-icon, +#jstree-dnd .jstree-copy { + display: inline-block; + text-decoration: none; + margin: 0 2px 0 0; + padding: 0; + width: 16px; + height: 16px; +} +#jstree-dnd .jstree-ok { + background: green; +} +#jstree-dnd .jstree-er { + background: red; +} +#jstree-dnd .jstree-copy { + margin: 0 2px 0 2px; +} +.jstree-default .jstree-node, +.jstree-default .jstree-icon { + background-repeat: no-repeat; + background-color: transparent; +} +.jstree-default .jstree-anchor, +.jstree-default .jstree-animated, +.jstree-default .jstree-wholerow { + transition: background-color 0.15s, box-shadow 0.15s; +} +.jstree-default .jstree-hovered { + background: #e7f4f9; + border-radius: 2px; + box-shadow: inset 0 0 1px #cccccc; +} +.jstree-default .jstree-context { + background: #e7f4f9; + border-radius: 2px; + box-shadow: inset 0 0 1px #cccccc; +} +.jstree-default .jstree-clicked { + background: #beebff; + border-radius: 2px; + box-shadow: inset 0 0 1px #999999; +} +.jstree-default .jstree-no-icons .jstree-anchor > .jstree-themeicon { + display: none; +} +.jstree-default .jstree-disabled { + background: transparent; + color: #666666; +} +.jstree-default .jstree-disabled.jstree-hovered { + background: transparent; + box-shadow: none; +} +.jstree-default .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default .jstree-disabled > .jstree-icon { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default .jstree-search { + font-style: italic; + color: #8b0000; + font-weight: bold; +} +.jstree-default .jstree-no-checkboxes .jstree-checkbox { + display: none !important; +} +.jstree-default.jstree-checkbox-no-clicked .jstree-clicked { + background: transparent; + box-shadow: none; +} +.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered { + background: #e7f4f9; +} +.jstree-default.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked { + background: transparent; +} +.jstree-default.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered { + background: #e7f4f9; +} +.jstree-default > .jstree-striped { + min-width: 100%; + display: inline-block; + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat; +} +.jstree-default > .jstree-wholerow-ul .jstree-hovered, +.jstree-default > .jstree-wholerow-ul .jstree-clicked { + background: transparent; + box-shadow: none; + border-radius: 0; +} +.jstree-default .jstree-wholerow { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +.jstree-default .jstree-wholerow-hovered { + background: #e7f4f9; +} +.jstree-default .jstree-wholerow-clicked { + background: #beebff; + background: -webkit-linear-gradient(top, #beebff 0%, #a8e4ff 100%); + background: linear-gradient(to bottom, #beebff 0%, #a8e4ff 100%); +} +.jstree-default .jstree-node { + min-height: 24px; + line-height: 24px; + margin-left: 24px; + min-width: 24px; +} +.jstree-default .jstree-anchor { + line-height: 24px; + height: 24px; +} +.jstree-default .jstree-icon { + width: 24px; + height: 24px; + line-height: 24px; +} +.jstree-default .jstree-icon:empty { + width: 24px; + height: 24px; + line-height: 24px; +} +.jstree-default.jstree-rtl .jstree-node { + margin-right: 24px; +} +.jstree-default .jstree-wholerow { + height: 24px; +} +.jstree-default .jstree-node, +.jstree-default .jstree-icon { + background-image: url("32px.png"); +} +.jstree-default .jstree-node { + background-position: -292px -4px; + background-repeat: repeat-y; +} +.jstree-default .jstree-last { + background: transparent; +} +.jstree-default .jstree-open > .jstree-ocl { + background-position: -132px -4px; +} +.jstree-default .jstree-closed > .jstree-ocl { + background-position: -100px -4px; +} +.jstree-default .jstree-leaf > .jstree-ocl { + background-position: -68px -4px; +} +.jstree-default .jstree-themeicon { + background-position: -260px -4px; +} +.jstree-default > .jstree-no-dots .jstree-node, +.jstree-default > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -36px -4px; +} +.jstree-default > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -4px -4px; +} +.jstree-default .jstree-disabled { + background: transparent; +} +.jstree-default .jstree-disabled.jstree-hovered { + background: transparent; +} +.jstree-default .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default .jstree-checkbox { + background-position: -164px -4px; +} +.jstree-default .jstree-checkbox:hover { + background-position: -164px -36px; +} +.jstree-default.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, +.jstree-default .jstree-checked > .jstree-checkbox { + background-position: -228px -4px; +} +.jstree-default.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, +.jstree-default .jstree-checked > .jstree-checkbox:hover { + background-position: -228px -36px; +} +.jstree-default .jstree-anchor > .jstree-undetermined { + background-position: -196px -4px; +} +.jstree-default .jstree-anchor > .jstree-undetermined:hover { + background-position: -196px -36px; +} +.jstree-default .jstree-checkbox-disabled { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default > .jstree-striped { + background-size: auto 48px; +} +.jstree-default.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); + background-position: 100% 1px; + background-repeat: repeat-y; +} +.jstree-default.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default.jstree-rtl .jstree-open > .jstree-ocl { + background-position: -132px -36px; +} +.jstree-default.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -100px -36px; +} +.jstree-default.jstree-rtl .jstree-leaf > .jstree-ocl { + background-position: -68px -36px; +} +.jstree-default.jstree-rtl > .jstree-no-dots .jstree-node, +.jstree-default.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -36px -36px; +} +.jstree-default.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -4px -36px; +} +.jstree-default .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; +} +.jstree-default > .jstree-container-ul .jstree-loading > .jstree-ocl { + background: url("throbber.gif") center center no-repeat; +} +.jstree-default .jstree-file { + background: url("32px.png") -100px -68px no-repeat; +} +.jstree-default .jstree-folder { + background: url("32px.png") -260px -4px no-repeat; +} +.jstree-default > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; +} +#jstree-dnd.jstree-default { + line-height: 24px; + padding: 0 4px; +} +#jstree-dnd.jstree-default .jstree-ok, +#jstree-dnd.jstree-default .jstree-er { + background-image: url("32px.png"); + background-repeat: no-repeat; + background-color: transparent; +} +#jstree-dnd.jstree-default i { + background: transparent; + width: 24px; + height: 24px; + line-height: 24px; +} +#jstree-dnd.jstree-default .jstree-ok { + background-position: -4px -68px; +} +#jstree-dnd.jstree-default .jstree-er { + background-position: -36px -68px; +} +.jstree-default .jstree-ellipsis { + overflow: hidden; +} +.jstree-default .jstree-ellipsis .jstree-anchor { + width: calc(100% - 29px); + text-overflow: ellipsis; + overflow: hidden; +} +.jstree-default.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); +} +.jstree-default.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default-small .jstree-node { + min-height: 18px; + line-height: 18px; + margin-left: 18px; + min-width: 18px; +} +.jstree-default-small .jstree-anchor { + line-height: 18px; + height: 18px; +} +.jstree-default-small .jstree-icon { + width: 18px; + height: 18px; + line-height: 18px; +} +.jstree-default-small .jstree-icon:empty { + width: 18px; + height: 18px; + line-height: 18px; +} +.jstree-default-small.jstree-rtl .jstree-node { + margin-right: 18px; +} +.jstree-default-small .jstree-wholerow { + height: 18px; +} +.jstree-default-small .jstree-node, +.jstree-default-small .jstree-icon { + background-image: url("32px.png"); +} +.jstree-default-small .jstree-node { + background-position: -295px -7px; + background-repeat: repeat-y; +} +.jstree-default-small .jstree-last { + background: transparent; +} +.jstree-default-small .jstree-open > .jstree-ocl { + background-position: -135px -7px; +} +.jstree-default-small .jstree-closed > .jstree-ocl { + background-position: -103px -7px; +} +.jstree-default-small .jstree-leaf > .jstree-ocl { + background-position: -71px -7px; +} +.jstree-default-small .jstree-themeicon { + background-position: -263px -7px; +} +.jstree-default-small > .jstree-no-dots .jstree-node, +.jstree-default-small > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-small > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -39px -7px; +} +.jstree-default-small > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -7px -7px; +} +.jstree-default-small .jstree-disabled { + background: transparent; +} +.jstree-default-small .jstree-disabled.jstree-hovered { + background: transparent; +} +.jstree-default-small .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default-small .jstree-checkbox { + background-position: -167px -7px; +} +.jstree-default-small .jstree-checkbox:hover { + background-position: -167px -39px; +} +.jstree-default-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, +.jstree-default-small .jstree-checked > .jstree-checkbox { + background-position: -231px -7px; +} +.jstree-default-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, +.jstree-default-small .jstree-checked > .jstree-checkbox:hover { + background-position: -231px -39px; +} +.jstree-default-small .jstree-anchor > .jstree-undetermined { + background-position: -199px -7px; +} +.jstree-default-small .jstree-anchor > .jstree-undetermined:hover { + background-position: -199px -39px; +} +.jstree-default-small .jstree-checkbox-disabled { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default-small > .jstree-striped { + background-size: auto 36px; +} +.jstree-default-small.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); + background-position: 100% 1px; + background-repeat: repeat-y; +} +.jstree-default-small.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default-small.jstree-rtl .jstree-open > .jstree-ocl { + background-position: -135px -39px; +} +.jstree-default-small.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -103px -39px; +} +.jstree-default-small.jstree-rtl .jstree-leaf > .jstree-ocl { + background-position: -71px -39px; +} +.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-node, +.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -39px -39px; +} +.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -7px -39px; +} +.jstree-default-small .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; +} +.jstree-default-small > .jstree-container-ul .jstree-loading > .jstree-ocl { + background: url("throbber.gif") center center no-repeat; +} +.jstree-default-small .jstree-file { + background: url("32px.png") -103px -71px no-repeat; +} +.jstree-default-small .jstree-folder { + background: url("32px.png") -263px -7px no-repeat; +} +.jstree-default-small > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; +} +#jstree-dnd.jstree-default-small { + line-height: 18px; + padding: 0 4px; +} +#jstree-dnd.jstree-default-small .jstree-ok, +#jstree-dnd.jstree-default-small .jstree-er { + background-image: url("32px.png"); + background-repeat: no-repeat; + background-color: transparent; +} +#jstree-dnd.jstree-default-small i { + background: transparent; + width: 18px; + height: 18px; + line-height: 18px; +} +#jstree-dnd.jstree-default-small .jstree-ok { + background-position: -7px -71px; +} +#jstree-dnd.jstree-default-small .jstree-er { + background-position: -39px -71px; +} +.jstree-default-small .jstree-ellipsis { + overflow: hidden; +} +.jstree-default-small .jstree-ellipsis .jstree-anchor { + width: calc(100% - 23px); + text-overflow: ellipsis; + overflow: hidden; +} +.jstree-default-small.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg=="); +} +.jstree-default-small.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default-large .jstree-node { + min-height: 32px; + line-height: 32px; + margin-left: 32px; + min-width: 32px; +} +.jstree-default-large .jstree-anchor { + line-height: 32px; + height: 32px; +} +.jstree-default-large .jstree-icon { + width: 32px; + height: 32px; + line-height: 32px; +} +.jstree-default-large .jstree-icon:empty { + width: 32px; + height: 32px; + line-height: 32px; +} +.jstree-default-large.jstree-rtl .jstree-node { + margin-right: 32px; +} +.jstree-default-large .jstree-wholerow { + height: 32px; +} +.jstree-default-large .jstree-node, +.jstree-default-large .jstree-icon { + background-image: url("32px.png"); +} +.jstree-default-large .jstree-node { + background-position: -288px 0px; + background-repeat: repeat-y; +} +.jstree-default-large .jstree-last { + background: transparent; +} +.jstree-default-large .jstree-open > .jstree-ocl { + background-position: -128px 0px; +} +.jstree-default-large .jstree-closed > .jstree-ocl { + background-position: -96px 0px; +} +.jstree-default-large .jstree-leaf > .jstree-ocl { + background-position: -64px 0px; +} +.jstree-default-large .jstree-themeicon { + background-position: -256px 0px; +} +.jstree-default-large > .jstree-no-dots .jstree-node, +.jstree-default-large > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-large > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -32px 0px; +} +.jstree-default-large > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: 0px 0px; +} +.jstree-default-large .jstree-disabled { + background: transparent; +} +.jstree-default-large .jstree-disabled.jstree-hovered { + background: transparent; +} +.jstree-default-large .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default-large .jstree-checkbox { + background-position: -160px 0px; +} +.jstree-default-large .jstree-checkbox:hover { + background-position: -160px -32px; +} +.jstree-default-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, +.jstree-default-large .jstree-checked > .jstree-checkbox { + background-position: -224px 0px; +} +.jstree-default-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, +.jstree-default-large .jstree-checked > .jstree-checkbox:hover { + background-position: -224px -32px; +} +.jstree-default-large .jstree-anchor > .jstree-undetermined { + background-position: -192px 0px; +} +.jstree-default-large .jstree-anchor > .jstree-undetermined:hover { + background-position: -192px -32px; +} +.jstree-default-large .jstree-checkbox-disabled { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default-large > .jstree-striped { + background-size: auto 64px; +} +.jstree-default-large.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); + background-position: 100% 1px; + background-repeat: repeat-y; +} +.jstree-default-large.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default-large.jstree-rtl .jstree-open > .jstree-ocl { + background-position: -128px -32px; +} +.jstree-default-large.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -96px -32px; +} +.jstree-default-large.jstree-rtl .jstree-leaf > .jstree-ocl { + background-position: -64px -32px; +} +.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-node, +.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -32px -32px; +} +.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: 0px -32px; +} +.jstree-default-large .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; +} +.jstree-default-large > .jstree-container-ul .jstree-loading > .jstree-ocl { + background: url("throbber.gif") center center no-repeat; +} +.jstree-default-large .jstree-file { + background: url("32px.png") -96px -64px no-repeat; +} +.jstree-default-large .jstree-folder { + background: url("32px.png") -256px 0px no-repeat; +} +.jstree-default-large > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; +} +#jstree-dnd.jstree-default-large { + line-height: 32px; + padding: 0 4px; +} +#jstree-dnd.jstree-default-large .jstree-ok, +#jstree-dnd.jstree-default-large .jstree-er { + background-image: url("32px.png"); + background-repeat: no-repeat; + background-color: transparent; +} +#jstree-dnd.jstree-default-large i { + background: transparent; + width: 32px; + height: 32px; + line-height: 32px; +} +#jstree-dnd.jstree-default-large .jstree-ok { + background-position: 0px -64px; +} +#jstree-dnd.jstree-default-large .jstree-er { + background-position: -32px -64px; +} +.jstree-default-large .jstree-ellipsis { + overflow: hidden; +} +.jstree-default-large .jstree-ellipsis .jstree-anchor { + width: calc(100% - 37px); + text-overflow: ellipsis; + overflow: hidden; +} +.jstree-default-large.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg=="); +} +.jstree-default-large.jstree-rtl .jstree-last { + background: transparent; +} +@media (max-width: 768px) { + #jstree-dnd.jstree-dnd-responsive { + line-height: 40px; + font-weight: bold; + font-size: 1.1em; + text-shadow: 1px 1px white; + } + #jstree-dnd.jstree-dnd-responsive > i { + background: transparent; + width: 40px; + height: 40px; + } + #jstree-dnd.jstree-dnd-responsive > .jstree-ok { + background-image: url("40px.png"); + background-position: 0 -200px; + background-size: 120px 240px; + } + #jstree-dnd.jstree-dnd-responsive > .jstree-er { + background-image: url("40px.png"); + background-position: -40px -200px; + background-size: 120px 240px; + } + #jstree-marker.jstree-dnd-responsive { + border-left-width: 10px; + border-top-width: 10px; + border-bottom-width: 10px; + margin-top: -10px; + } +} +@media (max-width: 768px) { + .jstree-default-responsive { + /* + .jstree-open > .jstree-ocl, + .jstree-closed > .jstree-ocl { border-radius:20px; background-color:white; } + */ + } + .jstree-default-responsive .jstree-icon { + background-image: url("40px.png"); + } + .jstree-default-responsive .jstree-node, + .jstree-default-responsive .jstree-leaf > .jstree-ocl { + background: transparent; + } + .jstree-default-responsive .jstree-node { + min-height: 40px; + line-height: 40px; + margin-left: 40px; + min-width: 40px; + white-space: nowrap; + } + .jstree-default-responsive .jstree-anchor { + line-height: 40px; + height: 40px; + } + .jstree-default-responsive .jstree-icon, + .jstree-default-responsive .jstree-icon:empty { + width: 40px; + height: 40px; + line-height: 40px; + } + .jstree-default-responsive > .jstree-container-ul > .jstree-node { + margin-left: 0; + } + .jstree-default-responsive.jstree-rtl .jstree-node { + margin-left: 0; + margin-right: 40px; + background: transparent; + } + .jstree-default-responsive.jstree-rtl .jstree-container-ul > .jstree-node { + margin-right: 0; + } + .jstree-default-responsive .jstree-ocl, + .jstree-default-responsive .jstree-themeicon, + .jstree-default-responsive .jstree-checkbox { + background-size: 120px 240px; + } + .jstree-default-responsive .jstree-leaf > .jstree-ocl, + .jstree-default-responsive.jstree-rtl .jstree-leaf > .jstree-ocl { + background: transparent; + } + .jstree-default-responsive .jstree-open > .jstree-ocl { + background-position: 0 0 !important; + } + .jstree-default-responsive .jstree-closed > .jstree-ocl { + background-position: 0 -40px !important; + } + .jstree-default-responsive.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -40px 0 !important; + } + .jstree-default-responsive .jstree-themeicon { + background-position: -40px -40px; + } + .jstree-default-responsive .jstree-checkbox, + .jstree-default-responsive .jstree-checkbox:hover { + background-position: -40px -80px; + } + .jstree-default-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox, + .jstree-default-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover, + .jstree-default-responsive .jstree-checked > .jstree-checkbox, + .jstree-default-responsive .jstree-checked > .jstree-checkbox:hover { + background-position: 0 -80px; + } + .jstree-default-responsive .jstree-anchor > .jstree-undetermined, + .jstree-default-responsive .jstree-anchor > .jstree-undetermined:hover { + background-position: 0 -120px; + } + .jstree-default-responsive .jstree-anchor { + font-weight: bold; + font-size: 1.1em; + text-shadow: 1px 1px white; + } + .jstree-default-responsive > .jstree-striped { + background: transparent; + } + .jstree-default-responsive .jstree-wholerow { + border-top: 1px solid rgba(255, 255, 255, 0.7); + border-bottom: 1px solid rgba(64, 64, 64, 0.2); + background: #ebebeb; + height: 40px; + } + .jstree-default-responsive .jstree-wholerow-hovered { + background: #e7f4f9; + } + .jstree-default-responsive .jstree-wholerow-clicked { + background: #beebff; + } + .jstree-default-responsive .jstree-children .jstree-last > .jstree-wholerow { + box-shadow: inset 0 -6px 3px -5px #666666; + } + .jstree-default-responsive .jstree-children .jstree-open > .jstree-wholerow { + box-shadow: inset 0 6px 3px -5px #666666; + border-top: 0; + } + .jstree-default-responsive .jstree-children .jstree-open + .jstree-open { + box-shadow: none; + } + .jstree-default-responsive .jstree-node, + .jstree-default-responsive .jstree-icon, + .jstree-default-responsive .jstree-node > .jstree-ocl, + .jstree-default-responsive .jstree-themeicon, + .jstree-default-responsive .jstree-checkbox { + background-image: url("40px.png"); + background-size: 120px 240px; + } + .jstree-default-responsive .jstree-node { + background-position: -80px 0; + background-repeat: repeat-y; + } + .jstree-default-responsive .jstree-last { + background: transparent; + } + .jstree-default-responsive .jstree-leaf > .jstree-ocl { + background-position: -40px -120px; + } + .jstree-default-responsive .jstree-last > .jstree-ocl { + background-position: -40px -160px; + } + .jstree-default-responsive .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + background-position: 0 0; + } + .jstree-default-responsive .jstree-file { + background: url("40px.png") 0 -160px no-repeat; + background-size: 120px 240px; + } + .jstree-default-responsive .jstree-folder { + background: url("40px.png") -40px -40px no-repeat; + background-size: 120px 240px; + } + .jstree-default-responsive > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; + } +} diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/style.min.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/style.min.css new file mode 100644 index 00000000..0c6897a9 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/style.min.css @@ -0,0 +1 @@ +.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:black;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-hidden,.jstree-node.jstree-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jstree-contextmenu .jstree-anchor{-webkit-user-select:none;-webkit-touch-callout:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;box-shadow:2px 2px 2px #999999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none}.vakata-context li>a{display:block;padding:0 2em 0 2em;text-decoration:none;width:auto;color:black;white-space:nowrap;line-height:2.4em;text-shadow:1px 1px 0 white;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==");background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-no-icons{margin-left:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:white;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;text-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context .vakata-contextmenu-disabled>a>i{filter:grayscale(100%)}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:transparent;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:white;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7");background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:white;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px 0 2px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-default .jstree-anchor,.jstree-default .jstree-animated,.jstree-default .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default .jstree-hovered{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #cccccc}.jstree-default .jstree-context{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #cccccc}.jstree-default .jstree-clicked{background:#beebff;border-radius:2px;box-shadow:inset 0 0 1px #999999}.jstree-default .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default .jstree-disabled{background:transparent;color:#666666}.jstree-default .jstree-disabled.jstree-hovered{background:transparent;box-shadow:none}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default .jstree-search{font-style:italic;color:#8b0000;font-weight:bold}.jstree-default .jstree-no-checkboxes .jstree-checkbox{display:none !important}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked{background:transparent;box-shadow:none}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#e7f4f9}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:transparent}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#e7f4f9}.jstree-default>.jstree-striped{min-width:100%;display:inline-block;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat}.jstree-default>.jstree-wholerow-ul .jstree-hovered,.jstree-default>.jstree-wholerow-ul .jstree-clicked{background:transparent;box-shadow:none;border-radius:0}.jstree-default .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default .jstree-wholerow-clicked{background:#beebff;background:-webkit-linear-gradient(top, #beebff 0, #a8e4ff 100%);background:linear-gradient(to bottom, #beebff 0, #a8e4ff 100%)}.jstree-default .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default .jstree-anchor{line-height:24px;height:24px}.jstree-default .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default.jstree-rtl .jstree-node{margin-right:24px}.jstree-default .jstree-wholerow{height:24px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-image:url("32px.png")}.jstree-default .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default .jstree-last{background:transparent}.jstree-default .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default .jstree-themeicon{background-position:-260px -4px}.jstree-default>.jstree-no-dots .jstree-node,.jstree-default>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default .jstree-disabled{background:transparent}.jstree-default .jstree-disabled.jstree-hovered{background:transparent}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-checkbox{background-position:-164px -4px}.jstree-default .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default .jstree-checked>.jstree-checkbox{background-position:-228px -4px}.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default .jstree-checked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default>.jstree-striped{background-size:auto 48px}.jstree-default.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");background-position:100% 1px;background-repeat:repeat-y}.jstree-default.jstree-rtl .jstree-last{background:transparent}.jstree-default.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url("throbber.gif") center center no-repeat}.jstree-default .jstree-file{background:url("32px.png") -100px -68px no-repeat}.jstree-default .jstree-folder{background:url("32px.png") -260px -4px no-repeat}.jstree-default>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default{line-height:24px;padding:0 4px}#jstree-dnd.jstree-default .jstree-ok,#jstree-dnd.jstree-default .jstree-er{background-image:url("32px.png");background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default i{background:transparent;width:24px;height:24px;line-height:24px}#jstree-dnd.jstree-default .jstree-ok{background-position:-4px -68px}#jstree-dnd.jstree-default .jstree-er{background-position:-36px -68px}.jstree-default .jstree-ellipsis{overflow:hidden}.jstree-default .jstree-ellipsis .jstree-anchor{width:calc(100% - 29px);text-overflow:ellipsis;overflow:hidden}.jstree-default.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==")}.jstree-default.jstree-rtl .jstree-last{background:transparent}.jstree-default-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-small .jstree-wholerow{height:18px}.jstree-default-small .jstree-node,.jstree-default-small .jstree-icon{background-image:url("32px.png")}.jstree-default-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-small .jstree-last{background:transparent}.jstree-default-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-small .jstree-themeicon{background-position:-263px -7px}.jstree-default-small>.jstree-no-dots .jstree-node,.jstree-default-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-small .jstree-disabled{background:transparent}.jstree-default-small .jstree-disabled.jstree-hovered{background:transparent}.jstree-default-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-small .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-small>.jstree-striped{background-size:auto 36px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");background-position:100% 1px;background-repeat:repeat-y}.jstree-default-small.jstree-rtl .jstree-last{background:transparent}.jstree-default-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-small .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url("throbber.gif") center center no-repeat}.jstree-default-small .jstree-file{background:url("32px.png") -103px -71px no-repeat}.jstree-default-small .jstree-folder{background:url("32px.png") -263px -7px no-repeat}.jstree-default-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-default-small .jstree-ok,#jstree-dnd.jstree-default-small .jstree-er{background-image:url("32px.png");background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-small i{background:transparent;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-default-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-default-small .jstree-er{background-position:-39px -71px}.jstree-default-small .jstree-ellipsis{overflow:hidden}.jstree-default-small .jstree-ellipsis .jstree-anchor{width:calc(100% - 23px);text-overflow:ellipsis;overflow:hidden}.jstree-default-small.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==")}.jstree-default-small.jstree-rtl .jstree-last{background:transparent}.jstree-default-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-large .jstree-wholerow{height:32px}.jstree-default-large .jstree-node,.jstree-default-large .jstree-icon{background-image:url("32px.png")}.jstree-default-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-large .jstree-last{background:transparent}.jstree-default-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-large .jstree-themeicon{background-position:-256px 0}.jstree-default-large>.jstree-no-dots .jstree-node,.jstree-default-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-large .jstree-disabled{background:transparent}.jstree-default-large .jstree-disabled.jstree-hovered{background:transparent}.jstree-default-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-large .jstree-checkbox{background-position:-160px 0}.jstree-default-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-large .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-large>.jstree-striped{background-size:auto 64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");background-position:100% 1px;background-repeat:repeat-y}.jstree-default-large.jstree-rtl .jstree-last{background:transparent}.jstree-default-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-large .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url("throbber.gif") center center no-repeat}.jstree-default-large .jstree-file{background:url("32px.png") -96px -64px no-repeat}.jstree-default-large .jstree-folder{background:url("32px.png") -256px 0 no-repeat}.jstree-default-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-default-large .jstree-ok,#jstree-dnd.jstree-default-large .jstree-er{background-image:url("32px.png");background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-large i{background:transparent;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-default-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-default-large .jstree-er{background-position:-32px -64px}.jstree-default-large .jstree-ellipsis{overflow:hidden}.jstree-default-large .jstree-ellipsis .jstree-anchor{width:calc(100% - 37px);text-overflow:ellipsis;overflow:hidden}.jstree-default-large.jstree-rtl .jstree-node{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==")}.jstree-default-large.jstree-rtl .jstree-last{background:transparent}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:40px;font-weight:bold;font-size:1.1em;text-shadow:1px 1px white}#jstree-dnd.jstree-dnd-responsive>i{background:transparent;width:40px;height:40px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url("40px.png");background-position:0 -200px;background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url("40px.png");background-position:-40px -200px;background-size:120px 240px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-default-responsive .jstree-icon{background-image:url("40px.png")}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px;background:transparent}.jstree-default-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-responsive .jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-size:120px 240px}.jstree-default-responsive .jstree-leaf>.jstree-ocl,.jstree-default-responsive.jstree-rtl .jstree-leaf>.jstree-ocl{background:transparent}.jstree-default-responsive .jstree-open>.jstree-ocl{background-position:0 0 !important}.jstree-default-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px !important}.jstree-default-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0 !important}.jstree-default-responsive .jstree-themeicon{background-position:-40px -40px}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-responsive .jstree-checked>.jstree-checkbox,.jstree-default-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-responsive .jstree-anchor{font-weight:bold;font-size:1.1em;text-shadow:1px 1px white}.jstree-default-responsive>.jstree-striped{background:transparent}.jstree-default-responsive .jstree-wholerow{border-top:1px solid rgba(255,255,255,0.7);border-bottom:1px solid rgba(64,64,64,0.2);background:#ebebeb;height:40px}.jstree-default-responsive .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default-responsive .jstree-wholerow-clicked{background:#beebff}.jstree-default-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #666666}.jstree-default-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #666666;border-top:0}.jstree-default-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-node>.jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-image:url("40px.png");background-size:120px 240px}.jstree-default-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-responsive .jstree-last{background:transparent}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-responsive .jstree-file{background:url("40px.png") 0 -160px no-repeat;background-size:120px 240px}.jstree-default-responsive .jstree-folder{background:url("40px.png") -40px -40px no-repeat;background-size:120px 240px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}} \ No newline at end of file diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/throbber.gif b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/jstree/themes/default/throbber.gif new file mode 100644 index 0000000000000000000000000000000000000000..cf06c1ad0f00be54b10f73e03c11d182d411fad1 GIT binary patch literal 1464 zcmZvceN0nV9EQ&=r=^8TFHo@{ANQ70%LFN(7Ima80;R!PL9rm3)*-a&w4%$!u$DOG!y_yWJ*}DKj&Z!{KyycdONE2;suQ z0>0oY%h;NiE|O;?tl@hho}Kt#A?am%R7ds{W5+Z{)R=0oO1J-@s(6j&K*>RXzl3BT zzyL9xm7Yix2%*;PtW~c(I@)n*B9Lt|nX$@5x^P+w+`!wx60-9`uo!Bs<$^EHs)-UfnV9p;}KqjClm$MVbM$&>WbPV&ij*ka|M=U@X9sGyLDa1jBO)0C&2bFU5^USyT%ow`Y6z3+!yPy*Q>C*G{34S5-7|bGDZQ z;p6Czucr+YRHzuORgJ5K?Gb~I)~a}v9rie@5~I_JSG?&Y0H19O93PH4T#q0ADD;!P zk^f0VJ^TO`dJ=PNij?y~;w)~e*CcK*ZY52{2MQ$)2O(_;C7G%3Zo-!*0`gZhYhSL< znt;k5!N~ERdLnRmTxxns-8=KZykgLf4(wIkTqMjv3H^P0 z0}wE)29!5I&o+~aFX!~k)T{bi(Dhe zIH87(qxAGc0w`-lB2B++2#J?l`gGWV+B}h2SM(t^bWT#g9>Fcs52mlk>PRPILR$oj*LlzNEnI}n!K<3 z)aPyCTC2f!DRM}V09yub^?|M=!+Y@mELj`_)TX%OO>kCHio!~( znD>rK?x{ZA<6qyz3f`ZjI~5!kK{oSzRuM%1ivpD2V-;hMHZiNKhH-%|h?1H9lphlk zFgW#r;6}N_Nt!r84^6u^hv5%Xq^WPf0T0|iW8f(hZ6Nk)qHY$>y?>U{G)$G{h>Nyn zpO@v$E*p6=g#Y1VcDTfCbn@Au-m=SFxmH%8-f*3fsjN8kedp=8= GitHub Actions ([#2606](https://github.com/PrismJS/prism/issues/2606)) [`69132045`](https://github.com/PrismJS/prism/commit/69132045) + * Added Dangerfile and provide bundle size info ([#2608](https://github.com/PrismJS/prism/issues/2608)) [`9df20c5e`](https://github.com/PrismJS/prism/commit/9df20c5e) + * New `start` script to start local server ([#2491](https://github.com/PrismJS/prism/issues/2491)) [`0604793c`](https://github.com/PrismJS/prism/commit/0604793c) + * Added test for exponential backtracking ([#2590](https://github.com/PrismJS/prism/issues/2590)) [`05afbb10`](https://github.com/PrismJS/prism/commit/05afbb10) + * Added test for polynomial backtracking ([#2597](https://github.com/PrismJS/prism/issues/2597)) [`e644178b`](https://github.com/PrismJS/prism/commit/e644178b) + * Tests: Better pretty print ([#2600](https://github.com/PrismJS/prism/issues/2600)) [`8bfcc819`](https://github.com/PrismJS/prism/commit/8bfcc819) + * Tests: Fixed sorted language list test ([#2623](https://github.com/PrismJS/prism/issues/2623)) [`2d3a1267`](https://github.com/PrismJS/prism/commit/2d3a1267) + * Tests: Stricter pattern for nice-token-names test ([#2588](https://github.com/PrismJS/prism/issues/2588)) [`0df60be1`](https://github.com/PrismJS/prism/commit/0df60be1) + * Tests: Added strict checks for `Prism.languages.extend` ([#2572](https://github.com/PrismJS/prism/issues/2572)) [`8828500e`](https://github.com/PrismJS/prism/commit/8828500e) +* __Website__ + * Test page: Added "Share" option ([#2575](https://github.com/PrismJS/prism/issues/2575)) [`b5f4f10e`](https://github.com/PrismJS/prism/commit/b5f4f10e) + * Test page: Don't trigger ad-blockers with class ([#2677](https://github.com/PrismJS/prism/issues/2677)) [`df0738e9`](https://github.com/PrismJS/prism/commit/df0738e9) + * Thousands -> millions [`9f82de50`](https://github.com/PrismJS/prism/commit/9f82de50) + * Unescaped Markup: More doc regarding comments ([#2652](https://github.com/PrismJS/prism/issues/2652)) [`add3736a`](https://github.com/PrismJS/prism/commit/add3736a) + * Website: Added and updated documentation ([#2654](https://github.com/PrismJS/prism/issues/2654)) [`8e660495`](https://github.com/PrismJS/prism/commit/8e660495) + * Website: Updated and improved guide on "Extending Prism" page ([#2586](https://github.com/PrismJS/prism/issues/2586)) [`8e1f38ff`](https://github.com/PrismJS/prism/commit/8e1f38ff) + +## 1.22.0 (2020-10-10) + +### New components + +* __Birb__ ([#2542](https://github.com/PrismJS/prism/issues/2542)) [`4d31e22a`](https://github.com/PrismJS/prism/commit/4d31e22a) +* __BSL (1C:Enterprise)__ & __OneScript__ ([#2520](https://github.com/PrismJS/prism/issues/2520)) [`5c33f0bb`](https://github.com/PrismJS/prism/commit/5c33f0bb) +* __MongoDB__ ([#2518](https://github.com/PrismJS/prism/issues/2518)) [`004eaa74`](https://github.com/PrismJS/prism/commit/004eaa74) +* __Naninovel Script__ ([#2494](https://github.com/PrismJS/prism/issues/2494)) [`388ad996`](https://github.com/PrismJS/prism/commit/388ad996) +* __PureScript__ ([#2526](https://github.com/PrismJS/prism/issues/2526)) [`ad748a00`](https://github.com/PrismJS/prism/commit/ad748a00) +* __SML__ & __SML/NJ__ ([#2537](https://github.com/PrismJS/prism/issues/2537)) [`cb75d9e2`](https://github.com/PrismJS/prism/commit/cb75d9e2) +* __Stan__ ([#2490](https://github.com/PrismJS/prism/issues/2490)) [`2da2beba`](https://github.com/PrismJS/prism/commit/2da2beba) +* __TypoScript__ & __TSConfig__ ([#2505](https://github.com/PrismJS/prism/issues/2505)) [`bf115f47`](https://github.com/PrismJS/prism/commit/bf115f47) + +### Updated components + +* Removed duplicate alternatives in various languages ([#2524](https://github.com/PrismJS/prism/issues/2524)) [`fa2225ff`](https://github.com/PrismJS/prism/commit/fa2225ff) +* __Haskell__ + * Improvements ([#2535](https://github.com/PrismJS/prism/issues/2535)) [`e023044c`](https://github.com/PrismJS/prism/commit/e023044c) +* __JS Extras__ + * Highlight import and export bindings ([#2533](https://github.com/PrismJS/prism/issues/2533)) [`c51ababb`](https://github.com/PrismJS/prism/commit/c51ababb) + * Added control-flow keywords ([#2529](https://github.com/PrismJS/prism/issues/2529)) [`bcef22af`](https://github.com/PrismJS/prism/commit/bcef22af) +* __PHP__ + * Added `match` keyword (PHP 8.0) ([#2574](https://github.com/PrismJS/prism/issues/2574)) [`1761513e`](https://github.com/PrismJS/prism/commit/1761513e) +* __Processing__ + * Fixed function pattern ([#2564](https://github.com/PrismJS/prism/issues/2564)) [`35cbc02f`](https://github.com/PrismJS/prism/commit/35cbc02f) +* __Regex__ + * Changed how languages embed regexes ([#2532](https://github.com/PrismJS/prism/issues/2532)) [`f62ca787`](https://github.com/PrismJS/prism/commit/f62ca787) +* __Rust__ + * Fixed Unicode char literals ([#2550](https://github.com/PrismJS/prism/issues/2550)) [`3b4f14ca`](https://github.com/PrismJS/prism/commit/3b4f14ca) +* __Scheme__ + * Added support for R7RS syntax ([#2525](https://github.com/PrismJS/prism/issues/2525)) [`e4f6ccac`](https://github.com/PrismJS/prism/commit/e4f6ccac) +* __Shell session__ + * Added aliases ([#2548](https://github.com/PrismJS/prism/issues/2548)) [`bfb36748`](https://github.com/PrismJS/prism/commit/bfb36748) + * Highlight all commands after the start of any Heredoc string ([#2509](https://github.com/PrismJS/prism/issues/2509)) [`6c921801`](https://github.com/PrismJS/prism/commit/6c921801) +* __YAML__ + * Improved key pattern ([#2561](https://github.com/PrismJS/prism/issues/2561)) [`59853a52`](https://github.com/PrismJS/prism/commit/59853a52) + +### Updated plugins + +* __Autoloader__ + * Fixed file detection regexes ([#2549](https://github.com/PrismJS/prism/issues/2549)) [`d36ea993`](https://github.com/PrismJS/prism/commit/d36ea993) +* __Match braces__ + * Fixed JS interpolation punctuation ([#2541](https://github.com/PrismJS/prism/issues/2541)) [`6b47133d`](https://github.com/PrismJS/prism/commit/6b47133d) +* __Show Language__ + * Added title for plain text ([#2555](https://github.com/PrismJS/prism/issues/2555)) [`a409245e`](https://github.com/PrismJS/prism/commit/a409245e) + +### Other + +* Tests: Added an option to accept the actual token stream ([#2515](https://github.com/PrismJS/prism/issues/2515)) [`bafab634`](https://github.com/PrismJS/prism/commit/bafab634) +* __Core__ + * Docs: Minor improvement ([#2513](https://github.com/PrismJS/prism/issues/2513)) [`206dc80f`](https://github.com/PrismJS/prism/commit/206dc80f) +* __Infrastructure__ + * JSDoc: Fixed line ends ([#2523](https://github.com/PrismJS/prism/issues/2523)) [`bf169e5f`](https://github.com/PrismJS/prism/commit/bf169e5f) +* __Website__ + * Website: Added new SB101 tutorial replacing the Crambler one ([#2576](https://github.com/PrismJS/prism/issues/2576)) [`655f985c`](https://github.com/PrismJS/prism/commit/655f985c) + * Website: Fix typo on homepage by adding missing word add ([#2570](https://github.com/PrismJS/prism/issues/2570)) [`8ae6a4ba`](https://github.com/PrismJS/prism/commit/8ae6a4ba) + * Custom class: Improved doc ([#2512](https://github.com/PrismJS/prism/issues/2512)) [`5ad6cb23`](https://github.com/PrismJS/prism/commit/5ad6cb23) + +## 1.21.0 (2020-08-06) + +### New components + +* __.ignore__ & __.gitignore__ & __.hgignore__ & __.npmignore__ ([#2481](https://github.com/PrismJS/prism/issues/2481)) [`3fcce6fe`](https://github.com/PrismJS/prism/commit/3fcce6fe) +* __Agda__ ([#2430](https://github.com/PrismJS/prism/issues/2430)) [`3a127c7d`](https://github.com/PrismJS/prism/commit/3a127c7d) +* __AL__ ([#2300](https://github.com/PrismJS/prism/issues/2300)) [`de21eb64`](https://github.com/PrismJS/prism/commit/de21eb64) +* __Cypher__ ([#2459](https://github.com/PrismJS/prism/issues/2459)) [`398e2943`](https://github.com/PrismJS/prism/commit/398e2943) +* __Dhall__ ([#2473](https://github.com/PrismJS/prism/issues/2473)) [`649e51e5`](https://github.com/PrismJS/prism/commit/649e51e5) +* __EditorConfig__ ([#2471](https://github.com/PrismJS/prism/issues/2471)) [`ed8fff91`](https://github.com/PrismJS/prism/commit/ed8fff91) +* __HLSL__ ([#2318](https://github.com/PrismJS/prism/issues/2318)) [`87a5c7ae`](https://github.com/PrismJS/prism/commit/87a5c7ae) +* __JS stack trace__ ([#2418](https://github.com/PrismJS/prism/issues/2418)) [`ae0327b3`](https://github.com/PrismJS/prism/commit/ae0327b3) +* __PeopleCode__ ([#2302](https://github.com/PrismJS/prism/issues/2302)) [`bd4d8165`](https://github.com/PrismJS/prism/commit/bd4d8165) +* __PureBasic__ ([#2369](https://github.com/PrismJS/prism/issues/2369)) [`d0c1c70d`](https://github.com/PrismJS/prism/commit/d0c1c70d) +* __Racket__ ([#2315](https://github.com/PrismJS/prism/issues/2315)) [`053016ef`](https://github.com/PrismJS/prism/commit/053016ef) +* __Smali__ ([#2419](https://github.com/PrismJS/prism/issues/2419)) [`22eb5cad`](https://github.com/PrismJS/prism/commit/22eb5cad) +* __Structured Text (IEC 61131-3)__ ([#2311](https://github.com/PrismJS/prism/issues/2311)) [`8704cdfb`](https://github.com/PrismJS/prism/commit/8704cdfb) +* __UnrealScript__ ([#2305](https://github.com/PrismJS/prism/issues/2305)) [`1093ceb3`](https://github.com/PrismJS/prism/commit/1093ceb3) +* __WarpScript__ ([#2307](https://github.com/PrismJS/prism/issues/2307)) [`cde5b0fa`](https://github.com/PrismJS/prism/commit/cde5b0fa) +* __XML doc (.net)__ ([#2340](https://github.com/PrismJS/prism/issues/2340)) [`caec5e30`](https://github.com/PrismJS/prism/commit/caec5e30) +* __YANG__ ([#2467](https://github.com/PrismJS/prism/issues/2467)) [`ed1df1e1`](https://github.com/PrismJS/prism/commit/ed1df1e1) + +### Updated components + +* Markup & JSON: Added new aliases ([#2390](https://github.com/PrismJS/prism/issues/2390)) [`9782cfe6`](https://github.com/PrismJS/prism/commit/9782cfe6) +* Fixed several cases of exponential backtracking ([#2268](https://github.com/PrismJS/prism/issues/2268)) [`7a554b5f`](https://github.com/PrismJS/prism/commit/7a554b5f) +* __APL__ + * Added `⍥` ([#2409](https://github.com/PrismJS/prism/issues/2409)) [`0255cb6a`](https://github.com/PrismJS/prism/commit/0255cb6a) +* __AutoHotkey__ + * Added missing `format` built-in ([#2450](https://github.com/PrismJS/prism/issues/2450)) [`7c66cfc4`](https://github.com/PrismJS/prism/commit/7c66cfc4) + * Improved comments and other improvements ([#2412](https://github.com/PrismJS/prism/issues/2412)) [`ddf3cc62`](https://github.com/PrismJS/prism/commit/ddf3cc62) + * Added missing definitions ([#2400](https://github.com/PrismJS/prism/issues/2400)) [`4fe03676`](https://github.com/PrismJS/prism/commit/4fe03676) +* __Bash__ + * Added `composer` command ([#2298](https://github.com/PrismJS/prism/issues/2298)) [`044dd271`](https://github.com/PrismJS/prism/commit/044dd271) +* __Batch__ + * Fix escaped double quote ([#2485](https://github.com/PrismJS/prism/issues/2485)) [`f0f8210c`](https://github.com/PrismJS/prism/commit/f0f8210c) +* __C__ + * Improved macros and expressions ([#2440](https://github.com/PrismJS/prism/issues/2440)) [`8a72fa6f`](https://github.com/PrismJS/prism/commit/8a72fa6f) + * Improved macros ([#2320](https://github.com/PrismJS/prism/issues/2320)) [`fdcf7ed2`](https://github.com/PrismJS/prism/commit/fdcf7ed2) +* __C#__ + * Improved pattern matching ([#2411](https://github.com/PrismJS/prism/issues/2411)) [`7f341fc1`](https://github.com/PrismJS/prism/commit/7f341fc1) + * Fixed adjacent string interpolations ([#2402](https://github.com/PrismJS/prism/issues/2402)) [`2a2e79ed`](https://github.com/PrismJS/prism/commit/2a2e79ed) +* __C++__ + * Added support for default comparison operator ([#2426](https://github.com/PrismJS/prism/issues/2426)) [`8e9d161c`](https://github.com/PrismJS/prism/commit/8e9d161c) + * Improved class name detection ([#2348](https://github.com/PrismJS/prism/issues/2348)) [`e3fe9040`](https://github.com/PrismJS/prism/commit/e3fe9040) + * Fixed `enum class` class names ([#2342](https://github.com/PrismJS/prism/issues/2342)) [`30b4e254`](https://github.com/PrismJS/prism/commit/30b4e254) +* __Content-Security-Policy__ + * Fixed directives ([#2461](https://github.com/PrismJS/prism/issues/2461)) [`537a9e80`](https://github.com/PrismJS/prism/commit/537a9e80) +* __CSS__ + * Improved url and added keywords ([#2432](https://github.com/PrismJS/prism/issues/2432)) [`964de5a1`](https://github.com/PrismJS/prism/commit/964de5a1) +* __CSS Extras__ + * Optimized `class` and `id` patterns ([#2359](https://github.com/PrismJS/prism/issues/2359)) [`fdbc4473`](https://github.com/PrismJS/prism/commit/fdbc4473) + * Renamed `attr-{name,value}` tokens and added tokens for combinators and selector lists ([#2373](https://github.com/PrismJS/prism/issues/2373)) [`e523f5d0`](https://github.com/PrismJS/prism/commit/e523f5d0) +* __Dart__ + * Added missing keywords ([#2355](https://github.com/PrismJS/prism/issues/2355)) [`4172ab6f`](https://github.com/PrismJS/prism/commit/4172ab6f) +* __Diff__ + * Added `prefix` token ([#2281](https://github.com/PrismJS/prism/issues/2281)) [`fd432a5b`](https://github.com/PrismJS/prism/commit/fd432a5b) +* __Docker__ + * Fixed strings inside comments ([#2428](https://github.com/PrismJS/prism/issues/2428)) [`37273a6f`](https://github.com/PrismJS/prism/commit/37273a6f) +* __EditorConfig__ + * Trim spaces before key and section title ([#2482](https://github.com/PrismJS/prism/issues/2482)) [`0c30c582`](https://github.com/PrismJS/prism/commit/0c30c582) +* __EJS__ + * Added `eta` alias ([#2282](https://github.com/PrismJS/prism/issues/2282)) [`0cfb6c5f`](https://github.com/PrismJS/prism/commit/0cfb6c5f) +* __GLSL__ + * Improvements ([#2321](https://github.com/PrismJS/prism/issues/2321)) [`33e49956`](https://github.com/PrismJS/prism/commit/33e49956) +* __GraphQL__ + * Added missing keywords ([#2407](https://github.com/PrismJS/prism/issues/2407)) [`de8ed16d`](https://github.com/PrismJS/prism/commit/de8ed16d) + * Added support for multi-line strings and descriptions ([#2406](https://github.com/PrismJS/prism/issues/2406)) [`9e64c62e`](https://github.com/PrismJS/prism/commit/9e64c62e) +* __Io__ + * Fixed operator pattern ([#2365](https://github.com/PrismJS/prism/issues/2365)) [`d6055771`](https://github.com/PrismJS/prism/commit/d6055771) +* __Java__ + * Fixed `namespace` token ([#2295](https://github.com/PrismJS/prism/issues/2295)) [`62e184bb`](https://github.com/PrismJS/prism/commit/62e184bb) +* __JavaDoc__ + * Improvements ([#2324](https://github.com/PrismJS/prism/issues/2324)) [`032910ba`](https://github.com/PrismJS/prism/commit/032910ba) +* __JavaScript__ + * Improved regex detection ([#2465](https://github.com/PrismJS/prism/issues/2465)) [`4f55052f`](https://github.com/PrismJS/prism/commit/4f55052f) + * Improved `get`/`set` and parameter detection ([#2387](https://github.com/PrismJS/prism/issues/2387)) [`ed715158`](https://github.com/PrismJS/prism/commit/ed715158) + * Added support for logical assignment operators ([#2378](https://github.com/PrismJS/prism/issues/2378)) [`b28f21b7`](https://github.com/PrismJS/prism/commit/b28f21b7) +* __JSDoc__ + * Improvements ([#2466](https://github.com/PrismJS/prism/issues/2466)) [`2805ae35`](https://github.com/PrismJS/prism/commit/2805ae35) +* __JSON__ + * Greedy comments ([#2479](https://github.com/PrismJS/prism/issues/2479)) [`158caf52`](https://github.com/PrismJS/prism/commit/158caf52) +* __Julia__ + * Improved strings, comments, and other patterns ([#2363](https://github.com/PrismJS/prism/issues/2363)) [`81cf2344`](https://github.com/PrismJS/prism/commit/81cf2344) +* __Kotlin__ + * Added `kt` and `kts` aliases ([#2474](https://github.com/PrismJS/prism/issues/2474)) [`67f97e2e`](https://github.com/PrismJS/prism/commit/67f97e2e) +* __Markup__ + * Added tokens inside DOCTYPE ([#2349](https://github.com/PrismJS/prism/issues/2349)) [`9c7bc820`](https://github.com/PrismJS/prism/commit/9c7bc820) + * Added `attr-equals` alias for the attribute `=` sign ([#2350](https://github.com/PrismJS/prism/issues/2350)) [`96a0116e`](https://github.com/PrismJS/prism/commit/96a0116e) + * Added alias for named entities ([#2351](https://github.com/PrismJS/prism/issues/2351)) [`ab1e34ae`](https://github.com/PrismJS/prism/commit/ab1e34ae) + * Added support for SSML ([#2306](https://github.com/PrismJS/prism/issues/2306)) [`eb70070d`](https://github.com/PrismJS/prism/commit/eb70070d) +* __Objective-C__ + * Added `objc` alias ([#2331](https://github.com/PrismJS/prism/issues/2331)) [`67c6b7af`](https://github.com/PrismJS/prism/commit/67c6b7af) +* __PowerShell__ + * New functions pattern bases on naming conventions ([#2301](https://github.com/PrismJS/prism/issues/2301)) [`fec39bcf`](https://github.com/PrismJS/prism/commit/fec39bcf) +* __Protocol Buffers__ + * Added support for RPC syntax ([#2414](https://github.com/PrismJS/prism/issues/2414)) [`939a17c4`](https://github.com/PrismJS/prism/commit/939a17c4) +* __Pug__ + * Improved class and id detection in tags ([#2358](https://github.com/PrismJS/prism/issues/2358)) [`7f948ecb`](https://github.com/PrismJS/prism/commit/7f948ecb) +* __Python__ + * Fixed empty multiline strings ([#2344](https://github.com/PrismJS/prism/issues/2344)) [`c9324476`](https://github.com/PrismJS/prism/commit/c9324476) +* __Regex__ + * Added aliases and minor improvements ([#2325](https://github.com/PrismJS/prism/issues/2325)) [`8a72830a`](https://github.com/PrismJS/prism/commit/8a72830a) +* __Ren'py__ + * Added `rpy` alias ([#2385](https://github.com/PrismJS/prism/issues/2385)) [`4935b5ca`](https://github.com/PrismJS/prism/commit/4935b5ca) +* __Ruby__ + * Optimized `regex` and `string` patterns ([#2354](https://github.com/PrismJS/prism/issues/2354)) [`b526e8c0`](https://github.com/PrismJS/prism/commit/b526e8c0) +* __Rust__ + * Improvements ([#2464](https://github.com/PrismJS/prism/issues/2464)) [`2ff40fe0`](https://github.com/PrismJS/prism/commit/2ff40fe0) + * Improvements ([#2332](https://github.com/PrismJS/prism/issues/2332)) [`194c5429`](https://github.com/PrismJS/prism/commit/194c5429) +* __SAS__ + * Improved macro string functions ([#2463](https://github.com/PrismJS/prism/issues/2463)) [`278316ca`](https://github.com/PrismJS/prism/commit/278316ca) + * Handle edge case of string macro functions ([#2451](https://github.com/PrismJS/prism/issues/2451)) [`a0a9f1ef`](https://github.com/PrismJS/prism/commit/a0a9f1ef) + * Improved comments in `proc groovy` and `proc lua` ([#2392](https://github.com/PrismJS/prism/issues/2392)) [`475a5903`](https://github.com/PrismJS/prism/commit/475a5903) +* __Scheme__ + * Adjusted lookbehind for literals ([#2396](https://github.com/PrismJS/prism/issues/2396)) [`1e3f542b`](https://github.com/PrismJS/prism/commit/1e3f542b) + * Improved lambda parameter ([#2346](https://github.com/PrismJS/prism/issues/2346)) [`1946918a`](https://github.com/PrismJS/prism/commit/1946918a) + * Consistent lookaheads ([#2322](https://github.com/PrismJS/prism/issues/2322)) [`d2541d54`](https://github.com/PrismJS/prism/commit/d2541d54) + * Improved boolean ([#2316](https://github.com/PrismJS/prism/issues/2316)) [`e27e65af`](https://github.com/PrismJS/prism/commit/e27e65af) + * Added missing special keywords ([#2304](https://github.com/PrismJS/prism/issues/2304)) [`ac297ba5`](https://github.com/PrismJS/prism/commit/ac297ba5) + * Improvements ([#2263](https://github.com/PrismJS/prism/issues/2263)) [`9a49f78f`](https://github.com/PrismJS/prism/commit/9a49f78f) +* __Solidity (Ethereum)__ + * Added `sol` alias ([#2382](https://github.com/PrismJS/prism/issues/2382)) [`6352213a`](https://github.com/PrismJS/prism/commit/6352213a) +* __SQL__ + * Added PostgreSQL `RETURNING` keyword ([#2476](https://github.com/PrismJS/prism/issues/2476)) [`bea7a585`](https://github.com/PrismJS/prism/commit/bea7a585) +* __Stylus__ + * Fixed comments breaking declarations + minor improvements ([#2372](https://github.com/PrismJS/prism/issues/2372)) [`6d663b6e`](https://github.com/PrismJS/prism/commit/6d663b6e) + * New tokens and other improvements ([#2368](https://github.com/PrismJS/prism/issues/2368)) [`2c10ef8a`](https://github.com/PrismJS/prism/commit/2c10ef8a) + * Fixed comments breaking strings and URLs ([#2361](https://github.com/PrismJS/prism/issues/2361)) [`0d65d6c9`](https://github.com/PrismJS/prism/commit/0d65d6c9) +* __T4 Text Templates (VB)__ + * Use the correct VB variant ([#2341](https://github.com/PrismJS/prism/issues/2341)) [`b6093339`](https://github.com/PrismJS/prism/commit/b6093339) +* __TypeScript__ + * Added `asserts` keyword and other improvements ([#2280](https://github.com/PrismJS/prism/issues/2280)) [`a197cfcd`](https://github.com/PrismJS/prism/commit/a197cfcd) +* __Visual Basic__ + * Added VBA alias ([#2469](https://github.com/PrismJS/prism/issues/2469)) [`78161d60`](https://github.com/PrismJS/prism/commit/78161d60) + * Added `until` keyword ([#2423](https://github.com/PrismJS/prism/issues/2423)) [`a13ee8d9`](https://github.com/PrismJS/prism/commit/a13ee8d9) + * Added missing keywords ([#2376](https://github.com/PrismJS/prism/issues/2376)) [`ba5ac1da`](https://github.com/PrismJS/prism/commit/ba5ac1da) + +### Updated plugins + +* File Highlight & JSONP Highlight update ([#1974](https://github.com/PrismJS/prism/issues/1974)) [`afea17d9`](https://github.com/PrismJS/prism/commit/afea17d9) +* Added general de/activation mechanism for plugins ([#2434](https://github.com/PrismJS/prism/issues/2434)) [`a36e96ab`](https://github.com/PrismJS/prism/commit/a36e96ab) +* __Autoloader__ + * Fixed bug breaking Autoloader ([#2449](https://github.com/PrismJS/prism/issues/2449)) [`a3416bf3`](https://github.com/PrismJS/prism/commit/a3416bf3) + * Fixed `data-dependencies` and extensions ([#2326](https://github.com/PrismJS/prism/issues/2326)) [`1654b25f`](https://github.com/PrismJS/prism/commit/1654b25f) + * Improved path detection and other minor improvements ([#2245](https://github.com/PrismJS/prism/issues/2245)) [`5cdc3251`](https://github.com/PrismJS/prism/commit/5cdc3251) +* __Command Line__ + * Some refactoring ([#2290](https://github.com/PrismJS/prism/issues/2290)) [`8c9c2896`](https://github.com/PrismJS/prism/commit/8c9c2896) + * Correctly rehighlight elements ([#2291](https://github.com/PrismJS/prism/issues/2291)) [`e6b2c6fc`](https://github.com/PrismJS/prism/commit/e6b2c6fc) +* __Line Highlight__ + * Added linkable line numbers ([#2328](https://github.com/PrismJS/prism/issues/2328)) [`eb82e804`](https://github.com/PrismJS/prism/commit/eb82e804) +* __Line Numbers__ + * Improved resize performance ([#2125](https://github.com/PrismJS/prism/issues/2125)) [`b96ed225`](https://github.com/PrismJS/prism/commit/b96ed225) + * Fixed TypeError when `lineNumberWrapper` is null ([#2337](https://github.com/PrismJS/prism/issues/2337)) [`4b61661d`](https://github.com/PrismJS/prism/commit/4b61661d) + * Exposed `_resizeElement` function ([#2288](https://github.com/PrismJS/prism/issues/2288)) [`893f2a79`](https://github.com/PrismJS/prism/commit/893f2a79) +* __Previewers__ + * Fixed XSS ([#2506](https://github.com/PrismJS/prism/issues/2506)) [`8bba4880`](https://github.com/PrismJS/prism/commit/8bba4880) +* __Unescaped Markup__ + * No longer requires `Prism.languages.markup` ([#2444](https://github.com/PrismJS/prism/issues/2444)) [`af132dd3`](https://github.com/PrismJS/prism/commit/af132dd3) + +### Updated themes + +* __Coy__ + * Minor improvements ([#2176](https://github.com/PrismJS/prism/issues/2176)) [`7109c18c`](https://github.com/PrismJS/prism/commit/7109c18c) +* __Default__ + * Added a comment that declares the background color of `operator` tokens as intentional ([#2309](https://github.com/PrismJS/prism/issues/2309)) [`937e2691`](https://github.com/PrismJS/prism/commit/937e2691) +* __Okaidia__ + * Update comment text color to meet WCAG contrast recommendations to AA level ([#2292](https://github.com/PrismJS/prism/issues/2292)) [`06495f90`](https://github.com/PrismJS/prism/commit/06495f90) + +### Other + +* Changelog: Fixed v1.20.0 release date [`cb6349e2`](https://github.com/PrismJS/prism/commit/cb6349e2) +* __Core__ + * Fixed greedy matching bug ([#2032](https://github.com/PrismJS/prism/issues/2032)) [`40285203`](https://github.com/PrismJS/prism/commit/40285203) + * Added JSDoc ([#1782](https://github.com/PrismJS/prism/issues/1782)) [`4ff555be`](https://github.com/PrismJS/prism/commit/4ff555be) +* __Infrastructure__ + * Update Git repo URL in package.json ([#2334](https://github.com/PrismJS/prism/issues/2334)) [`10f43275`](https://github.com/PrismJS/prism/commit/10f43275) + * Added docs to ignore files ([#2437](https://github.com/PrismJS/prism/issues/2437)) [`05c9f20b`](https://github.com/PrismJS/prism/commit/05c9f20b) + * Added `npm run build` command ([#2356](https://github.com/PrismJS/prism/issues/2356)) [`ff74a610`](https://github.com/PrismJS/prism/commit/ff74a610) + * gulp: Improved `inlineRegexSource` ([#2296](https://github.com/PrismJS/prism/issues/2296)) [`abb800dd`](https://github.com/PrismJS/prism/commit/abb800dd) + * gulp: Fixed language map ([#2283](https://github.com/PrismJS/prism/issues/2283)) [`11053193`](https://github.com/PrismJS/prism/commit/11053193) + * gulp: Removed `premerge` task ([#2357](https://github.com/PrismJS/prism/issues/2357)) [`5ff7932b`](https://github.com/PrismJS/prism/commit/5ff7932b) + * Tests are now faster ([#2165](https://github.com/PrismJS/prism/issues/2165)) [`e756be3f`](https://github.com/PrismJS/prism/commit/e756be3f) + * Tests: Added extra newlines in pretty token streams ([#2070](https://github.com/PrismJS/prism/issues/2070)) [`681adeef`](https://github.com/PrismJS/prism/commit/681adeef) + * Tests: Added test for identifier support across all languages ([#2371](https://github.com/PrismJS/prism/issues/2371)) [`48fac3b2`](https://github.com/PrismJS/prism/commit/48fac3b2) + * Tests: Added test to sort the language list ([#2222](https://github.com/PrismJS/prism/issues/2222)) [`a3758728`](https://github.com/PrismJS/prism/commit/a3758728) + * Tests: Always pretty-print token streams ([#2421](https://github.com/PrismJS/prism/issues/2421)) [`583e7eb5`](https://github.com/PrismJS/prism/commit/583e7eb5) + * Tests: Always use `components.json` ([#2370](https://github.com/PrismJS/prism/issues/2370)) [`e416341f`](https://github.com/PrismJS/prism/commit/e416341f) + * Tests: Better error messages for pattern tests ([#2364](https://github.com/PrismJS/prism/issues/2364)) [`10ca6433`](https://github.com/PrismJS/prism/commit/10ca6433) + * Tests: Included `console` in VM context ([#2353](https://github.com/PrismJS/prism/issues/2353)) [`b4ed5ded`](https://github.com/PrismJS/prism/commit/b4ed5ded) +* __Website__ + * Fixed typos "Prims" ([#2455](https://github.com/PrismJS/prism/issues/2455)) [`dfa5498a`](https://github.com/PrismJS/prism/commit/dfa5498a) + * New assets directory for all web-only files ([#2180](https://github.com/PrismJS/prism/issues/2180)) [`91fdd0b1`](https://github.com/PrismJS/prism/commit/91fdd0b1) + * Improvements ([#2053](https://github.com/PrismJS/prism/issues/2053)) [`ce0fa227`](https://github.com/PrismJS/prism/commit/ce0fa227) + * Fixed Treeview page ([#2484](https://github.com/PrismJS/prism/issues/2484)) [`a0efa40b`](https://github.com/PrismJS/prism/commit/a0efa40b) + * Line Numbers: Fixed class name on website [`453079bf`](https://github.com/PrismJS/prism/commit/453079bf) + * Line Numbers: Improved documentation ([#2456](https://github.com/PrismJS/prism/issues/2456)) [`447429f0`](https://github.com/PrismJS/prism/commit/447429f0) + * Line Numbers: Style inline code on website ([#2435](https://github.com/PrismJS/prism/issues/2435)) [`ad9c13e2`](https://github.com/PrismJS/prism/commit/ad9c13e2) + * Filter highlightAll: Fixed typo ([#2391](https://github.com/PrismJS/prism/issues/2391)) [`55bf7ec1`](https://github.com/PrismJS/prism/commit/55bf7ec1) + +## 1.20.0 (2020-04-04) + +### New components + +* __Concurnas__ ([#2206](https://github.com/PrismJS/prism/issues/2206)) [`b24f7348`](https://github.com/PrismJS/prism/commit/b24f7348) +* __DAX__ ([#2248](https://github.com/PrismJS/prism/issues/2248)) [`9227853f`](https://github.com/PrismJS/prism/commit/9227853f) +* __Excel Formula__ ([#2219](https://github.com/PrismJS/prism/issues/2219)) [`bf4f7bfa`](https://github.com/PrismJS/prism/commit/bf4f7bfa) +* __Factor__ ([#2203](https://github.com/PrismJS/prism/issues/2203)) [`f941102e`](https://github.com/PrismJS/prism/commit/f941102e) +* __LLVM IR__ ([#2221](https://github.com/PrismJS/prism/issues/2221)) [`43efde2e`](https://github.com/PrismJS/prism/commit/43efde2e) +* __PowerQuery__ ([#2250](https://github.com/PrismJS/prism/issues/2250)) [`8119e57b`](https://github.com/PrismJS/prism/commit/8119e57b) +* __Solution file__ ([#2213](https://github.com/PrismJS/prism/issues/2213)) [`15983d52`](https://github.com/PrismJS/prism/commit/15983d52) + +### Updated components + +* __Bash__ + * Added support for escaped quotes ([#2256](https://github.com/PrismJS/prism/issues/2256)) [`328d0e0e`](https://github.com/PrismJS/prism/commit/328d0e0e) +* __BBcode__ + * Added "shortcode" alias ([#2273](https://github.com/PrismJS/prism/issues/2273)) [`57eebced`](https://github.com/PrismJS/prism/commit/57eebced) +* __C/C++/OpenCL C__ + * Improvements ([#2196](https://github.com/PrismJS/prism/issues/2196)) [`674f4b35`](https://github.com/PrismJS/prism/commit/674f4b35) +* __C__ + * Improvemed `comment` pattern ([#2229](https://github.com/PrismJS/prism/issues/2229)) [`fa630726`](https://github.com/PrismJS/prism/commit/fa630726) +* __C#__ + * Fixed keywords in type lists blocking type names ([#2277](https://github.com/PrismJS/prism/issues/2277)) [`947a55bd`](https://github.com/PrismJS/prism/commit/947a55bd) + * C# improvements ([#1444](https://github.com/PrismJS/prism/issues/1444)) [`42b15463`](https://github.com/PrismJS/prism/commit/42b15463) +* __C++__ + * Added C++20 keywords ([#2236](https://github.com/PrismJS/prism/issues/2236)) [`462ad57e`](https://github.com/PrismJS/prism/commit/462ad57e) +* __CSS__ + * Fixed `url()` containing "@" ([#2272](https://github.com/PrismJS/prism/issues/2272)) [`504a63ba`](https://github.com/PrismJS/prism/commit/504a63ba) +* __CSS Extras__ + * Added support for the selector function ([#2201](https://github.com/PrismJS/prism/issues/2201)) [`2e0eff76`](https://github.com/PrismJS/prism/commit/2e0eff76) +* __Elixir__ + * Added support for attributes names ending with `?` ([#2182](https://github.com/PrismJS/prism/issues/2182)) [`5450e24c`](https://github.com/PrismJS/prism/commit/5450e24c) +* __Java__ + * Added `record` keyword ([#2185](https://github.com/PrismJS/prism/issues/2185)) [`47910b5c`](https://github.com/PrismJS/prism/commit/47910b5c) +* __Markdown__ + * Added support for nested lists ([#2228](https://github.com/PrismJS/prism/issues/2228)) [`73c8a376`](https://github.com/PrismJS/prism/commit/73c8a376) +* __OpenCL__ + * Require C ([#2231](https://github.com/PrismJS/prism/issues/2231)) [`26626ded`](https://github.com/PrismJS/prism/commit/26626ded) +* __PHPDoc__ + * Fixed exponential backtracking ([#2198](https://github.com/PrismJS/prism/issues/2198)) [`3b42536e`](https://github.com/PrismJS/prism/commit/3b42536e) +* __Ruby__ + * Fixed exponential backtracking ([#2225](https://github.com/PrismJS/prism/issues/2225)) [`c5de5aa8`](https://github.com/PrismJS/prism/commit/c5de5aa8) +* __SAS__ + * Fixed SAS' "peerDependencies" ([#2230](https://github.com/PrismJS/prism/issues/2230)) [`7d8ff7ea`](https://github.com/PrismJS/prism/commit/7d8ff7ea) +* __Shell session__ + * Improvements ([#2208](https://github.com/PrismJS/prism/issues/2208)) [`bd16bd57`](https://github.com/PrismJS/prism/commit/bd16bd57) +* __Visual Basic__ + * Added support for comments with line continuations ([#2195](https://github.com/PrismJS/prism/issues/2195)) [`a7d67ca3`](https://github.com/PrismJS/prism/commit/a7d67ca3) +* __YAML__ + * Improvements ([#2226](https://github.com/PrismJS/prism/issues/2226)) [`5362ba16`](https://github.com/PrismJS/prism/commit/5362ba16) + * Fixed highlighting of anchors and aliases ([#2217](https://github.com/PrismJS/prism/issues/2217)) [`6124c974`](https://github.com/PrismJS/prism/commit/6124c974) + +### New plugins + +* __Treeview__ ([#2265](https://github.com/PrismJS/prism/issues/2265)) [`be909b18`](https://github.com/PrismJS/prism/commit/be909b18) + +### Updated plugins + +* __Inline Color__ + * Support for (semi-)transparent colors and minor improvements ([#2223](https://github.com/PrismJS/prism/issues/2223)) [`8d2c5a3e`](https://github.com/PrismJS/prism/commit/8d2c5a3e) +* __Keep Markup__ + * Remove self & document from IIFE arguments ([#2258](https://github.com/PrismJS/prism/issues/2258)) [`3c043338`](https://github.com/PrismJS/prism/commit/3c043338) +* __Toolbar__ + * `data-toolbar-order` is now inherited ([#2205](https://github.com/PrismJS/prism/issues/2205)) [`238f1163`](https://github.com/PrismJS/prism/commit/238f1163) + +### Other + +* Updated all `String.propotype.replace` calls for literal strings [`5d7aab56`](https://github.com/PrismJS/prism/commit/5d7aab56) +* __Core__ + * Linked list implementation for `matchGrammar` ([#1909](https://github.com/PrismJS/prism/issues/1909)) [`2d4c94cd`](https://github.com/PrismJS/prism/commit/2d4c94cd) + * Faster `Token.stringify` ([#2171](https://github.com/PrismJS/prism/issues/2171)) [`f683972e`](https://github.com/PrismJS/prism/commit/f683972e) + * Fixed scope problem in script mode ([#2184](https://github.com/PrismJS/prism/issues/2184)) [`984e5d2e`](https://github.com/PrismJS/prism/commit/984e5d2e) +* __Infrastructure__ + * Travis: Updated NodeJS versions ([#2246](https://github.com/PrismJS/prism/issues/2246)) [`e635260b`](https://github.com/PrismJS/prism/commit/e635260b) + * gulp: Inline regex source improvement ([#2227](https://github.com/PrismJS/prism/issues/2227)) [`67afc5ad`](https://github.com/PrismJS/prism/commit/67afc5ad) + * Tests: Added new pattern check for octal escapes ([#2189](https://github.com/PrismJS/prism/issues/2189)) [`81e1c3dd`](https://github.com/PrismJS/prism/commit/81e1c3dd) + * Tests: Fixed optional dependencies in pattern tests ([#2242](https://github.com/PrismJS/prism/issues/2242)) [`1e3070a2`](https://github.com/PrismJS/prism/commit/1e3070a2) + * Tests: Added test for zero-width lookbehinds ([#2220](https://github.com/PrismJS/prism/issues/2220)) [`7d03ece4`](https://github.com/PrismJS/prism/commit/7d03ece4) + * Added tests for examples ([#2216](https://github.com/PrismJS/prism/issues/2216)) [`1f7a245c`](https://github.com/PrismJS/prism/commit/1f7a245c) +* __Website__ + * Removed invalid strings from C# example ([#2266](https://github.com/PrismJS/prism/issues/2266)) [`c917a8ca`](https://github.com/PrismJS/prism/commit/c917a8ca) + * Fixed Diff highlight plugin page title ([#2233](https://github.com/PrismJS/prism/issues/2233)) [`a82770f8`](https://github.com/PrismJS/prism/commit/a82770f8) + * Added link to `prism-liquibase` Bash language extension. ([#2191](https://github.com/PrismJS/prism/issues/2191)) [`0bf73dc7`](https://github.com/PrismJS/prism/commit/0bf73dc7) + * Examples: Updated content header ([#2232](https://github.com/PrismJS/prism/issues/2232)) [`6232878b`](https://github.com/PrismJS/prism/commit/6232878b) + * Website: Added Coy bug to the known failures page. ([#2170](https://github.com/PrismJS/prism/issues/2170)) [`e9dab85e`](https://github.com/PrismJS/prism/commit/e9dab85e) + +## 1.19.0 (2020-01-13) + +### New components + +* __Latte__ ([#2140](https://github.com/PrismJS/prism/issues/2140)) [`694a81b8`](https://github.com/PrismJS/prism/commit/694a81b8) +* __Neon__ ([#2140](https://github.com/PrismJS/prism/issues/2140)) [`694a81b8`](https://github.com/PrismJS/prism/commit/694a81b8) +* __QML__ ([#2139](https://github.com/PrismJS/prism/issues/2139)) [`c40d96c6`](https://github.com/PrismJS/prism/commit/c40d96c6) + +### Updated components + +* __Handlebars__ + * Added support for `:` and improved the `variable` pattern ([#2172](https://github.com/PrismJS/prism/issues/2172)) [`ef4d29d9`](https://github.com/PrismJS/prism/commit/ef4d29d9) +* __JavaScript__ + * Added support for keywords after a spread operator ([#2148](https://github.com/PrismJS/prism/issues/2148)) [`1f3f8929`](https://github.com/PrismJS/prism/commit/1f3f8929) + * Better regex detection ([#2158](https://github.com/PrismJS/prism/issues/2158)) [`a23d8f84`](https://github.com/PrismJS/prism/commit/a23d8f84) +* __Markdown__ + * Better language detection for code blocks ([#2114](https://github.com/PrismJS/prism/issues/2114)) [`d7ad48f9`](https://github.com/PrismJS/prism/commit/d7ad48f9) +* __OCaml__ + * Improvements ([#2179](https://github.com/PrismJS/prism/issues/2179)) [`2a570fd4`](https://github.com/PrismJS/prism/commit/2a570fd4) +* __PHP__ + * Fixed exponential runtime of a pattern ([#2157](https://github.com/PrismJS/prism/issues/2157)) [`24c8f833`](https://github.com/PrismJS/prism/commit/24c8f833) +* __React JSX__ + * Improved spread operator in tag attributes ([#2159](https://github.com/PrismJS/prism/issues/2159)) [`fd857e7b`](https://github.com/PrismJS/prism/commit/fd857e7b) + * Made `$` a valid character for attribute names ([#2144](https://github.com/PrismJS/prism/issues/2144)) [`f018cf04`](https://github.com/PrismJS/prism/commit/f018cf04) +* __Reason__ + * Added support for single line comments ([#2150](https://github.com/PrismJS/prism/issues/2150)) [`7f1c55b7`](https://github.com/PrismJS/prism/commit/7f1c55b7) +* __Ruby__ + * Override 'class-name' definition ([#2135](https://github.com/PrismJS/prism/issues/2135)) [`401d4b02`](https://github.com/PrismJS/prism/commit/401d4b02) +* __SAS__ + * Added CASL support ([#2112](https://github.com/PrismJS/prism/issues/2112)) [`99d979a0`](https://github.com/PrismJS/prism/commit/99d979a0) + +### Updated plugins + +* __Custom Class__ + * Fixed TypeError when mapper is undefined ([#2167](https://github.com/PrismJS/prism/issues/2167)) [`543f04d7`](https://github.com/PrismJS/prism/commit/543f04d7) + +### Updated themes + +* Added missing `.token` selector ([#2161](https://github.com/PrismJS/prism/issues/2161)) [`86780457`](https://github.com/PrismJS/prism/commit/86780457) + +### Other + +* Added a check for redundant dependency declarations ([#2142](https://github.com/PrismJS/prism/issues/2142)) [`a06aca06`](https://github.com/PrismJS/prism/commit/a06aca06) +* Added a check for examples ([#2128](https://github.com/PrismJS/prism/issues/2128)) [`0b539136`](https://github.com/PrismJS/prism/commit/0b539136) +* Added silent option to `loadLanguages` ([#2147](https://github.com/PrismJS/prism/issues/2147)) [`191b4116`](https://github.com/PrismJS/prism/commit/191b4116) +* __Infrastructure__ + * Dependencies: Improved `getLoader` ([#2151](https://github.com/PrismJS/prism/issues/2151)) [`199bdcae`](https://github.com/PrismJS/prism/commit/199bdcae) + * Updated gulp to v4.0.2 ([#2178](https://github.com/PrismJS/prism/issues/2178)) [`e5678a00`](https://github.com/PrismJS/prism/commit/e5678a00) +* __Website__ + * Custom Class: Fixed examples ([#2160](https://github.com/PrismJS/prism/issues/2160)) [`0c2fe405`](https://github.com/PrismJS/prism/commit/0c2fe405) + * Added documentation for new dependency API ([#2141](https://github.com/PrismJS/prism/issues/2141)) [`59068d67`](https://github.com/PrismJS/prism/commit/59068d67) + +## 1.18.0 (2020-01-04) + +### New components + +* __ANTLR4__ ([#2063](https://github.com/PrismJS/prism/issues/2063)) [`aaaa29a8`](https://github.com/PrismJS/prism/commit/aaaa29a8) +* __AQL__ ([#2025](https://github.com/PrismJS/prism/issues/2025)) [`3fdb7d55`](https://github.com/PrismJS/prism/commit/3fdb7d55) +* __BBcode__ ([#2095](https://github.com/PrismJS/prism/issues/2095)) [`aaf13aa6`](https://github.com/PrismJS/prism/commit/aaf13aa6) +* __BrightScript__ ([#2096](https://github.com/PrismJS/prism/issues/2096)) [`631f1e34`](https://github.com/PrismJS/prism/commit/631f1e34) +* __Embedded Lua templating__ ([#2050](https://github.com/PrismJS/prism/issues/2050)) [`0b771c90`](https://github.com/PrismJS/prism/commit/0b771c90) +* __Firestore security rules__ ([#2010](https://github.com/PrismJS/prism/issues/2010)) [`9f722586`](https://github.com/PrismJS/prism/commit/9f722586) +* __FreeMarker Template Language__ ([#2080](https://github.com/PrismJS/prism/issues/2080)) [`2f3da7e8`](https://github.com/PrismJS/prism/commit/2f3da7e8) +* __GDScript__ ([#2006](https://github.com/PrismJS/prism/issues/2006)) [`e2b99f40`](https://github.com/PrismJS/prism/commit/e2b99f40) +* __MoonScript__ ([#2100](https://github.com/PrismJS/prism/issues/2100)) [`f31946b3`](https://github.com/PrismJS/prism/commit/f31946b3) +* __Robot Framework__ (only the plain text format) ([#2034](https://github.com/PrismJS/prism/issues/2034)) [`f7eaa618`](https://github.com/PrismJS/prism/commit/f7eaa618) +* __Solidity (Ethereum)__ ([#2031](https://github.com/PrismJS/prism/issues/2031)) [`cc2cf3f7`](https://github.com/PrismJS/prism/commit/cc2cf3f7) +* __SPARQL__ ([#2033](https://github.com/PrismJS/prism/issues/2033)) [`c42f877d`](https://github.com/PrismJS/prism/commit/c42f877d) +* __SQF: Status Quo Function (Arma 3)__ ([#2079](https://github.com/PrismJS/prism/issues/2079)) [`cfac94ec`](https://github.com/PrismJS/prism/commit/cfac94ec) +* __Turtle__ & __TriG__ ([#2012](https://github.com/PrismJS/prism/issues/2012)) [`508d57ac`](https://github.com/PrismJS/prism/commit/508d57ac) +* __Zig__ ([#2019](https://github.com/PrismJS/prism/issues/2019)) [`a7cf56b7`](https://github.com/PrismJS/prism/commit/a7cf56b7) + +### Updated components + +* Minor improvements for C-like and Clojure ([#2064](https://github.com/PrismJS/prism/issues/2064)) [`7db0cab3`](https://github.com/PrismJS/prism/commit/7db0cab3) +* Inlined some unnecessary rest properties ([#2082](https://github.com/PrismJS/prism/issues/2082)) [`ad3fa443`](https://github.com/PrismJS/prism/commit/ad3fa443) +* __AQL__ + * Disallow unclosed multiline comments again ([#2089](https://github.com/PrismJS/prism/issues/2089)) [`717ace02`](https://github.com/PrismJS/prism/commit/717ace02) + * Allow unclosed multi-line comments ([#2058](https://github.com/PrismJS/prism/issues/2058)) [`f3c6ba59`](https://github.com/PrismJS/prism/commit/f3c6ba59) + * More pseudo keywords ([#2055](https://github.com/PrismJS/prism/issues/2055)) [`899574eb`](https://github.com/PrismJS/prism/commit/899574eb) + * Added missing keyword + minor improvements ([#2047](https://github.com/PrismJS/prism/issues/2047)) [`32a4c422`](https://github.com/PrismJS/prism/commit/32a4c422) +* __Clojure__ + * Added multiline strings (lisp style) ([#2061](https://github.com/PrismJS/prism/issues/2061)) [`8ea685b8`](https://github.com/PrismJS/prism/commit/8ea685b8) +* __CSS Extras__ + * CSS Extras & PHP: Fixed too greedy number token ([#2009](https://github.com/PrismJS/prism/issues/2009)) [`ebe363f4`](https://github.com/PrismJS/prism/commit/ebe363f4) +* __D__ + * Fixed strings ([#2029](https://github.com/PrismJS/prism/issues/2029)) [`010a0157`](https://github.com/PrismJS/prism/commit/010a0157) +* __Groovy__ + * Minor improvements ([#2036](https://github.com/PrismJS/prism/issues/2036)) [`fb618331`](https://github.com/PrismJS/prism/commit/fb618331) +* __Java__ + * Added missing `::` operator ([#2101](https://github.com/PrismJS/prism/issues/2101)) [`ee7fdbee`](https://github.com/PrismJS/prism/commit/ee7fdbee) + * Added support for new Java 13 syntax ([#2060](https://github.com/PrismJS/prism/issues/2060)) [`a7b95dd3`](https://github.com/PrismJS/prism/commit/a7b95dd3) +* __JavaScript__ + * Added Optional Chaining and Nullish Coalescing ([#2084](https://github.com/PrismJS/prism/issues/2084)) [`fdb7de0d`](https://github.com/PrismJS/prism/commit/fdb7de0d) + * Tokenize `:` as an operator ([#2073](https://github.com/PrismJS/prism/issues/2073)) [`0e5c48d1`](https://github.com/PrismJS/prism/commit/0e5c48d1) +* __Less__ + * Fixed exponential backtracking ([#2016](https://github.com/PrismJS/prism/issues/2016)) [`d03d19b4`](https://github.com/PrismJS/prism/commit/d03d19b4) +* __Markup__ + * Improved doctype pattern ([#2094](https://github.com/PrismJS/prism/issues/2094)) [`99994c58`](https://github.com/PrismJS/prism/commit/99994c58) +* __Python__ + * Fixed decorators ([#2018](https://github.com/PrismJS/prism/issues/2018)) [`5b8a16d9`](https://github.com/PrismJS/prism/commit/5b8a16d9) +* __Robot Framework__ + * Rename "robot-framework" to "robotframework" ([#2113](https://github.com/PrismJS/prism/issues/2113)) [`baa78774`](https://github.com/PrismJS/prism/commit/baa78774) +* __Ruby__ + * Made `true` and `false` booleans ([#2098](https://github.com/PrismJS/prism/issues/2098)) [`68d1c472`](https://github.com/PrismJS/prism/commit/68d1c472) + * Added missing keywords ([#2097](https://github.com/PrismJS/prism/issues/2097)) [`f460eafc`](https://github.com/PrismJS/prism/commit/f460eafc) +* __SAS__ + * Added support for embedded Groovy and Lua code ([#2091](https://github.com/PrismJS/prism/issues/2091)) [`3640b3f2`](https://github.com/PrismJS/prism/commit/3640b3f2) + * Minor improvements ([#2085](https://github.com/PrismJS/prism/issues/2085)) [`07020c7a`](https://github.com/PrismJS/prism/commit/07020c7a) + * Fixed `proc-args` token by removing backreferences from string pattern ([#2013](https://github.com/PrismJS/prism/issues/2013)) [`af5a36ae`](https://github.com/PrismJS/prism/commit/af5a36ae) + * Major improvements ([#1981](https://github.com/PrismJS/prism/issues/1981)) [`076f6155`](https://github.com/PrismJS/prism/commit/076f6155) +* __Smalltalk__ + * Fixed single quote character literal ([#2041](https://github.com/PrismJS/prism/issues/2041)) [`1aabcd17`](https://github.com/PrismJS/prism/commit/1aabcd17) +* __Turtle__ + * Minor improvements ([#2038](https://github.com/PrismJS/prism/issues/2038)) [`8ccd258b`](https://github.com/PrismJS/prism/commit/8ccd258b) +* __TypeScript__ + * Added missing keyword `undefined` ([#2088](https://github.com/PrismJS/prism/issues/2088)) [`c8b48b9f`](https://github.com/PrismJS/prism/commit/c8b48b9f) + +### Updated plugins + +* New Match Braces plugin ([#1944](https://github.com/PrismJS/prism/issues/1944)) [`365faade`](https://github.com/PrismJS/prism/commit/365faade) +* New Inline color plugin ([#2007](https://github.com/PrismJS/prism/issues/2007)) [`8403e453`](https://github.com/PrismJS/prism/commit/8403e453) +* New Filter highlightAll plugin ([#2074](https://github.com/PrismJS/prism/issues/2074)) [`a7f70090`](https://github.com/PrismJS/prism/commit/a7f70090) +* __Custom Class__ + * New class adder feature ([#2075](https://github.com/PrismJS/prism/issues/2075)) [`dab7998e`](https://github.com/PrismJS/prism/commit/dab7998e) +* __File Highlight__ + * Made the download button its own plugin ([#1840](https://github.com/PrismJS/prism/issues/1840)) [`c6c62a69`](https://github.com/PrismJS/prism/commit/c6c62a69) + +### Other + +* Issue template improvements ([#2069](https://github.com/PrismJS/prism/issues/2069)) [`53f07b1b`](https://github.com/PrismJS/prism/commit/53f07b1b) +* Readme: Links now use HTTPS if available ([#2045](https://github.com/PrismJS/prism/issues/2045)) [`6cd0738a`](https://github.com/PrismJS/prism/commit/6cd0738a) +* __Core__ + * Fixed null reference ([#2106](https://github.com/PrismJS/prism/issues/2106)) [`0fd062d5`](https://github.com/PrismJS/prism/commit/0fd062d5) + * Fixed race condition caused by deferring the script ([#2103](https://github.com/PrismJS/prism/issues/2103)) [`a3785ec9`](https://github.com/PrismJS/prism/commit/a3785ec9) + * Minor improvements ([#1973](https://github.com/PrismJS/prism/issues/1973)) [`2d858e0a`](https://github.com/PrismJS/prism/commit/2d858e0a) + * Fixed greedy partial lookbehinds not working ([#2030](https://github.com/PrismJS/prism/issues/2030)) [`174ed103`](https://github.com/PrismJS/prism/commit/174ed103) + * Fixed greedy targeting bug ([#1932](https://github.com/PrismJS/prism/issues/1932)) [`e864d518`](https://github.com/PrismJS/prism/commit/e864d518) + * Doubly check the `manual` flag ([#1957](https://github.com/PrismJS/prism/issues/1957)) [`d49f0f26`](https://github.com/PrismJS/prism/commit/d49f0f26) + * IE11 workaround for `currentScript` ([#2104](https://github.com/PrismJS/prism/issues/2104)) [`2108c60f`](https://github.com/PrismJS/prism/commit/2108c60f) +* __Infrastructure__ + * gulp: Fixed changes task [`2f495905`](https://github.com/PrismJS/prism/commit/2f495905) + * npm: Added `.github` folder to npm ignore ([#2052](https://github.com/PrismJS/prism/issues/2052)) [`1af89e06`](https://github.com/PrismJS/prism/commit/1af89e06) + * npm: Updated dependencies to fix 122 vulnerabilities ([#1997](https://github.com/PrismJS/prism/issues/1997)) [`3af5d744`](https://github.com/PrismJS/prism/commit/3af5d744) + * Tests: New test for unused capturing groups ([#1996](https://github.com/PrismJS/prism/issues/1996)) [`c187e229`](https://github.com/PrismJS/prism/commit/c187e229) + * Tests: Simplified error message format ([#2056](https://github.com/PrismJS/prism/issues/2056)) [`007c9af4`](https://github.com/PrismJS/prism/commit/007c9af4) + * Tests: New test for nice names ([#1911](https://github.com/PrismJS/prism/issues/1911)) [`3fda5c95`](https://github.com/PrismJS/prism/commit/3fda5c95) + * Standardized dependency logic implementation ([#1998](https://github.com/PrismJS/prism/issues/1998)) [`7a4a0c7c`](https://github.com/PrismJS/prism/commit/7a4a0c7c) +* __Website__ + * Added @mAAdhaTTah and @RunDevelopment to credits and footer [`5d07aa7c`](https://github.com/PrismJS/prism/commit/5d07aa7c) + * Added plugin descriptions to plugin list ([#2076](https://github.com/PrismJS/prism/issues/2076)) [`cdfa60ac`](https://github.com/PrismJS/prism/commit/cdfa60ac) + * Use HTTPS link to alistapart.com ([#2044](https://github.com/PrismJS/prism/issues/2044)) [`8bcc1b85`](https://github.com/PrismJS/prism/commit/8bcc1b85) + * Fixed the Toolbar plugin's overflow issue ([#1966](https://github.com/PrismJS/prism/issues/1966)) [`56a8711c`](https://github.com/PrismJS/prism/commit/56a8711c) + * FAQ update ([#1977](https://github.com/PrismJS/prism/issues/1977)) [`8a572af5`](https://github.com/PrismJS/prism/commit/8a572af5) + * Use modern JavaScript in the NodeJS usage section ([#1942](https://github.com/PrismJS/prism/issues/1942)) [`5c68a556`](https://github.com/PrismJS/prism/commit/5c68a556) + * Improved test page performance for Chromium ([#2020](https://github.com/PrismJS/prism/issues/2020)) [`3509f3e5`](https://github.com/PrismJS/prism/commit/3509f3e5) + * Fixed alias example in extending page ([#2011](https://github.com/PrismJS/prism/issues/2011)) [`7cb65eec`](https://github.com/PrismJS/prism/commit/7cb65eec) + * Robot Framework: Renamed example file ([#2126](https://github.com/PrismJS/prism/issues/2126)) [`9908ca69`](https://github.com/PrismJS/prism/commit/9908ca69) + +## 1.17.1 (2019-07-21) + +### Other + +* __Infrastructure__ + * Add .DS_Store to npmignore [`c2229ec2`](https://github.com/PrismJS/prism/commit/c2229ec2) + +## 1.17.0 (2019-07-21) + +### New components + +* __DNS zone file__ ([#1961](https://github.com/PrismJS/prism/issues/1961)) [`bb84f98c`](https://github.com/PrismJS/prism/commit/bb84f98c) +* __JQ__ ([#1896](https://github.com/PrismJS/prism/issues/1896)) [`73d964be`](https://github.com/PrismJS/prism/commit/73d964be) +* __JS Templates__: Syntax highlighting inside tagged template literals ([#1931](https://github.com/PrismJS/prism/issues/1931)) [`c8844286`](https://github.com/PrismJS/prism/commit/c8844286) +* __LilyPond__ ([#1967](https://github.com/PrismJS/prism/issues/1967)) [`5d992fc5`](https://github.com/PrismJS/prism/commit/5d992fc5) +* __PascaLIGO__ ([#1947](https://github.com/PrismJS/prism/issues/1947)) [`858201c7`](https://github.com/PrismJS/prism/commit/858201c7) +* __PC-Axis__ ([#1940](https://github.com/PrismJS/prism/issues/1940)) [`473f7fbd`](https://github.com/PrismJS/prism/commit/473f7fbd) +* __Shell session__ ([#1892](https://github.com/PrismJS/prism/issues/1892)) [`96044979`](https://github.com/PrismJS/prism/commit/96044979) +* __Splunk SPL__ ([#1962](https://github.com/PrismJS/prism/issues/1962)) [`c93c066b`](https://github.com/PrismJS/prism/commit/c93c066b) + +### New plugins + +* __Diff Highlight__: Syntax highlighting inside diff blocks ([#1889](https://github.com/PrismJS/prism/issues/1889)) [`e7702ae1`](https://github.com/PrismJS/prism/commit/e7702ae1) + +### Updated components + +* __Bash__ + * Major improvements ([#1443](https://github.com/PrismJS/prism/issues/1443)) [`363281b3`](https://github.com/PrismJS/prism/commit/363281b3) +* __C#__ + * Added `cs` alias ([#1899](https://github.com/PrismJS/prism/issues/1899)) [`a8164559`](https://github.com/PrismJS/prism/commit/a8164559) +* __C++__ + * Fixed number pattern ([#1887](https://github.com/PrismJS/prism/issues/1887)) [`3de29e72`](https://github.com/PrismJS/prism/commit/3de29e72) +* __CSS__ + * Extended `url` inside ([#1874](https://github.com/PrismJS/prism/issues/1874)) [`f0a10669`](https://github.com/PrismJS/prism/commit/f0a10669) + * Removed unnecessary flag and modifier ([#1875](https://github.com/PrismJS/prism/issues/1875)) [`74050c68`](https://github.com/PrismJS/prism/commit/74050c68) +* __CSS Extras__ + * Added `even` & `odd` keywords to `n-th` pattern ([#1872](https://github.com/PrismJS/prism/issues/1872)) [`5e5a3e00`](https://github.com/PrismJS/prism/commit/5e5a3e00) +* __F#__ + * Improved character literals ([#1956](https://github.com/PrismJS/prism/issues/1956)) [`d58d2aeb`](https://github.com/PrismJS/prism/commit/d58d2aeb) +* __JavaScript__ + * Fixed escaped template interpolation ([#1931](https://github.com/PrismJS/prism/issues/1931)) [`c8844286`](https://github.com/PrismJS/prism/commit/c8844286) + * Added support for private fields ([#1950](https://github.com/PrismJS/prism/issues/1950)) [`7bd08327`](https://github.com/PrismJS/prism/commit/7bd08327) + * Added support for numeric separators ([#1895](https://github.com/PrismJS/prism/issues/1895)) [`6068bf18`](https://github.com/PrismJS/prism/commit/6068bf18) + * Increased bracket count of interpolation expressions in template strings ([#1845](https://github.com/PrismJS/prism/issues/1845)) [`c13d6e7d`](https://github.com/PrismJS/prism/commit/c13d6e7d) + * Added support for the `s` regex flag ([#1846](https://github.com/PrismJS/prism/issues/1846)) [`9e164935`](https://github.com/PrismJS/prism/commit/9e164935) + * Formatting: Added missing semicolon ([#1856](https://github.com/PrismJS/prism/issues/1856)) [`e2683959`](https://github.com/PrismJS/prism/commit/e2683959) +* __JSON__ + * Kinda fixed comment issue ([#1853](https://github.com/PrismJS/prism/issues/1853)) [`cbe05ec3`](https://github.com/PrismJS/prism/commit/cbe05ec3) +* __Julia__ + * Added `struct` keyword ([#1941](https://github.com/PrismJS/prism/issues/1941)) [`feb1b6f5`](https://github.com/PrismJS/prism/commit/feb1b6f5) + * Highlight `Inf` and `NaN` as constants ([#1921](https://github.com/PrismJS/prism/issues/1921)) [`2141129f`](https://github.com/PrismJS/prism/commit/2141129f) + * Added `in` keyword ([#1918](https://github.com/PrismJS/prism/issues/1918)) [`feb3187f`](https://github.com/PrismJS/prism/commit/feb3187f) +* __LaTeX__ + * Added TeX and ConTeXt alias ([#1915](https://github.com/PrismJS/prism/issues/1915)) [`5ad58a75`](https://github.com/PrismJS/prism/commit/5ad58a75) + * Added support for $$ equations [`6f53f749`](https://github.com/PrismJS/prism/commit/6f53f749) +* __Markdown__ + * Markdown: Added support for auto-loading code block languages ([#1898](https://github.com/PrismJS/prism/issues/1898)) [`05823e88`](https://github.com/PrismJS/prism/commit/05823e88) + * Improved URLs ([#1955](https://github.com/PrismJS/prism/issues/1955)) [`b9ec6fd8`](https://github.com/PrismJS/prism/commit/b9ec6fd8) + * Added support for nested bold and italic expressions ([#1897](https://github.com/PrismJS/prism/issues/1897)) [`11903721`](https://github.com/PrismJS/prism/commit/11903721) + * Added support for tables ([#1848](https://github.com/PrismJS/prism/issues/1848)) [`cedb8e84`](https://github.com/PrismJS/prism/commit/cedb8e84) +* __Perl__ + * Added `return` keyword ([#1943](https://github.com/PrismJS/prism/issues/1943)) [`2f39de97`](https://github.com/PrismJS/prism/commit/2f39de97) +* __Protocol Buffers__ + * Full support for PB2 and PB3 syntax + numerous other improvements ([#1948](https://github.com/PrismJS/prism/issues/1948)) [`de10bd1d`](https://github.com/PrismJS/prism/commit/de10bd1d) +* __reST (reStructuredText)__ + * Fixed exponentially backtracking pattern ([#1986](https://github.com/PrismJS/prism/issues/1986)) [`8b5d67a3`](https://github.com/PrismJS/prism/commit/8b5d67a3) +* __Rust__ + * Added `async` and `await` keywords. ([#1882](https://github.com/PrismJS/prism/issues/1882)) [`4faa3314`](https://github.com/PrismJS/prism/commit/4faa3314) + * Improved punctuation and operators ([#1839](https://github.com/PrismJS/prism/issues/1839)) [`a42b1557`](https://github.com/PrismJS/prism/commit/a42b1557) +* __Sass (Scss)__ + * Fixed exponential url pattern ([#1938](https://github.com/PrismJS/prism/issues/1938)) [`4b6b6e8b`](https://github.com/PrismJS/prism/commit/4b6b6e8b) +* __Scheme__ + * Added support for rational number literals ([#1964](https://github.com/PrismJS/prism/issues/1964)) [`e8811d22`](https://github.com/PrismJS/prism/commit/e8811d22) +* __TOML__ + * Minor improvements ([#1917](https://github.com/PrismJS/prism/issues/1917)) [`3e181241`](https://github.com/PrismJS/prism/commit/3e181241) +* __Visual Basic__ + * Added support for interpolation strings ([#1971](https://github.com/PrismJS/prism/issues/1971)) [`4a2c90c1`](https://github.com/PrismJS/prism/commit/4a2c90c1) + +### Updated plugins + +* __Autolinker__ + * Improved component path guessing ([#1928](https://github.com/PrismJS/prism/issues/1928)) [`452d5c7d`](https://github.com/PrismJS/prism/commit/452d5c7d) + * Improved URL regex ([#1842](https://github.com/PrismJS/prism/issues/1842)) [`eb28b62b`](https://github.com/PrismJS/prism/commit/eb28b62b) +* __Autoloader__ + * Fixed and improved callbacks ([#1935](https://github.com/PrismJS/prism/issues/1935)) [`b19f512f`](https://github.com/PrismJS/prism/commit/b19f512f) +* __Command Line__ + * Fix for uncaught errors for empty 'commandLine' object. ([#1862](https://github.com/PrismJS/prism/issues/1862)) [`c24831b5`](https://github.com/PrismJS/prism/commit/c24831b5) +* __Copy to Clipboard Button__ + * Switch anchor to button ([#1926](https://github.com/PrismJS/prism/issues/1926)) [`79880197`](https://github.com/PrismJS/prism/commit/79880197) +* __Custom Class__ + * Added mapper functions for language specific transformations ([#1873](https://github.com/PrismJS/prism/issues/1873)) [`acceb3b5`](https://github.com/PrismJS/prism/commit/acceb3b5) +* __Line Highlight__ + * Batching DOM read/writes to avoid reflows ([#1865](https://github.com/PrismJS/prism/issues/1865)) [`632ce00c`](https://github.com/PrismJS/prism/commit/632ce00c) +* __Toolbar__ + * Added `className` option for toolbar items ([#1951](https://github.com/PrismJS/prism/issues/1951)) [`5ab28bbe`](https://github.com/PrismJS/prism/commit/5ab28bbe) + * Set opacity to 1 when focus is within ([#1927](https://github.com/PrismJS/prism/issues/1927)) [`0b1662dd`](https://github.com/PrismJS/prism/commit/0b1662dd) + +### Updated themes + +* __Funky__ + * Fixed typo ([#1960](https://github.com/PrismJS/prism/issues/1960)) [`7d056591`](https://github.com/PrismJS/prism/commit/7d056591) + +### Other + +* README: Added npm downloads badge ([#1934](https://github.com/PrismJS/prism/issues/1934)) [`d673d701`](https://github.com/PrismJS/prism/commit/d673d701) +* README: Minor changes ([#1857](https://github.com/PrismJS/prism/issues/1857)) [`77e403cb`](https://github.com/PrismJS/prism/commit/77e403cb) +* Clearer description for the highlighting bug report template ([#1850](https://github.com/PrismJS/prism/issues/1850)) [`2f9c9261`](https://github.com/PrismJS/prism/commit/2f9c9261) +* More language examples ([#1917](https://github.com/PrismJS/prism/issues/1917)) [`3e181241`](https://github.com/PrismJS/prism/commit/3e181241) +* __Core__ + * Removed `env.elements` from `before-highlightall` hook ([#1968](https://github.com/PrismJS/prism/issues/1968)) [`9d9e2ca4`](https://github.com/PrismJS/prism/commit/9d9e2ca4) + * Made `language-none` the default language ([#1858](https://github.com/PrismJS/prism/issues/1858)) [`fd691c52`](https://github.com/PrismJS/prism/commit/fd691c52) + * Removed `parent` from the `wrap` hook's environment ([#1837](https://github.com/PrismJS/prism/issues/1837)) [`65a4e894`](https://github.com/PrismJS/prism/commit/65a4e894) +* __Infrastructure__ + * gulp: Split `gulpfile.js` and expanded `changes` task ([#1835](https://github.com/PrismJS/prism/issues/1835)) [`033c5ad8`](https://github.com/PrismJS/prism/commit/033c5ad8) + * gulp: JSON formatting for partly generated files ([#1933](https://github.com/PrismJS/prism/issues/1933)) [`d4373f3a`](https://github.com/PrismJS/prism/commit/d4373f3a) + * gulp: Use `async` functions & drop testing on Node v6 ([#1783](https://github.com/PrismJS/prism/issues/1783)) [`0dd44d53`](https://github.com/PrismJS/prism/commit/0dd44d53) + * Tests: `lookbehind` test for patterns ([#1890](https://github.com/PrismJS/prism/issues/1890)) [`3ba786cd`](https://github.com/PrismJS/prism/commit/3ba786cd) + * Tests: Added test for empty regexes ([#1847](https://github.com/PrismJS/prism/issues/1847)) [`c1e6a7fd`](https://github.com/PrismJS/prism/commit/c1e6a7fd) +* __Website__ + * Added tutorial for using PrismJS with React ([#1979](https://github.com/PrismJS/prism/issues/1979)) [`f1e16c7b`](https://github.com/PrismJS/prism/commit/f1e16c7b) + * Update footer's GitHub repository URL and capitalisation of "GitHub" ([#1983](https://github.com/PrismJS/prism/issues/1983)) [`bab744a6`](https://github.com/PrismJS/prism/commit/bab744a6) + * Added known failures page ([#1876](https://github.com/PrismJS/prism/issues/1876)) [`36a5fa0e`](https://github.com/PrismJS/prism/commit/36a5fa0e) + * Added basic usage for CDNs ([#1924](https://github.com/PrismJS/prism/issues/1924)) [`922ec555`](https://github.com/PrismJS/prism/commit/922ec555) + * New tutorial for Drupal ([#1859](https://github.com/PrismJS/prism/issues/1859)) [`d2089d83`](https://github.com/PrismJS/prism/commit/d2089d83) + * Updated website page styles to not interfere with themes ([#1952](https://github.com/PrismJS/prism/issues/1952)) [`b6543853`](https://github.com/PrismJS/prism/commit/b6543853) + * Download page: Improved performance for Chromium-based browsers ([#1907](https://github.com/PrismJS/prism/issues/1907)) [`11f18e36`](https://github.com/PrismJS/prism/commit/11f18e36) + * Download page: Fixed Edge's word wrap ([#1920](https://github.com/PrismJS/prism/issues/1920)) [`5d191b92`](https://github.com/PrismJS/prism/commit/5d191b92) + * Examples page: Minor improvements ([#1919](https://github.com/PrismJS/prism/issues/1919)) [`a16d4a25`](https://github.com/PrismJS/prism/commit/a16d4a25) + * Extending page: Fixed typo + new alias section ([#1949](https://github.com/PrismJS/prism/issues/1949)) [`24c8e717`](https://github.com/PrismJS/prism/commit/24c8e717) + * Extending page: Added "Creating a new language definition" section ([#1925](https://github.com/PrismJS/prism/issues/1925)) [`ddf81233`](https://github.com/PrismJS/prism/commit/ddf81233) + * Test page: Use `prism-core.js` instead of `prism.js` ([#1908](https://github.com/PrismJS/prism/issues/1908)) [`0853e694`](https://github.com/PrismJS/prism/commit/0853e694) + * Copy to clipboard: Fixed typo ([#1869](https://github.com/PrismJS/prism/issues/1869)) [`59d4323f`](https://github.com/PrismJS/prism/commit/59d4323f) + * JSONP Highlight: Fixed examples ([#1877](https://github.com/PrismJS/prism/issues/1877)) [`f8ae465d`](https://github.com/PrismJS/prism/commit/f8ae465d) + * Line numbers: Fixed typo on webpage ([#1838](https://github.com/PrismJS/prism/issues/1838)) [`0f16eb87`](https://github.com/PrismJS/prism/commit/0f16eb87) + +## 1.16.0 (2019-03-24) + +### New components + +* __ANBF__ ([#1753](https://github.com/PrismJS/prism/issues/1753)) [`6d98f0e7`](https://github.com/PrismJS/prism/commit/6d98f0e7) +* __BNF__ & __RBNF__ ([#1754](https://github.com/PrismJS/prism/issues/1754)) [`1df96c55`](https://github.com/PrismJS/prism/commit/1df96c55) +* __CIL__ ([#1593](https://github.com/PrismJS/prism/issues/1593)) [`38def334`](https://github.com/PrismJS/prism/commit/38def334) +* __CMake__ ([#1820](https://github.com/PrismJS/prism/issues/1820)) [`30779976`](https://github.com/PrismJS/prism/commit/30779976) +* __Doc comment__ ([#1541](https://github.com/PrismJS/prism/issues/1541)) [`493d19ef`](https://github.com/PrismJS/prism/commit/493d19ef) +* __EBNF__ ([#1756](https://github.com/PrismJS/prism/issues/1756)) [`13e1c97d`](https://github.com/PrismJS/prism/commit/13e1c97d) +* __EJS__ ([#1769](https://github.com/PrismJS/prism/issues/1769)) [`c37c90df`](https://github.com/PrismJS/prism/commit/c37c90df) +* __G-code__ ([#1572](https://github.com/PrismJS/prism/issues/1572)) [`2288c25e`](https://github.com/PrismJS/prism/commit/2288c25e) +* __GameMaker Language__ ([#1551](https://github.com/PrismJS/prism/issues/1551)) [`e529edd8`](https://github.com/PrismJS/prism/commit/e529edd8) +* __HCL__ ([#1594](https://github.com/PrismJS/prism/issues/1594)) [`c939df8e`](https://github.com/PrismJS/prism/commit/c939df8e) +* __Java stack trace__ ([#1520](https://github.com/PrismJS/prism/issues/1520)) [`4a8219a4`](https://github.com/PrismJS/prism/commit/4a8219a4) +* __JavaScript Extras__ ([#1743](https://github.com/PrismJS/prism/issues/1743)) [`bb628606`](https://github.com/PrismJS/prism/commit/bb628606) +* __JSON5__ ([#1744](https://github.com/PrismJS/prism/issues/1744)) [`64dc049d`](https://github.com/PrismJS/prism/commit/64dc049d) +* __N1QL__ ([#1620](https://github.com/PrismJS/prism/issues/1620)) [`7def8f5c`](https://github.com/PrismJS/prism/commit/7def8f5c) +* __Nand To Tetris HDL__ ([#1710](https://github.com/PrismJS/prism/issues/1710)) [`b94b56c1`](https://github.com/PrismJS/prism/commit/b94b56c1) +* __Regex__ ([#1682](https://github.com/PrismJS/prism/issues/1682)) [`571704cb`](https://github.com/PrismJS/prism/commit/571704cb) +* __T4__ ([#1699](https://github.com/PrismJS/prism/issues/1699)) [`16f2ad06`](https://github.com/PrismJS/prism/commit/16f2ad06) +* __TOML__ ([#1488](https://github.com/PrismJS/prism/issues/1488)) [`5b6ad70d`](https://github.com/PrismJS/prism/commit/5b6ad70d) +* __Vala__ ([#1658](https://github.com/PrismJS/prism/issues/1658)) [`b48c012c`](https://github.com/PrismJS/prism/commit/b48c012c) + +### Updated components + +* Fixed dependencies of Pug and Pure ([#1759](https://github.com/PrismJS/prism/issues/1759)) [`c9a32674`](https://github.com/PrismJS/prism/commit/c9a32674) +* Add file extensions support for major languages ([#1478](https://github.com/PrismJS/prism/issues/1478)) [`0c8f6504`](https://github.com/PrismJS/prism/commit/0c8f6504) +* Fixed patterns which can match the empty string ([#1775](https://github.com/PrismJS/prism/issues/1775)) [`86dd3e42`](https://github.com/PrismJS/prism/commit/86dd3e42) +* More variables for better code compression ([#1489](https://github.com/PrismJS/prism/issues/1489)) [`bc53e093`](https://github.com/PrismJS/prism/commit/bc53e093) +* Added missing aliases ([#1830](https://github.com/PrismJS/prism/issues/1830)) [`8d28c74c`](https://github.com/PrismJS/prism/commit/8d28c74c) +* Replaced all occurrences of `new RegExp` with `RegExp` ([#1493](https://github.com/PrismJS/prism/issues/1493)) [`44fed4d3`](https://github.com/PrismJS/prism/commit/44fed4d3) +* Added missing aliases to components.json ([#1503](https://github.com/PrismJS/prism/issues/1503)) [`2fb66e04`](https://github.com/PrismJS/prism/commit/2fb66e04) +* __Apacheconf__ + * Apache config: Minor improvements + new keyword ([#1823](https://github.com/PrismJS/prism/issues/1823)) [`a91be7b2`](https://github.com/PrismJS/prism/commit/a91be7b2) +* __AsciiDoc__ + * Added `adoc` alias for AsciiDoc ([#1685](https://github.com/PrismJS/prism/issues/1685)) [`88434f7a`](https://github.com/PrismJS/prism/commit/88434f7a) +* __Bash__ + * Add additional commands to bash ([#1577](https://github.com/PrismJS/prism/issues/1577)) [`a2230c38`](https://github.com/PrismJS/prism/commit/a2230c38) + * Added `yarn add` to bash functions ([#1731](https://github.com/PrismJS/prism/issues/1731)) [`3a32cb75`](https://github.com/PrismJS/prism/commit/3a32cb75) + * Added `pnpm` function to Bash ([#1734](https://github.com/PrismJS/prism/issues/1734)) [`fccfb98d`](https://github.com/PrismJS/prism/commit/fccfb98d) +* __Batch__ + * Remove batch's shell alias ([#1543](https://github.com/PrismJS/prism/issues/1543)) [`7155e60f`](https://github.com/PrismJS/prism/commit/7155e60f) +* __C__ + * Improve C language ([#1697](https://github.com/PrismJS/prism/issues/1697)) [`7eccea5c`](https://github.com/PrismJS/prism/commit/7eccea5c) +* __C-like__ + * Simplify function pattern of C-like language ([#1552](https://github.com/PrismJS/prism/issues/1552)) [`b520e1b6`](https://github.com/PrismJS/prism/commit/b520e1b6) +* __C/C++/Java__ + * Operator fixes ([#1528](https://github.com/PrismJS/prism/issues/1528)) [`7af8f8be`](https://github.com/PrismJS/prism/commit/7af8f8be) +* __C#__ + * Improvements to C# operator and punctuation ([#1532](https://github.com/PrismJS/prism/issues/1532)) [`3b1e0916`](https://github.com/PrismJS/prism/commit/3b1e0916) +* __CSS__ + * Fix tokenizing !important ([#1585](https://github.com/PrismJS/prism/issues/1585)) [`c1d6cb85`](https://github.com/PrismJS/prism/commit/c1d6cb85) + * Added the comma to the list of CSS punctuation [`7ea2ff28`](https://github.com/PrismJS/prism/commit/7ea2ff28) + * CSS: Comma punctuation ([#1632](https://github.com/PrismJS/prism/issues/1632)) [`1b812386`](https://github.com/PrismJS/prism/commit/1b812386) + * Reuse CSS selector pattern in CSS Extras ([#1637](https://github.com/PrismJS/prism/issues/1637)) [`e2f2fd19`](https://github.com/PrismJS/prism/commit/e2f2fd19) + * Fixed CSS extra variable ([#1649](https://github.com/PrismJS/prism/issues/1649)) [`9de47d3a`](https://github.com/PrismJS/prism/commit/9de47d3a) + * Identify CSS units and variables ([#1450](https://github.com/PrismJS/prism/issues/1450)) [`5fcee966`](https://github.com/PrismJS/prism/commit/5fcee966) + * Allow multiline CSS at-rules ([#1676](https://github.com/PrismJS/prism/issues/1676)) [`4f6f3c7d`](https://github.com/PrismJS/prism/commit/4f6f3c7d) + * CSS: Highlight attribute selector ([#1671](https://github.com/PrismJS/prism/issues/1671)) [`245b59d4`](https://github.com/PrismJS/prism/commit/245b59d4) + * CSS: Selectors can contain any string ([#1638](https://github.com/PrismJS/prism/issues/1638)) [`a2d445d0`](https://github.com/PrismJS/prism/commit/a2d445d0) + * CSS extras: Highlighting for pseudo class arguments ([#1650](https://github.com/PrismJS/prism/issues/1650)) [`70a40414`](https://github.com/PrismJS/prism/commit/70a40414) +* __Django__ + * Django/Jinja2 improvements ([#1800](https://github.com/PrismJS/prism/issues/1800)) [`f2467488`](https://github.com/PrismJS/prism/commit/f2467488) +* __F#__ + * Chars can only contain one character ([#1570](https://github.com/PrismJS/prism/issues/1570)) [`f96b083a`](https://github.com/PrismJS/prism/commit/f96b083a) + * Improve F# ([#1573](https://github.com/PrismJS/prism/issues/1573)) [`00bfc969`](https://github.com/PrismJS/prism/commit/00bfc969) +* __GraphQL__ + * Improved field highlighting for GraphQL ([#1711](https://github.com/PrismJS/prism/issues/1711)) [`44aeffb9`](https://github.com/PrismJS/prism/commit/44aeffb9) + * Added GraphQL improvements and tests ([#1788](https://github.com/PrismJS/prism/issues/1788)) [`b2298b12`](https://github.com/PrismJS/prism/commit/b2298b12) +* __Haskell__ + * Added `hs` alias for Haskell ([#1831](https://github.com/PrismJS/prism/issues/1831)) [`64baec3c`](https://github.com/PrismJS/prism/commit/64baec3c) +* __HTTP__ + * Improved HTTP content highlighting ([#1598](https://github.com/PrismJS/prism/issues/1598)) [`1b75da90`](https://github.com/PrismJS/prism/commit/1b75da90) +* __Ini__ + * Add support for # comments to INI language ([#1730](https://github.com/PrismJS/prism/issues/1730)) [`baf6bb0c`](https://github.com/PrismJS/prism/commit/baf6bb0c) +* __Java__ + * Add Java 10 support ([#1549](https://github.com/PrismJS/prism/issues/1549)) [`8c981a22`](https://github.com/PrismJS/prism/commit/8c981a22) + * Added module keywords to Java. ([#1655](https://github.com/PrismJS/prism/issues/1655)) [`6e250a5f`](https://github.com/PrismJS/prism/commit/6e250a5f) + * Improve Java ([#1474](https://github.com/PrismJS/prism/issues/1474)) [`81bd8f0b`](https://github.com/PrismJS/prism/commit/81bd8f0b) +* __JavaScript__ + * Fix regex for `catch` and `finally` ([#1527](https://github.com/PrismJS/prism/issues/1527)) [`ebd1b9a6`](https://github.com/PrismJS/prism/commit/ebd1b9a6) + * Highlighting of supposed classes and functions ([#1482](https://github.com/PrismJS/prism/issues/1482)) [`c40f6047`](https://github.com/PrismJS/prism/commit/c40f6047) + * Added support for JS BigInt literals ([#1542](https://github.com/PrismJS/prism/issues/1542)) [`2b62e57b`](https://github.com/PrismJS/prism/commit/2b62e57b) + * Fixed lowercase supposed class names ([#1544](https://github.com/PrismJS/prism/issues/1544)) [`a47c05ad`](https://github.com/PrismJS/prism/commit/a47c05ad) + * Fixes regex for JS examples ([#1591](https://github.com/PrismJS/prism/issues/1591)) [`b41fb8f1`](https://github.com/PrismJS/prism/commit/b41fb8f1) + * Improve regex detection in JS ([#1473](https://github.com/PrismJS/prism/issues/1473)) [`2a4758ab`](https://github.com/PrismJS/prism/commit/2a4758ab) + * Identify JavaScript function parameters ([#1446](https://github.com/PrismJS/prism/issues/1446)) [`0cc8c56a`](https://github.com/PrismJS/prism/commit/0cc8c56a) + * Improved JavaScript parameter recognization ([#1722](https://github.com/PrismJS/prism/issues/1722)) [`57a92035`](https://github.com/PrismJS/prism/commit/57a92035) + * Make `undefined` a keyword in JS ([#1740](https://github.com/PrismJS/prism/issues/1740)) [`d9fa29a8`](https://github.com/PrismJS/prism/commit/d9fa29a8) + * Fix `function-variable` in JS ([#1739](https://github.com/PrismJS/prism/issues/1739)) [`bfbea4d6`](https://github.com/PrismJS/prism/commit/bfbea4d6) + * Improved JS constant pattern ([#1737](https://github.com/PrismJS/prism/issues/1737)) [`7bcec584`](https://github.com/PrismJS/prism/commit/7bcec584) + * Improved JS function pattern ([#1736](https://github.com/PrismJS/prism/issues/1736)) [`8378ac83`](https://github.com/PrismJS/prism/commit/8378ac83) + * JS: Fixed variables named "async" ([#1738](https://github.com/PrismJS/prism/issues/1738)) [`3560c643`](https://github.com/PrismJS/prism/commit/3560c643) + * JS: Keyword fix ([#1808](https://github.com/PrismJS/prism/issues/1808)) [`f2d8e1c7`](https://github.com/PrismJS/prism/commit/f2d8e1c7) +* __JSON__ / __JSONP__ + * Fix bugs in JSON language ([#1479](https://github.com/PrismJS/prism/issues/1479)) [`74fe81c6`](https://github.com/PrismJS/prism/commit/74fe81c6) + * Adds support for comments in JSON ([#1595](https://github.com/PrismJS/prism/issues/1595)) [`8720b3e6`](https://github.com/PrismJS/prism/commit/8720b3e6) + * Cleaned up JSON ([#1596](https://github.com/PrismJS/prism/issues/1596)) [`da474c77`](https://github.com/PrismJS/prism/commit/da474c77) + * Added `keyword` alias to JSON's `null` ([#1733](https://github.com/PrismJS/prism/issues/1733)) [`eee06649`](https://github.com/PrismJS/prism/commit/eee06649) + * Fix JSONP support ([#1745](https://github.com/PrismJS/prism/issues/1745)) [`b5041cf9`](https://github.com/PrismJS/prism/commit/b5041cf9) + * Fixed JSON/JSONP examples ([#1765](https://github.com/PrismJS/prism/issues/1765)) [`ae4842db`](https://github.com/PrismJS/prism/commit/ae4842db) +* __JSX__ + * React component tags are styled as classes in JSX ([#1519](https://github.com/PrismJS/prism/issues/1519)) [`3e1a9a3d`](https://github.com/PrismJS/prism/commit/3e1a9a3d) + * Support JSX/TSX class-name with dot ([#1725](https://github.com/PrismJS/prism/issues/1725)) [`4362e42c`](https://github.com/PrismJS/prism/commit/4362e42c) +* __Less__ + * Remove useless insertBefore in LESS ([#1629](https://github.com/PrismJS/prism/issues/1629)) [`86d31793`](https://github.com/PrismJS/prism/commit/86d31793) +* __Lisp__ + * Fix Lisp exponential string pattern ([#1763](https://github.com/PrismJS/prism/issues/1763)) [`5bd182c0`](https://github.com/PrismJS/prism/commit/5bd182c0)) +* __Markdown__ + * Added strike support to markdown ([#1563](https://github.com/PrismJS/prism/issues/1563)) [`9d2fddc2`](https://github.com/PrismJS/prism/commit/9d2fddc2) + * Fixed Markdown headers ([#1557](https://github.com/PrismJS/prism/issues/1557)) [`c6584290`](https://github.com/PrismJS/prism/commit/c6584290) + * Add support for code blocks in Markdown ([#1562](https://github.com/PrismJS/prism/issues/1562)) [`b0717e70`](https://github.com/PrismJS/prism/commit/b0717e70) + * Markdown: The 'md' alias is now recognized by hooks ([#1771](https://github.com/PrismJS/prism/issues/1771)) [`8ca3d65b`](https://github.com/PrismJS/prism/commit/8ca3d65b) +* __Markup__ + * Decouple XML from Markup ([#1603](https://github.com/PrismJS/prism/issues/1603)) [`0030a4ef`](https://github.com/PrismJS/prism/commit/0030a4ef) + * Fix for markup attributes ([#1752](https://github.com/PrismJS/prism/issues/1752)) [`c3862a24`](https://github.com/PrismJS/prism/commit/c3862a24) + * Markup: Added support for CSS and JS inside of CDATAs ([#1660](https://github.com/PrismJS/prism/issues/1660)) [`57127701`](https://github.com/PrismJS/prism/commit/57127701) + * Markup `addInline` improvements ([#1798](https://github.com/PrismJS/prism/issues/1798)) [`af67c32e`](https://github.com/PrismJS/prism/commit/af67c32e) +* __Markup Templating__ + * Markup-templating improvements ([#1653](https://github.com/PrismJS/prism/issues/1653)) [`b62e282b`](https://github.com/PrismJS/prism/commit/b62e282b) +* __nginx__ + * Add new keywords to nginx ([#1587](https://github.com/PrismJS/prism/issues/1587)) [`0d73f7f5`](https://github.com/PrismJS/prism/commit/0d73f7f5) +* __PHP__ + * Update PHP keywords ([#1690](https://github.com/PrismJS/prism/issues/1690)) [`55fb0f8e`](https://github.com/PrismJS/prism/commit/55fb0f8e) + * Improve recognition of constants in PHP ([#1688](https://github.com/PrismJS/prism/issues/1688)) [`f1026b4b`](https://github.com/PrismJS/prism/commit/f1026b4b) + * Made false, true, and null constants in PHP ([#1694](https://github.com/PrismJS/prism/issues/1694)) [`439e3bd7`](https://github.com/PrismJS/prism/commit/439e3bd7) + * PHP: Fixed closing tag issue ([#1652](https://github.com/PrismJS/prism/issues/1652)) [`289ddd9b`](https://github.com/PrismJS/prism/commit/289ddd9b) +* __Python__ + * Operator keywords are now keywords ([#1617](https://github.com/PrismJS/prism/issues/1617)) [`1d1fb800`](https://github.com/PrismJS/prism/commit/1d1fb800) + * Add decorator support to Python ([#1639](https://github.com/PrismJS/prism/issues/1639)) [`2577b6e6`](https://github.com/PrismJS/prism/commit/2577b6e6) + * Improvements to Python F-strings and string prefixes ([#1642](https://github.com/PrismJS/prism/issues/1642)) [`a69c2b62`](https://github.com/PrismJS/prism/commit/a69c2b62) +* __Reason__ + * Added additional operators to Reason ([#1648](https://github.com/PrismJS/prism/issues/1648)) [`8b1bb469`](https://github.com/PrismJS/prism/commit/8b1bb469) +* __Ruby__ + * Consistent Ruby method highlighting ([#1523](https://github.com/PrismJS/prism/issues/1523)) [`72775919`](https://github.com/PrismJS/prism/commit/72775919) + * Ruby/ERB: Fixed block comments ([#1768](https://github.com/PrismJS/prism/issues/1768)) [`c805f859`](https://github.com/PrismJS/prism/commit/c805f859) +* __Rust__ + * Add missing keywords ([#1634](https://github.com/PrismJS/prism/issues/1634)) [`3590edde`](https://github.com/PrismJS/prism/commit/3590edde) +* __SAS__ + * Added new SAS keywords ([#1784](https://github.com/PrismJS/prism/issues/1784)) [`3b396ef5`](https://github.com/PrismJS/prism/commit/3b396ef5) +* __Scheme__ + * Fix function without arguments in scheme language ([#1463](https://github.com/PrismJS/prism/issues/1463)) [`12a827e7`](https://github.com/PrismJS/prism/commit/12a827e7) + * Scheme improvements ([#1556](https://github.com/PrismJS/prism/issues/1556)) [`225dd3f7`](https://github.com/PrismJS/prism/commit/225dd3f7) + * Fixed operator-like functions in Scheme ([#1467](https://github.com/PrismJS/prism/issues/1467)) [`f8c8add2`](https://github.com/PrismJS/prism/commit/f8c8add2) + * Scheme: Minor improvements ([#1814](https://github.com/PrismJS/prism/issues/1814)) [`191830f2`](https://github.com/PrismJS/prism/commit/191830f2) +* __SCSS__ + * Fixed that selector pattern can take exponential time ([#1499](https://github.com/PrismJS/prism/issues/1499)) [`0f75d9d4`](https://github.com/PrismJS/prism/commit/0f75d9d4) + * Move SCSS `property` definition ([#1633](https://github.com/PrismJS/prism/issues/1633)) [`0536fb14`](https://github.com/PrismJS/prism/commit/0536fb14) + * Add `keyword` alias for SCSS' `null` ([#1735](https://github.com/PrismJS/prism/issues/1735)) [`bd0378f0`](https://github.com/PrismJS/prism/commit/bd0378f0) +* __Smalltalk__ + * Allowed empty strings and comments ([#1747](https://github.com/PrismJS/prism/issues/1747)) [`5fd7577a`](https://github.com/PrismJS/prism/commit/5fd7577a) +* __Smarty__ + * Removed useless `insertBefore` call in Smarty ([#1677](https://github.com/PrismJS/prism/issues/1677)) [`bc49c361`](https://github.com/PrismJS/prism/commit/bc49c361) +* __SQL__ + * Added support for quote escapes to SQL strings ([#1500](https://github.com/PrismJS/prism/issues/1500)) [`a59a7926`](https://github.com/PrismJS/prism/commit/a59a7926) + * SQL Quoted variables are now greedy ([#1510](https://github.com/PrismJS/prism/issues/1510)) [`42d119a2`](https://github.com/PrismJS/prism/commit/42d119a2) +* __TypeScript__ + * Enhance definitions in TypeScript component ([#1522](https://github.com/PrismJS/prism/issues/1522)) [`11695629`](https://github.com/PrismJS/prism/commit/11695629) +* __YAML__ + * Allow YAML strings to have trailing comments ([#1602](https://github.com/PrismJS/prism/issues/1602)) [`1c5f28a9`](https://github.com/PrismJS/prism/commit/1c5f28a9) + +### Updated plugins + +* Better class name detection for plugins ([#1772](https://github.com/PrismJS/prism/issues/1772)) [`c9762c6f`](https://github.com/PrismJS/prism/commit/c9762c6f) +* __Autolinker__ + * Fix Autolinker url-decoding all tokens ([#1723](https://github.com/PrismJS/prism/issues/1723)) [`8cf20d49`](https://github.com/PrismJS/prism/commit/8cf20d49) +* __Autoloader__ + * Resolved variable name clash ([#1568](https://github.com/PrismJS/prism/issues/1568)) [`bfa5a8d9`](https://github.com/PrismJS/prism/commit/bfa5a8d9) + * Autoloader: Fixed the directory of scripts ([#1828](https://github.com/PrismJS/prism/issues/1828)) [`fd4c764f`](https://github.com/PrismJS/prism/commit/fd4c764f) + * Autoloader: Added support for aliases ([#1829](https://github.com/PrismJS/prism/issues/1829)) [`52889b5b`](https://github.com/PrismJS/prism/commit/52889b5b) +* __Command Line__ + * Fixed class regex for Command Line plugin ([#1566](https://github.com/PrismJS/prism/issues/1566)) [`9f6e5026`](https://github.com/PrismJS/prism/commit/9f6e5026) +* __File Highlight__ + * Prevent double-loading & add scope to File Highlight ([#1586](https://github.com/PrismJS/prism/issues/1586)) [`10239c14`](https://github.com/PrismJS/prism/commit/10239c14) +* __JSONP Highlight__ + * Cleanup JSONP highlight code ([#1674](https://github.com/PrismJS/prism/issues/1674)) [`28489698`](https://github.com/PrismJS/prism/commit/28489698) + * Fix typos & other issues in JSONP docs ([#1672](https://github.com/PrismJS/prism/issues/1672)) [`cd058a91`](https://github.com/PrismJS/prism/commit/cd058a91) + * JSONP highlight: Fixed minified adapter names ([#1793](https://github.com/PrismJS/prism/issues/1793)) [`5dd8f916`](https://github.com/PrismJS/prism/commit/5dd8f916) +* __Keep Markup__ + * Add unit tests to the Keep Markup plugin ([#1646](https://github.com/PrismJS/prism/issues/1646)) [`a944c418`](https://github.com/PrismJS/prism/commit/a944c418) +* __Line Numbers__ + * Added inheritance for the `line-numbers` class ([#1799](https://github.com/PrismJS/prism/issues/1799)) [`14be7489`](https://github.com/PrismJS/prism/commit/14be7489) +* __Previewers__ + * Fixed Previewers bug [#1496](https://github.com/PrismJS/prism/issues/1496) ([#1497](https://github.com/PrismJS/prism/issues/1497)) [`4b56f3c1`](https://github.com/PrismJS/prism/commit/4b56f3c1) +* __Show Invisibles__ + * Updated styles of show invisibles ([#1607](https://github.com/PrismJS/prism/issues/1607)) [`2ba62268`](https://github.com/PrismJS/prism/commit/2ba62268) + * Corrected load order of Show Invisibles ([#1612](https://github.com/PrismJS/prism/issues/1612)) [`6e0c6e86`](https://github.com/PrismJS/prism/commit/6e0c6e86) + * Show invisibles inside tokens ([#1610](https://github.com/PrismJS/prism/issues/1610)) [`1090b253`](https://github.com/PrismJS/prism/commit/1090b253) +* __Show Language__ + * Show Language plugin alias support and improvements ([#1683](https://github.com/PrismJS/prism/issues/1683)) [`4c66d72c`](https://github.com/PrismJS/prism/commit/4c66d72c) +* __Toolbar__ + * Toolbar: Minor improvements ([#1818](https://github.com/PrismJS/prism/issues/1818)) [`3ad47047`](https://github.com/PrismJS/prism/commit/3ad47047) + +### Updated themes + +* Normalized the font-size of pre and code ([#1791](https://github.com/PrismJS/prism/issues/1791)) [`878ef295`](https://github.com/PrismJS/prism/commit/878ef295) +* __Coy__ + * Correct typo ([#1508](https://github.com/PrismJS/prism/issues/1508)) [`c322fc80`](https://github.com/PrismJS/prism/commit/c322fc80) + +### Other changes + +* __Core__ + * `insertBefore` now correctly updates references ([#1531](https://github.com/PrismJS/prism/issues/1531)) [`9dfec340`](https://github.com/PrismJS/prism/commit/9dfec340) + * Invoke `callback` after `after-highlight` hook ([#1588](https://github.com/PrismJS/prism/issues/1588)) [`bfbe4464`](https://github.com/PrismJS/prism/commit/bfbe4464) + * Improve `Prism.util.type` performance ([#1545](https://github.com/PrismJS/prism/issues/1545)) [`2864fe24`](https://github.com/PrismJS/prism/commit/2864fe24) + * Remove unused `insertBefore` overload ([#1631](https://github.com/PrismJS/prism/issues/1631)) [`39686e12`](https://github.com/PrismJS/prism/commit/39686e12) + * Ignore duplicates in insertBefore ([#1628](https://github.com/PrismJS/prism/issues/1628)) [`d33d259c`](https://github.com/PrismJS/prism/commit/d33d259c) + * Remove the Prism.tokenize language parameter ([#1654](https://github.com/PrismJS/prism/issues/1654)) [`fbf0b094`](https://github.com/PrismJS/prism/commit/fbf0b094) + * Call `insert-before` hook properly ([#1709](https://github.com/PrismJS/prism/issues/1709)) [`393ab164`](https://github.com/PrismJS/prism/commit/393ab164) + * Improved languages.DFS and util.clone ([#1506](https://github.com/PrismJS/prism/issues/1506)) [`152a68ef`](https://github.com/PrismJS/prism/commit/152a68ef) + * Core: Avoid redeclaring variables in util.clone ([#1778](https://github.com/PrismJS/prism/issues/1778)) [`b06f532f`](https://github.com/PrismJS/prism/commit/b06f532f) + * Made prism-core a little more editor friendly ([#1776](https://github.com/PrismJS/prism/issues/1776)) [`bac09f0a`](https://github.com/PrismJS/prism/commit/bac09f0a) + * Applied Array.isArray ([#1804](https://github.com/PrismJS/prism/issues/1804)) [`11d0f75e`](https://github.com/PrismJS/prism/commit/11d0f75e) +* __Infrastructure__ + * Linkify changelog more + add missing PR references [`2a100db7`](https://github.com/PrismJS/prism/commit/2a100db7) + * Set default indentation size ([#1516](https://github.com/PrismJS/prism/issues/1516)) [`e63d1597`](https://github.com/PrismJS/prism/commit/e63d1597) + * Add travis repo badge to readme ([#1561](https://github.com/PrismJS/prism/issues/1561)) [`716923f4`](https://github.com/PrismJS/prism/commit/716923f4) + * Update README.md ([#1553](https://github.com/PrismJS/prism/issues/1553)) [`6d1a2c61`](https://github.com/PrismJS/prism/commit/6d1a2c61) + * Mention Prism Themes in README ([#1625](https://github.com/PrismJS/prism/issues/1625)) [`5db04656`](https://github.com/PrismJS/prism/commit/5db04656) + * Fixed CHANGELOG.md ([#1707](https://github.com/PrismJS/prism/issues/1707)) [`b1f8a65d`](https://github.com/PrismJS/prism/commit/b1f8a65d) ([#1704](https://github.com/PrismJS/prism/issues/1704)) [`66d2104a`](https://github.com/PrismJS/prism/commit/66d2104a) + * Change tested NodeJS versions ([#1651](https://github.com/PrismJS/prism/issues/1651)) [`6ec71e0b`](https://github.com/PrismJS/prism/commit/6ec71e0b) + * Inline regex source with gulp ([#1537](https://github.com/PrismJS/prism/issues/1537)) [`e894fc89`](https://github.com/PrismJS/prism/commit/e894fc89) ([#1716](https://github.com/PrismJS/prism/issues/1716)) [`217a6ea4`](https://github.com/PrismJS/prism/commit/217a6ea4) + * Improve gulp error messages with pump ([#1741](https://github.com/PrismJS/prism/issues/1741)) [`671f4ca0`](https://github.com/PrismJS/prism/commit/671f4ca0) + * Update gulp to version 4.0.0 ([#1779](https://github.com/PrismJS/prism/issues/1779)) [`06627f6a`](https://github.com/PrismJS/prism/commit/06627f6a) + * gulp: Refactoring ([#1780](https://github.com/PrismJS/prism/issues/1780)) [`6c9fe257`](https://github.com/PrismJS/prism/commit/6c9fe257) + * npm: Updated all dependencies ([#1742](https://github.com/PrismJS/prism/issues/1742)) [`9d908d5a`](https://github.com/PrismJS/prism/commit/9d908d5a) + * Tests: Pretty-printed token stream ([#1801](https://github.com/PrismJS/prism/issues/1801)) [`9ea6d600`](https://github.com/PrismJS/prism/commit/9ea6d600) + * Refactored tests ([#1795](https://github.com/PrismJS/prism/issues/1795)) [`832a9643`](https://github.com/PrismJS/prism/commit/832a9643) + * Added issue templates ([#1805](https://github.com/PrismJS/prism/issues/1805)) [`dedb475f`](https://github.com/PrismJS/prism/commit/dedb475f) + * npm: Fixed `test` script ([#1809](https://github.com/PrismJS/prism/issues/1809)) [`bc649dfa`](https://github.com/PrismJS/prism/commit/bc649dfa) + * Add command to generate CHANGELOG [`212666d3`](https://github.com/PrismJS/prism/commit/212666d3) + * Name in composer.json set to lowercase ([#1824](https://github.com/PrismJS/prism/issues/1824)) [`4f78f1d6`](https://github.com/PrismJS/prism/commit/4f78f1d6) + * Added alias tests ([#1832](https://github.com/PrismJS/prism/issues/1832)) [`5c1a6fb2`](https://github.com/PrismJS/prism/commit/5c1a6fb2) + * Travis: Fail when changed files are detected ([#1819](https://github.com/PrismJS/prism/issues/1819)) [`66b44e3b`](https://github.com/PrismJS/prism/commit/66b44e3b) + * Tests: Additional checks for Prism functions ([#1803](https://github.com/PrismJS/prism/issues/1803)) [`c3e74ea3`](https://github.com/PrismJS/prism/commit/c3e74ea3) + * Adjusted .npmignore ([#1834](https://github.com/PrismJS/prism/issues/1834)) [`29a30c62`](https://github.com/PrismJS/prism/commit/29a30c62) +* __Website__ + * Add Python triple-quoted strings "known failure" ([#1449](https://github.com/PrismJS/prism/issues/1449)) [`334c7bca`](https://github.com/PrismJS/prism/commit/334c7bca) + * Updated index.html to fix broken instructions ([#1462](https://github.com/PrismJS/prism/issues/1462)) [`7418dfdd`](https://github.com/PrismJS/prism/commit/7418dfdd) + * Improve download page typography ([#1484](https://github.com/PrismJS/prism/issues/1484)) [`b1c2f4df`](https://github.com/PrismJS/prism/commit/b1c2f4df) + * Fixed peer dependencies in download page ([#1491](https://github.com/PrismJS/prism/issues/1491)) [`9d15ff6e`](https://github.com/PrismJS/prism/commit/9d15ff6e) + * Fixed empty link in extending ([#1507](https://github.com/PrismJS/prism/issues/1507)) [`74916d48`](https://github.com/PrismJS/prism/commit/74916d48) + * Display language aliases ([#1626](https://github.com/PrismJS/prism/issues/1626)) [`654b527b`](https://github.com/PrismJS/prism/commit/654b527b) + * Clean up Previewers' page ([#1630](https://github.com/PrismJS/prism/issues/1630)) [`b0d1823c`](https://github.com/PrismJS/prism/commit/b0d1823c) + * Updated website table of contents styles ([#1681](https://github.com/PrismJS/prism/issues/1681)) [`efdd96c3`](https://github.com/PrismJS/prism/commit/efdd96c3) + * Added new third-party tutorial for using Prism in Gutenberg ([#1701](https://github.com/PrismJS/prism/issues/1701)) [`ff9ccbe5`](https://github.com/PrismJS/prism/commit/ff9ccbe5) + * Remove dead tutorial ([#1702](https://github.com/PrismJS/prism/issues/1702)) [`e2d3bc7e`](https://github.com/PrismJS/prism/commit/e2d3bc7e) + * Fix downloads page fetching from GitHub([#1684](https://github.com/PrismJS/prism/issues/1684)) [`dbd3555e`](https://github.com/PrismJS/prism/commit/dbd3555e) + * Remove parentheses from download page ([#1627](https://github.com/PrismJS/prism/issues/1627)) [`2ce0666d`](https://github.com/PrismJS/prism/commit/2ce0666d) + * Line Numbers plugin instructions clarifications ([#1719](https://github.com/PrismJS/prism/issues/1719)) [`00f4f04f`](https://github.com/PrismJS/prism/commit/00f4f04f) + * Fixed Toolbar plugin example ([#1726](https://github.com/PrismJS/prism/issues/1726)) [`5311ca32`](https://github.com/PrismJS/prism/commit/5311ca32) + * Test page: Show tokens option ([#1757](https://github.com/PrismJS/prism/issues/1757)) [`729cb28b`](https://github.com/PrismJS/prism/commit/729cb28b) + * Some encouragement for visitors of PrismJS.com to request new languages ([#1760](https://github.com/PrismJS/prism/issues/1760)) [`ea769e0b`](https://github.com/PrismJS/prism/commit/ea769e0b) + * Docs: Added missing parameter ([#1774](https://github.com/PrismJS/prism/issues/1774)) [`18f2921d`](https://github.com/PrismJS/prism/commit/18f2921d) + * More persistent test page ([#1529](https://github.com/PrismJS/prism/issues/1529)) [`3100fa31`](https://github.com/PrismJS/prism/commit/3100fa31) + * Added scripts directory ([#1781](https://github.com/PrismJS/prism/issues/1781)) [`439ea1ee`](https://github.com/PrismJS/prism/commit/439ea1ee) + * Fixed download page ([#1811](https://github.com/PrismJS/prism/issues/1811)) [`77c57446`](https://github.com/PrismJS/prism/commit/77c57446) + +## 1.15.0 (2018-06-16) + +### New components + +* __Template Tookit 2__ ([#1418](https://github.com/PrismJS/prism/issues/1418)) [[`e063992`](https://github.com/PrismJS/prism/commit/e063992)] +* __XQuery__ ([#1411](https://github.com/PrismJS/prism/issues/1411)) [[`e326cb0`](https://github.com/PrismJS/prism/commit/e326cb0)] +* __TAP__ ([#1430](https://github.com/PrismJS/prism/issues/1430)) [[`8c2b71f`](https://github.com/PrismJS/prism/commit/8c2b71f)] + +### Updated components + +* __HTTP__ + * Absolute path is a valid request uri ([#1388](https://github.com/PrismJS/prism/issues/1388)) [[`f6e81cb`](https://github.com/PrismJS/prism/commit/f6e81cb)] +* __Kotlin__ + * Add keywords of Kotlin and modify it's number pattern. ([#1389](https://github.com/PrismJS/prism/issues/1389)) [[`1bf73b0`](https://github.com/PrismJS/prism/commit/1bf73b0)] + * Add `typealias` keyword ([#1437](https://github.com/PrismJS/prism/issues/1437)) [[`a21fdee`](https://github.com/PrismJS/prism/commit/a21fdee)] +* __JavaScript__ + * Improve Regexp pattern [[`5b043cf`](https://github.com/PrismJS/prism/commit/5b043cf)] + * Add support for one level of nesting inside template strings. Fix [#1397](https://github.com/PrismJS/prism/issues/1397) [[`db2d0eb`](https://github.com/PrismJS/prism/commit/db2d0eb)] +* __Elixir__ + * Elixir: Fix attributes consuming punctuation. Fix [#1392](https://github.com/PrismJS/prism/issues/1392) [[`dac0485`](https://github.com/PrismJS/prism/commit/dac0485)] +* __Bash__ + * Change reserved keyword reference ([#1396](https://github.com/PrismJS/prism/issues/1396)) [[`b94f01f`](https://github.com/PrismJS/prism/commit/b94f01f)] +* __PowerShell__ + * Allow for one level of nesting in expressions inside strings. Fix [#1407](https://github.com/PrismJS/prism/issues/1407) [[`9272d6f`](https://github.com/PrismJS/prism/commit/9272d6f)] +* __JSX__ + * Allow for two levels of nesting inside JSX tags. Fix [#1408](https://github.com/PrismJS/prism/issues/1408) [[`f1cd7c5`](https://github.com/PrismJS/prism/commit/f1cd7c5)] + * Add support for fragments short syntax. Fix [#1421](https://github.com/PrismJS/prism/issues/1421) [[`38ce121`](https://github.com/PrismJS/prism/commit/38ce121)] +* __Pascal__ + * Add `objectpascal` as an alias to `pascal` ([#1426](https://github.com/PrismJS/prism/issues/1426)) [[`a0bfc84`](https://github.com/PrismJS/prism/commit/a0bfc84)] +* __Swift__ + * Fix Swift 'protocol' keyword ([#1440](https://github.com/PrismJS/prism/issues/1440)) [[`081e318`](https://github.com/PrismJS/prism/commit/081e318)] + +### Updated plugins + +* __File Highlight__ + * Fix issue causing the Download button to show up on every code blocks. [[`cd22499`](https://github.com/PrismJS/prism/commit/cd22499)] + * Simplify lang regex on File Highlight plugin ([#1399](https://github.com/PrismJS/prism/issues/1399)) [[`7bc9a4a`](https://github.com/PrismJS/prism/commit/7bc9a4a)] +* __Show Language__ + * Don't process language if block language not set ([#1410](https://github.com/PrismJS/prism/issues/1410)) [[`c111869`](https://github.com/PrismJS/prism/commit/c111869)] +* __Autoloader__ + * ASP.NET should require C# [[`fa328bb`](https://github.com/PrismJS/prism/commit/fa328bb)] +* __Line Numbers__ + * Make line-numbers styles more specific ([#1434](https://github.com/PrismJS/prism/issues/1434), [#1435](https://github.com/PrismJS/prism/issues/1435)) [[`9ee4f54`](https://github.com/PrismJS/prism/commit/9ee4f54)] + +### Updated themes + +* Add .token.class-name to rest of themes ([#1360](https://github.com/PrismJS/prism/issues/1360)) [[`f356dfe`](https://github.com/PrismJS/prism/commit/f356dfe)] + +### Other changes + +* __Website__ + * Site now loads over HTTPS! + * Use HTTPS / canonical URLs ([#1390](https://github.com/PrismJS/prism/issues/1390)) [[`95146c8`](https://github.com/PrismJS/prism/commit/95146c8)] + * Added Angular tutorial link [[`c436a7c`](https://github.com/PrismJS/prism/commit/c436a7c)] + * Use rel="icon" instead of rel="shortcut icon" ([#1398](https://github.com/PrismJS/prism/issues/1398)) [[`d95f8fb`](https://github.com/PrismJS/prism/commit/d95f8fb)] + * Fix Download page not handling multiple dependencies when from Redownload URL [[`c2ff248`](https://github.com/PrismJS/prism/commit/c2ff248)] + * Update documentation for node & webpack usage [[`1e99e96`](https://github.com/PrismJS/prism/commit/1e99e96)] +* Handle optional dependencies in `loadLanguages()` ([#1417](https://github.com/PrismJS/prism/issues/1417)) [[`84935ac`](https://github.com/PrismJS/prism/commit/84935ac)] +* Add Chinese translation [[`f2b1964`](https://github.com/PrismJS/prism/commit/f2b1964)] + +## 1.14.0 (2018-04-11) + +### New components +* __GEDCOM__ ([#1385](https://github.com/PrismJS/prism/issues/1385)) [[`6e0b20a`](https://github.com/PrismJS/prism/commit/6e0b20a)] +* __Lisp__ ([#1297](https://github.com/PrismJS/prism/issues/1297)) [[`46468f8`](https://github.com/PrismJS/prism/commit/46468f8)] +* __Markup Templating__ ([#1367](https://github.com/PrismJS/prism/issues/1367)) [[`5f9c078`](https://github.com/PrismJS/prism/commit/5f9c078)] +* __Soy__ ([#1387](https://github.com/PrismJS/prism/issues/1387)) [[`b4509bf`](https://github.com/PrismJS/prism/commit/b4509bf)] +* __Velocity__ ([#1378](https://github.com/PrismJS/prism/issues/1378)) [[`5a524f7`](https://github.com/PrismJS/prism/commit/5a524f7)] +* __Visual Basic__ ([#1382](https://github.com/PrismJS/prism/issues/1382)) [[`c673ec2`](https://github.com/PrismJS/prism/commit/c673ec2)] +* __WebAssembly__ ([#1386](https://github.com/PrismJS/prism/issues/1386)) [[`c28d8c5`](https://github.com/PrismJS/prism/commit/c28d8c5)] + +### Updated components +* __Bash__: + * Add curl to the list of common functions. Close [#1160](https://github.com/PrismJS/prism/issues/1160) [[`1bfc084`](https://github.com/PrismJS/prism/commit/1bfc084)] +* __C-like__: + * Make single-line comments greedy. Fix [#1337](https://github.com/PrismJS/prism/issues/1337). Make sure [#1340](https://github.com/PrismJS/prism/issues/1340) stays fixed. [[`571f2c5`](https://github.com/PrismJS/prism/commit/571f2c5)] +* __C#__: + * More generic class-name highlighting. Fix [#1365](https://github.com/PrismJS/prism/issues/1365) [[`a6837d2`](https://github.com/PrismJS/prism/commit/a6837d2)] + * More specific class-name highlighting. Fix [#1371](https://github.com/PrismJS/prism/issues/1371) [[`0a95f69`](https://github.com/PrismJS/prism/commit/0a95f69)] +* __Eiffel__: + * Fix verbatim strings. Fix [#1379](https://github.com/PrismJS/prism/issues/1379) [[`04df41b`](https://github.com/PrismJS/prism/commit/04df41b)] +* __Elixir__ + * Make regexps greedy, remove comment hacks. Update known failures and tests. [[`e93d61f`](https://github.com/PrismJS/prism/commit/e93d61f)] +* __ERB__: + * Make highlighting work properly in NodeJS ([#1367](https://github.com/PrismJS/prism/issues/1367)) [[`5f9c078`](https://github.com/PrismJS/prism/commit/5f9c078)] +* __Fortran__: + * Make single-line comments greedy. Update known failures and tests. [[`c083b78`](https://github.com/PrismJS/prism/commit/c083b78)] +* __Handlebars__: + * Make highlighting work properly in NodeJS ([#1367](https://github.com/PrismJS/prism/issues/1367)) [[`5f9c078`](https://github.com/PrismJS/prism/commit/5f9c078)] +* __Java__: + * Add support for generics. Fix [#1351](https://github.com/PrismJS/prism/issues/1351) [[`a5cf302`](https://github.com/PrismJS/prism/commit/a5cf302)] +* __JavaScript__: + * Add support for constants. Fix [#1348](https://github.com/PrismJS/prism/issues/1348) [[`9084481`](https://github.com/PrismJS/prism/commit/9084481)] + * Improve Regex matching [[`172d351`](https://github.com/PrismJS/prism/commit/172d351)] +* __JSX__: + * Fix highlighting of empty objects. Fix [#1364](https://github.com/PrismJS/prism/issues/1364) [[`b26bbb8`](https://github.com/PrismJS/prism/commit/b26bbb8)] +* __Monkey__: + * Make comments greedy. Update known failures and tests. [[`d7b2b43`](https://github.com/PrismJS/prism/commit/d7b2b43)] +* __PHP__: + * Make highlighting work properly in NodeJS ([#1367](https://github.com/PrismJS/prism/issues/1367)) [[`5f9c078`](https://github.com/PrismJS/prism/commit/5f9c078)] +* __Puppet__: + * Make heredoc, comments, regexps and strings greedy. Update known failures and tests. [[`0c139d1`](https://github.com/PrismJS/prism/commit/0c139d1)] +* __Q__: + * Make comments greedy. Update known failures and tests. [[`a0f5081`](https://github.com/PrismJS/prism/commit/a0f5081)] +* __Ruby__: + * Make multi-line comments greedy, remove single-line comment hack. Update known failures and tests. [[`b0e34fb`](https://github.com/PrismJS/prism/commit/b0e34fb)] +* __SQL__: + * Add missing keywords. Fix [#1374](https://github.com/PrismJS/prism/issues/1374) [[`238b195`](https://github.com/PrismJS/prism/commit/238b195)] + +### Updated plugins +* __Command Line__: + * Command Line: Allow specifying output prefix using data-filter-output attribute. ([#856](https://github.com/PrismJS/prism/issues/856)) [[`094d546`](https://github.com/PrismJS/prism/commit/094d546)] +* __File Highlight__: + * Add option to provide a download button, when used with the Toolbar plugin. Fix [#1030](https://github.com/PrismJS/prism/issues/1030) [[`9f22952`](https://github.com/PrismJS/prism/commit/9f22952)] + +### Updated themes +* __Default__: + * Reach AA contrast ratio level ([#1296](https://github.com/PrismJS/prism/issues/1296)) [[`8aea939`](https://github.com/PrismJS/prism/commit/8aea939)] + +### Other changes +* Website: Remove broken third-party tutorials from homepage [[`0efd6e1`](https://github.com/PrismJS/prism/commit/0efd6e1)] +* Docs: Mention `loadLanguages()` function on homepage in the nodeJS section. Close [#972](https://github.com/PrismJS/prism/issues/972), close [#593](https://github.com/PrismJS/prism/issues/593) [[`4a14d20`](https://github.com/PrismJS/prism/commit/4a14d20)] +* Core: Greedy patterns should always be matched against the full string. Fix [#1355](https://github.com/PrismJS/prism/issues/1355) [[`294efaa`](https://github.com/PrismJS/prism/commit/294efaa)] +* Crystal: Update known failures. [[`e1d2d42`](https://github.com/PrismJS/prism/commit/e1d2d42)] +* D: Update known failures and tests. [[`13d9991`](https://github.com/PrismJS/prism/commit/13d9991)] +* Markdown: Update known failures. [[`5b6c76d`](https://github.com/PrismJS/prism/commit/5b6c76d)] +* Matlab: Update known failures. [[`259b6fc`](https://github.com/PrismJS/prism/commit/259b6fc)] +* Website: Remove non-existent anchor to failures. Reword on homepage to make is less misleading. [[`8c0911a`](https://github.com/PrismJS/prism/commit/8c0911a)] +* Website: Add link to Keep Markup plugin in FAQ [[`e8cb6d4`](https://github.com/PrismJS/prism/commit/e8cb6d4)] +* Test suite: Memory leak in vm.runInNewContext() seems fixed. Revert [[`9a4b6fa`](https://github.com/PrismJS/prism/commit/9a4b6fa)] to drastically improve tests execution time. [[`9bceece`](https://github.com/PrismJS/prism/commit/9bceece), [`7c7602b`](https://github.com/PrismJS/prism/commit/7c7602b)] +* Gulp: Don't minify `components/index.js` [[`689227b`](https://github.com/PrismJS/prism/commit/689227b)] +* Website: Fix theme selection on Download page, when theme is in query string or hash. [[`b4d3063`](https://github.com/PrismJS/prism/commit/b4d3063)] +* Update JSPM config to also include unminified components. Close [#995](https://github.com/PrismJS/prism/issues/995) [[`218f160`](https://github.com/PrismJS/prism/commit/218f160)] +* Core: Fix support for language alias containing dash `-` [[`659ea31`](https://github.com/PrismJS/prism/commit/659ea31)] + +## 1.13.0 (2018-03-21) + +### New components +* __ERB__ [[`e6213ac`](https://github.com/PrismJS/prism/commit/e6213ac)] +* __PL/SQL__ ([#1338](https://github.com/PrismJS/prism/issues/1338)) [[`3599e6a`](https://github.com/PrismJS/prism/commit/3599e6a)] + +### Updated components +* __JSX__: + * Add support for plain text inside tags ([#1357](https://github.com/PrismJS/prism/issues/1357)) [[`2b8321d`](https://github.com/PrismJS/prism/commit/2b8321d)] +* __Markup__: + * Make tags greedy. Fix [#1356](https://github.com/PrismJS/prism/issues/1356) [[`af834be`](https://github.com/PrismJS/prism/commit/af834be)] +* __Powershell__: + * Add lookbehind to fix function interpolation inside strings. Fix [#1361](https://github.com/PrismJS/prism/issues/1361) [[`d2c026e`](https://github.com/PrismJS/prism/commit/d2c026e)] +* __Rust__: + * Improve char pattern so that lifetime annotations are matched better. Fix [#1353](https://github.com/PrismJS/prism/issues/1353) [[`efdccbf`](https://github.com/PrismJS/prism/commit/efdccbf)] + +### Updated themes +* __Default__: + * Add color for class names [[`8572474`](https://github.com/PrismJS/prism/commit/8572474)] +* __Coy__: + * Inherit pre's height on code, so it does not break on Download page. [[`c6c7fd1`](https://github.com/PrismJS/prism/commit/c6c7fd1)] + +### Other changes +* Website: Auto-generate example headers [[`c3ed5b5`](https://github.com/PrismJS/prism/commit/c3ed5b5)] +* Core: Allow cloning of circular structures. ([#1345](https://github.com/PrismJS/prism/issues/1345)) [[`f90d555`](https://github.com/PrismJS/prism/commit/f90d555)] +* Core: Generate components.js from components.json and make it exportable to nodeJS. ([#1354](https://github.com/PrismJS/prism/issues/1354)) [[`ba60df0`](https://github.com/PrismJS/prism/commit/ba60df0)] +* Website: Improve appearance of theme selector [[`0460cad`](https://github.com/PrismJS/prism/commit/0460cad)] +* Website: Check stored theme by default + link both theme selectors together. Close [#1038](https://github.com/PrismJS/prism/issues/1038) [[`212dd4e`](https://github.com/PrismJS/prism/commit/212dd4e)] +* Tests: Use the new components.js file directly [[`0e1a8b7`](https://github.com/PrismJS/prism/commit/0e1a8b7)] +* Update .npmignore Close [#1274](https://github.com/PrismJS/prism/issues/1274) [[`a52319a`](https://github.com/PrismJS/prism/commit/a52319a)] +* Add a loadLanguages() function for easy component loading on NodeJS ([#1359](https://github.com/PrismJS/prism/issues/1359)) [[`a5331a6`](https://github.com/PrismJS/prism/commit/a5331a6)] + +## 1.12.2 (2018-03-08) + +### Other changes +* Test against NodeJS 4, 6, 8 and 9 ([#1329](https://github.com/PrismJS/prism/issues/1329)) [[`97b7d0a`](https://github.com/PrismJS/prism/commit/97b7d0a)] +* Stop testing against NodeJS 0.10 and 0.12 [[`df01b1b`](https://github.com/PrismJS/prism/commit/df01b1b)] + +## 1.12.1 (2018-03-08) + +### Updated components +* __C-like__: + * Revert [[`b98e5b9`](https://github.com/PrismJS/prism/commit/b98e5b9)] to fix [#1340](https://github.com/PrismJS/prism/issues/1340). Reopened [#1337](https://github.com/PrismJS/prism/issues/1337). [[`cebacdf`](https://github.com/PrismJS/prism/commit/cebacdf)] +* __JSX__: + * Allow for one level of nested curly braces inside tag attribute value. Fix [#1335](https://github.com/PrismJS/prism/issues/1335) [[`05bf67d`](https://github.com/PrismJS/prism/commit/05bf67d)] +* __Ruby__: + * Ensure module syntax is not confused with symbols. Fix [#1336](https://github.com/PrismJS/prism/issues/1336) [[`31a2a69`](https://github.com/PrismJS/prism/commit/31a2a69)] + +## 1.12.0 (2018-03-07) + +### New components +* __ARFF__ ([#1327](https://github.com/PrismJS/prism/issues/1327)) [[`0bc98ac`](https://github.com/PrismJS/prism/commit/0bc98ac)] +* __Clojure__ ([#1311](https://github.com/PrismJS/prism/issues/1311)) [[`8b4d3bd`](https://github.com/PrismJS/prism/commit/8b4d3bd)] +* __Liquid__ ([#1326](https://github.com/PrismJS/prism/issues/1326)) [[`f0b2c9e`](https://github.com/PrismJS/prism/commit/f0b2c9e)] + +### Updated components +* __Bash__: + * Add shell as an alias ([#1321](https://github.com/PrismJS/prism/issues/1321)) [[`67e16a2`](https://github.com/PrismJS/prism/commit/67e16a2)] + * Add support for quoted command substitution. Fix [#1287](https://github.com/PrismJS/prism/issues/1287) [[`63fc215`](https://github.com/PrismJS/prism/commit/63fc215)] +* __C#__: + * Add "dotnet" alias. [[`405867c`](https://github.com/PrismJS/prism/commit/405867c)] +* __C-like__: + * Change order of comment patterns and make multi-line one greedy. Fix [#1337](https://github.com/PrismJS/prism/issues/1337) [[`b98e5b9`](https://github.com/PrismJS/prism/commit/b98e5b9)] +* __NSIS__: + * Add support for NSIS 3.03 ([#1288](https://github.com/PrismJS/prism/issues/1288)) [[`bd1e98b`](https://github.com/PrismJS/prism/commit/bd1e98b)] + * Add missing NSIS commands ([#1289](https://github.com/PrismJS/prism/issues/1289)) [[`ad2948f`](https://github.com/PrismJS/prism/commit/ad2948f)] +* __PHP__: + * Add support for string interpolation inside double-quoted strings. Fix [#1146](https://github.com/PrismJS/prism/issues/1146) [[`9f1f8d6`](https://github.com/PrismJS/prism/commit/9f1f8d6)] + * Add support for Heredoc and Nowdoc strings [[`5d7223c`](https://github.com/PrismJS/prism/commit/5d7223c)] + * Fix shell-comment failure now that strings are greedy [[`ad25d22`](https://github.com/PrismJS/prism/commit/ad25d22)] +* __PowerShell__: + * Add support for two levels of nested brackets inside namespace pattern. Fixes [#1317](https://github.com/PrismJS/prism/issues/1317) [[`3bc3e9c`](https://github.com/PrismJS/prism/commit/3bc3e9c)] +* __Ruby__: + * Add keywords "protected", "private" and "public" [[`4593837`](https://github.com/PrismJS/prism/commit/4593837)] +* __Rust__: + * Add support for lifetime-annotation and => operator. Fix [#1339](https://github.com/PrismJS/prism/issues/1339) [[`926f6f8`](https://github.com/PrismJS/prism/commit/926f6f8)] +* __Scheme__: + * Don't highlight first number of a list as a function. Fix [#1331](https://github.com/PrismJS/prism/issues/1331) [[`51bff80`](https://github.com/PrismJS/prism/commit/51bff80)] +* __SQL__: + * Add missing keywords and functions, fix numbers [[`de29d4a`](https://github.com/PrismJS/prism/commit/de29d4a)] + +### Updated plugins +* __Autolinker__: + * Allow more chars in query string and hash to match more URLs. Fix [#1142](https://github.com/PrismJS/prism/issues/1142) [[`109bd6f`](https://github.com/PrismJS/prism/commit/109bd6f)] +* __Copy to Clipboard__: + * Bump ClipboardJS to 2.0.0 and remove hack ([#1314](https://github.com/PrismJS/prism/issues/1314)) [[`e9f410e`](https://github.com/PrismJS/prism/commit/e9f410e)] +* __Toolbar__: + * Prevent scrolling toolbar with content ([#1305](https://github.com/PrismJS/prism/issues/1305), [#1314](https://github.com/PrismJS/prism/issues/1314)) [[`84eeb89`](https://github.com/PrismJS/prism/commit/84eeb89)] +* __Unescaped Markup__: + * Use msMatchesSelector for IE11 and below. Fix [#1302](https://github.com/PrismJS/prism/issues/1302) [[`c246c1a`](https://github.com/PrismJS/prism/commit/c246c1a)] +* __WebPlatform Docs__: + * WebPlatform Docs plugin: Fix links. Fixes [#1290](https://github.com/PrismJS/prism/issues/1290) [[`7a9dbe0`](https://github.com/PrismJS/prism/commit/7a9dbe0)] + +### Other changes +* Fix Autoloader's demo page [[`3dddac9`](https://github.com/PrismJS/prism/commit/3dddac9)] +* Download page: Use hash instead of query-string for redownload URL. Fix [#1263](https://github.com/PrismJS/prism/issues/1263) [[`b03c02a`](https://github.com/PrismJS/prism/commit/b03c02a)] +* Core: Don't thow an error if lookbehing is used without anything matching. [[`e0cd47f`](https://github.com/PrismJS/prism/commit/e0cd47f)] +* Docs: Fix link to the `` element specification in HTML5 [[`a84263f`](https://github.com/PrismJS/prism/commit/a84263f)] +* Docs: Mention support for `lang-xxxx` class. Close [#1312](https://github.com/PrismJS/prism/issues/1312) [[`a9e76db`](https://github.com/PrismJS/prism/commit/a9e76db)] +* Docs: Add note on `async` parameter to clarify the requirement of using a single bundled file. Closes [#1249](https://github.com/PrismJS/prism/issues/1249) [[`eba0235`](https://github.com/PrismJS/prism/commit/eba0235)] + +## 1.11.0 (2018-02-05) + +### New components +* __Content-Security-Policy (CSP)__ ([#1275](https://github.com/PrismJS/prism/issues/1275)) [[`b08cae5`](https://github.com/PrismJS/prism/commit/b08cae5)] +* __HTTP Public-Key-Pins (HPKP)__ ([#1275](https://github.com/PrismJS/prism/issues/1275)) [[`b08cae5`](https://github.com/PrismJS/prism/commit/b08cae5)] +* __HTTP String-Transport-Security (HSTS)__ ([#1275](https://github.com/PrismJS/prism/issues/1275)) [[`b08cae5`](https://github.com/PrismJS/prism/commit/b08cae5)] +* __React TSX__ ([#1280](https://github.com/PrismJS/prism/issues/1280)) [[`fbe82b8`](https://github.com/PrismJS/prism/commit/fbe82b8)] + +### Updated components +* __C++__: + * Add C++ platform-independent types ([#1271](https://github.com/PrismJS/prism/issues/1271)) [[`3da238f`](https://github.com/PrismJS/prism/commit/3da238f)] +* __TypeScript__: + * Improve typescript with builtins ([#1277](https://github.com/PrismJS/prism/issues/1277)) [[`5de1b1f`](https://github.com/PrismJS/prism/commit/5de1b1f)] + +### Other changes +* Fix passing of non-enumerable Error properties from the child test runner ([#1276](https://github.com/PrismJS/prism/issues/1276)) [[`38df653`](https://github.com/PrismJS/prism/commit/38df653)] + +## 1.10.0 (2018-01-17) + +### New components +* __6502 Assembly__ ([#1245](https://github.com/PrismJS/prism/issues/1245)) [[`2ece18b`](https://github.com/PrismJS/prism/commit/2ece18b)] +* __Elm__ ([#1174](https://github.com/PrismJS/prism/issues/1174)) [[`d6da70e`](https://github.com/PrismJS/prism/commit/d6da70e)] +* __IchigoJam BASIC__ ([#1246](https://github.com/PrismJS/prism/issues/1246)) [[`cf840be`](https://github.com/PrismJS/prism/commit/cf840be)] +* __Io__ ([#1251](https://github.com/PrismJS/prism/issues/1251)) [[`84ed3ed`](https://github.com/PrismJS/prism/commit/84ed3ed)] + +### Updated components +* __BASIC__: + * Make strings greedy [[`60114d0`](https://github.com/PrismJS/prism/commit/60114d0)] +* __C++__: + * Add C++11 raw string feature ([#1254](https://github.com/PrismJS/prism/issues/1254)) [[`71595be`](https://github.com/PrismJS/prism/commit/71595be)] + +### Updated plugins +* __Autoloader__: + * Add support for `data-autoloader-path` ([#1242](https://github.com/PrismJS/prism/issues/1242)) [[`39360d6`](https://github.com/PrismJS/prism/commit/39360d6)] +* __Previewers__: + * New plugin combining previous plugins Previewer: Base, Previewer: Angle, Previewer: Color, Previewer: Easing, Previewer: Gradient and Previewer: Time. ([#1244](https://github.com/PrismJS/prism/issues/1244)) [[`28e4b4c`](https://github.com/PrismJS/prism/commit/28e4b4c)] +* __Unescaped Markup__: + * Make it work with any language ([#1265](https://github.com/PrismJS/prism/issues/1265)) [[`7bcdae7`](https://github.com/PrismJS/prism/commit/7bcdae7)] + +### Other changes +* Add attribute `style` in `package.json` ([#1256](https://github.com/PrismJS/prism/issues/1256)) [[`a9b6785`](https://github.com/PrismJS/prism/commit/a9b6785)] + +## 1.9.0 (2017-12-06) + +### New components +* __Flow__ [[`d27b70d`](https://github.com/PrismJS/prism/commit/d27b70d)] + +### Updated components +* __CSS__: + * Unicode characters in CSS properties ([#1227](https://github.com/PrismJS/prism/issues/1227)) [[`f234ea4`](https://github.com/PrismJS/prism/commit/f234ea4)] +* __JSX__: + * JSX: Improve highlighting support. Fix [#1235](https://github.com/PrismJS/prism/issues/1235) and [#1236](https://github.com/PrismJS/prism/issues/1236) [[`f41c5cd`](https://github.com/PrismJS/prism/commit/f41c5cd)] +* __Markup__: + * Make CSS and JS inclusions in Markup greedy. Fix [#1240](https://github.com/PrismJS/prism/issues/1240) [[`7dc1e45`](https://github.com/PrismJS/prism/commit/7dc1e45)] +* __PHP__: + * Add support for multi-line strings. Fix [#1233](https://github.com/PrismJS/prism/issues/1233) [[`9a542a0`](https://github.com/PrismJS/prism/commit/9a542a0)] + +### Updated plugins +* __Copy to clipboard__: + * Fix test for native Clipboard. Fix [#1241](https://github.com/PrismJS/prism/issues/1241) [[`e7b5e82`](https://github.com/PrismJS/prism/commit/e7b5e82)] + * Copy to clipboard: Update to v1.7.1. Fix [#1220](https://github.com/PrismJS/prism/issues/1220) [[`a1b85e3`](https://github.com/PrismJS/prism/commit/a1b85e3), [`af50e44`](https://github.com/PrismJS/prism/commit/af50e44)] +* __Line highlight__: + * Fixes to compatibility of line number and line higlight plugins ([#1194](https://github.com/PrismJS/prism/issues/1194)) [[`e63058f`](https://github.com/PrismJS/prism/commit/e63058f), [`3842a91`](https://github.com/PrismJS/prism/commit/3842a91)] +* __Unescaped Markup__: + * Fix ambiguity in documentation by improving examples. Fix [#1197](https://github.com/PrismJS/prism/issues/1197) [[`924784a`](https://github.com/PrismJS/prism/commit/924784a)] + +### Other changes +* Allow any element being root instead of document. ([#1230](https://github.com/PrismJS/prism/issues/1230)) [[`69f2e2c`](https://github.com/PrismJS/prism/commit/69f2e2c), [`6e50d44`](https://github.com/PrismJS/prism/commit/6e50d44)] +* Coy Theme: The 'height' element makes code blocks the height of the browser canvas. ([#1224](https://github.com/PrismJS/prism/issues/1224)) [[`ac219d7`](https://github.com/PrismJS/prism/commit/ac219d7)] +* Download page: Fix implicitly declared variable [[`f986551`](https://github.com/PrismJS/prism/commit/f986551)] +* Download page: Add version number at the beginning of the generated files. Fix [#788](https://github.com/PrismJS/prism/issues/788) [[`928790d`](https://github.com/PrismJS/prism/commit/928790d)] + +## 1.8.4 (2017-11-05) + +### Updated components + +* __ABAP__: + * Regexp optimisation [[`e7b411e`](https://github.com/PrismJS/prism/commit/e7b411e)] +* __ActionScript__: + * Fix XML regex + optimise [[`75d00d7`](https://github.com/PrismJS/prism/commit/75d00d7)] +* __Ada__: + * Regexp simplification [[`e881fe3`](https://github.com/PrismJS/prism/commit/e881fe3)] +* __Apacheconf__: + * Regexp optimisation [[`a065e61`](https://github.com/PrismJS/prism/commit/a065e61)] +* __APL__: + * Regexp simplification [[`33297c4`](https://github.com/PrismJS/prism/commit/33297c4)] +* __AppleScript__: + * Regexp optimisation [[`d879f36`](https://github.com/PrismJS/prism/commit/d879f36)] +* __Arduino__: + * Don't use captures if not needed [[`16b338f`](https://github.com/PrismJS/prism/commit/16b338f)] +* __ASP.NET__: + * Regexp optimisation [[`438926c`](https://github.com/PrismJS/prism/commit/438926c)] +* __AutoHotkey__: + * Regexp simplification + don't use captures if not needed [[`5edfd2f`](https://github.com/PrismJS/prism/commit/5edfd2f)] +* __Bash__: + * Regexp optimisation and simplification [[`75b9b29`](https://github.com/PrismJS/prism/commit/75b9b29)] +* __Bro__: + * Regexp simplification + don't use captures if not needed [[`d4b9003`](https://github.com/PrismJS/prism/commit/d4b9003)] +* __C__: + * Regexp optimisation + don't use captures if not needed [[`f61d487`](https://github.com/PrismJS/prism/commit/f61d487)] +* __C++__: + * Fix operator regexp + regexp simplification + don't use captures if not needed [[`ffeb26e`](https://github.com/PrismJS/prism/commit/ffeb26e)] +* __C#__: + * Remove duplicates in keywords + regexp optimisation + don't use captures if not needed [[`d28d178`](https://github.com/PrismJS/prism/commit/d28d178)] +* __C-like__: + * Regexp simplification + don't use captures if not needed [[`918e0ff`](https://github.com/PrismJS/prism/commit/918e0ff)] +* __CoffeeScript__: + * Regexp optimisation + don't use captures if not needed [[`5895978`](https://github.com/PrismJS/prism/commit/5895978)] +* __Crystal__: + * Remove trailing comma [[`16979a3`](https://github.com/PrismJS/prism/commit/16979a3)] +* __CSS__: + * Regexp simplification + don't use captures if not needed + handle multi-line style attributes [[`43d9f36`](https://github.com/PrismJS/prism/commit/43d9f36)] +* __CSS Extras__: + * Regexp simplification [[`134ed70`](https://github.com/PrismJS/prism/commit/134ed70)] +* __D__: + * Regexp optimisation [[`fbe39c9`](https://github.com/PrismJS/prism/commit/fbe39c9)] +* __Dart__: + * Regexp optimisation [[`f24e919`](https://github.com/PrismJS/prism/commit/f24e919)] +* __Django__: + * Regexp optimisation [[`a95c51d`](https://github.com/PrismJS/prism/commit/a95c51d)] +* __Docker__: + * Regexp optimisation [[`27f99ff`](https://github.com/PrismJS/prism/commit/27f99ff)] +* __Eiffel__: + * Regexp optimisation [[`b7cdea2`](https://github.com/PrismJS/prism/commit/b7cdea2)] +* __Elixir__: + * Regexp optimisation + uniform behavior between ~r and ~s [[`5d12e80`](https://github.com/PrismJS/prism/commit/5d12e80)] +* __Erlang__: + * Regexp optimisation [[`7547f83`](https://github.com/PrismJS/prism/commit/7547f83)] +* __F#__: + * Regexp optimisation + don't use captures if not needed [[`7753fc4`](https://github.com/PrismJS/prism/commit/7753fc4)] +* __Gherkin__: + * Regexp optimisation + don't use captures if not needed + added explanation comment on table-body regexp [[`f26197a`](https://github.com/PrismJS/prism/commit/f26197a)] +* __Git__: + * Regexp optimisation [[`b9483b9`](https://github.com/PrismJS/prism/commit/b9483b9)] +* __GLSL__: + * Regexp optimisation [[`e66d21b`](https://github.com/PrismJS/prism/commit/e66d21b)] +* __Go__: + * Regexp optimisation + don't use captures if not needed [[`88caabb`](https://github.com/PrismJS/prism/commit/88caabb)] +* __GraphQL__: + * Regexp optimisation and simplification [[`2474f06`](https://github.com/PrismJS/prism/commit/2474f06)] +* __Groovy__: + * Regexp optimisation + don't use captures if not needed [[`e74e00c`](https://github.com/PrismJS/prism/commit/e74e00c)] +* __Haml__: + * Regexp optimisation + don't use captures if not needed + fix typo in comment [[`23e3b43`](https://github.com/PrismJS/prism/commit/23e3b43)] +* __Handlebars__: + * Regexp optimisation + don't use captures if not needed [[`09dbfce`](https://github.com/PrismJS/prism/commit/09dbfce)] +* __Haskell__: + * Regexp simplification + don't use captures if not needed [[`f11390a`](https://github.com/PrismJS/prism/commit/f11390a)] +* __HTTP__: + * Regexp simplification + don't use captures if not needed [[`37ef24e`](https://github.com/PrismJS/prism/commit/37ef24e)] +* __Icon__: + * Regexp optimisation [[`9cf64a0`](https://github.com/PrismJS/prism/commit/9cf64a0)] +* __J__: + * Regexp simplification [[`de15150`](https://github.com/PrismJS/prism/commit/de15150)] +* __Java__: + * Don't use captures if not needed [[`96b35c8`](https://github.com/PrismJS/prism/commit/96b35c8)] +* __JavaScript__: + * Regexp optimisation + don't use captures if not needed [[`93d4002`](https://github.com/PrismJS/prism/commit/93d4002)] +* __Jolie__: + * Regexp optimisation + don't use captures if not needed + remove duplicates in keywords [[`a491f9e`](https://github.com/PrismJS/prism/commit/a491f9e)] +* __JSON__: + * Make strings greedy, remove negative look-ahead for ":". Fix [#1204](https://github.com/PrismJS/prism/issues/1204) [[`98acd2d`](https://github.com/PrismJS/prism/commit/98acd2d)] + * Regexp optimisation + don't use captures if not needed [[`8fc1b03`](https://github.com/PrismJS/prism/commit/8fc1b03)] +* __JSX__: + * Regexp optimisation + handle spread operator as a whole [[`28de4e2`](https://github.com/PrismJS/prism/commit/28de4e2)] +* __Julia__: + * Regexp optimisation and simplification [[`12684c0`](https://github.com/PrismJS/prism/commit/12684c0)] +* __Keyman__: + * Regexp optimisation + don't use captures if not needed [[`9726087`](https://github.com/PrismJS/prism/commit/9726087)] +* __Kotlin__: + * Regexp simplification [[`12ff8dc`](https://github.com/PrismJS/prism/commit/12ff8dc)] +* __LaTeX__: + * Regexp optimisation and simplification [[`aa426b0`](https://github.com/PrismJS/prism/commit/aa426b0)] +* __LiveScript__: + * Make interpolated strings greedy + fix variable and identifier regexps [[`c581049`](https://github.com/PrismJS/prism/commit/c581049)] +* __LOLCODE__: + * Don't use captures if not needed [[`52903af`](https://github.com/PrismJS/prism/commit/52903af)] +* __Makefile__: + * Regexp optimisation [[`20ae2e5`](https://github.com/PrismJS/prism/commit/20ae2e5)] +* __Markdown__: + * Don't use captures if not needed [[`f489a1e`](https://github.com/PrismJS/prism/commit/f489a1e)] +* __Markup__: + * Regexp optimisation + fix punctuation inside attr-value [[`ea380c6`](https://github.com/PrismJS/prism/commit/ea380c6)] +* __MATLAB__: + * Make strings greedy + handle line feeds better [[`4cd4f01`](https://github.com/PrismJS/prism/commit/4cd4f01)] +* __Monkey__: + * Don't use captures if not needed [[`7f47140`](https://github.com/PrismJS/prism/commit/7f47140)] +* __N4JS__: + * Don't use captures if not needed [[`2d3f9df`](https://github.com/PrismJS/prism/commit/2d3f9df)] +* __NASM__: + * Regexp optimisation and simplification + don't use captures if not needed [[`9937428`](https://github.com/PrismJS/prism/commit/9937428)] +* __nginx__: + * Remove trailing comma + remove duplicates in keywords [[`c6e7195`](https://github.com/PrismJS/prism/commit/c6e7195)] +* __NSIS__: + * Regexp optimisation + don't use captures if not needed [[`beeb107`](https://github.com/PrismJS/prism/commit/beeb107)] +* __Objective-C__: + * Don't use captures if not needed [[`9be0f88`](https://github.com/PrismJS/prism/commit/9be0f88)] +* __OCaml__: + * Regexp simplification [[`5f5f38c`](https://github.com/PrismJS/prism/commit/5f5f38c)] +* __OpenCL__: + * Don't use captures if not needed [[`5e70f1d`](https://github.com/PrismJS/prism/commit/5e70f1d)] +* __Oz__: + * Fix atom regexp [[`9320e92`](https://github.com/PrismJS/prism/commit/9320e92)] +* __PARI/GP__: + * Regexp optimisation [[`2c7b59b`](https://github.com/PrismJS/prism/commit/2c7b59b)] +* __Parser__: + * Regexp simplification [[`569d511`](https://github.com/PrismJS/prism/commit/569d511)] +* __Perl__: + * Regexp optimisation and simplification + don't use captures if not needed [[`0fe4cf6`](https://github.com/PrismJS/prism/commit/0fe4cf6)] +* __PHP__: + * Don't use captures if not needed Golmote [[`5235f18`](https://github.com/PrismJS/prism/commit/5235f18)] +* __PHP Extras__: + * Add word boundary after global keywords + don't use captures if not needed [[`9049a2a`](https://github.com/PrismJS/prism/commit/9049a2a)] +* __PowerShell__: + * Regexp optimisation + don't use captures if not needed [[`0d05957`](https://github.com/PrismJS/prism/commit/0d05957)] +* __Processing__: + * Regexp simplification [[`8110d38`](https://github.com/PrismJS/prism/commit/8110d38)] +* __.properties__: + * Regexp optimisation [[`678b621`](https://github.com/PrismJS/prism/commit/678b621)] +* __Protocol Buffers__: + * Don't use captures if not needed [[`3e256d8`](https://github.com/PrismJS/prism/commit/3e256d8)] +* __Pug__: + * Don't use captures if not needed [[`76dc925`](https://github.com/PrismJS/prism/commit/76dc925)] +* __Pure__: + * Make inline-lang greedy [[`92318b0`](https://github.com/PrismJS/prism/commit/92318b0)] +* __Python__: + * Add Python builtin function highlighting ([#1205](https://github.com/PrismJS/prism/issues/1205)) [[`2169c99`](https://github.com/PrismJS/prism/commit/2169c99)] + * Python: Add highlighting to functions with space between name and parentheses ([#1207](https://github.com/PrismJS/prism/issues/1207)) [[`3badd8a`](https://github.com/PrismJS/prism/commit/3badd8a)] + * Make triple-quoted strings greedy + regexp optimisation and simplification [[`f09f9f5`](https://github.com/PrismJS/prism/commit/f09f9f5)] +* __Qore__: + * Regexp simplification [[`69459f0`](https://github.com/PrismJS/prism/commit/69459f0)] +* __R__: + * Regexp optimisation [[`06a9da4`](https://github.com/PrismJS/prism/commit/06a9da4)] +* __Reason__: + * Regexp optimisation + don't use capture if not needed [[`19d79b4`](https://github.com/PrismJS/prism/commit/19d79b4)] +* __Ren'py__: + * Make strings greedy + don't use captures if not needed [[`91d84d9`](https://github.com/PrismJS/prism/commit/91d84d9)] +* __reST__: + * Regexp simplification + don't use captures if not needed [[`1a8b3e9`](https://github.com/PrismJS/prism/commit/1a8b3e9)] +* __Rip__: + * Regexp optimisation [[`d7f0ee8`](https://github.com/PrismJS/prism/commit/d7f0ee8)] +* __Ruby__: + * Regexp optimisation and simplification + don't use captures if not needed [[`4902ed4`](https://github.com/PrismJS/prism/commit/4902ed4)] +* __Rust__: + * Regexp optimisation and simplification + don't use captures if not needed [[`cc9d874`](https://github.com/PrismJS/prism/commit/cc9d874)] +* __Sass__: + * Regexp simplification Golmote [[`165d957`](https://github.com/PrismJS/prism/commit/165d957)] +* __Scala__: + * Regexp optimisation Golmote [[`5f50c12`](https://github.com/PrismJS/prism/commit/5f50c12)] +* __Scheme__: + * Regexp optimisation [[`bd19b04`](https://github.com/PrismJS/prism/commit/bd19b04)] +* __SCSS__: + * Regexp simplification [[`c60b7d4`](https://github.com/PrismJS/prism/commit/c60b7d4)] +* __Smalltalk__: + * Regexp simplification [[`41a2c76`](https://github.com/PrismJS/prism/commit/41a2c76)] +* __Smarty__: + * Regexp optimisation and simplification [[`e169be9`](https://github.com/PrismJS/prism/commit/e169be9)] +* __SQL__: + * Regexp optimisation [[`a6244a4`](https://github.com/PrismJS/prism/commit/a6244a4)] +* __Stylus__: + * Regexp optimisation [[`df9506c`](https://github.com/PrismJS/prism/commit/df9506c)] +* __Swift__: + * Don't use captures if not needed [[`a2d737a`](https://github.com/PrismJS/prism/commit/a2d737a)] +* __Tcl__: + * Regexp simplification + don't use captures if not needed [[`f0b8a33`](https://github.com/PrismJS/prism/commit/f0b8a33)] +* __Textile__: + * Regexp optimisation + don't use captures if not needed [[`08139ad`](https://github.com/PrismJS/prism/commit/08139ad)] +* __Twig__: + * Regexp optimisation and simplification + don't use captures if not needed [[`0b10fd0`](https://github.com/PrismJS/prism/commit/0b10fd0)] +* __TypeScript__: + * Don't use captures if not needed [[`e296caf`](https://github.com/PrismJS/prism/commit/e296caf)] +* __Verilog__: + * Regexp simplification [[`1b24b34`](https://github.com/PrismJS/prism/commit/1b24b34)] +* __VHDL__: + * Regexp optimisation and simplification [[`7af36df`](https://github.com/PrismJS/prism/commit/7af36df)] +* __vim__: + * Remove duplicates in keywords [[`700505e`](https://github.com/PrismJS/prism/commit/700505e)] +* __Wiki markup__: + * Fix escaping consistency [[`1fd690d`](https://github.com/PrismJS/prism/commit/1fd690d)] +* __YAML__: + * Regexp optimisation + don't use captures if not needed [[`1fd690d`](https://github.com/PrismJS/prism/commit/1fd690d)] + +### Other changes +* Remove comments spellcheck for AMP validation ([#1106](https://github.com/PrismJS/prism/issues/1106)) [[`de996d7`](https://github.com/PrismJS/prism/commit/de996d7)] +* Prevent error from throwing when element does not have a parentNode in highlightElement. [[`c33be19`](https://github.com/PrismJS/prism/commit/c33be19)] +* Provide a way to load Prism from inside a Worker without listening to messages. ([#1188](https://github.com/PrismJS/prism/issues/1188)) [[`d09982d`](https://github.com/PrismJS/prism/commit/d09982d)] + +## 1.8.3 (2017-10-19) + +### Other changes + +* Fix inclusion tests for Pug [[`955c2ab`](https://github.com/PrismJS/prism/commit/955c2ab)] + +## 1.8.2 (2017-10-19) + +### Updated components +* __Jade__: + * Jade has been renamed to __Pug__ ([#1201](https://github.com/PrismJS/prism/issues/1201)) [[`bcfef7c`](https://github.com/PrismJS/prism/commit/bcfef7c)] +* __JavaScript__: + * Better highlighting of functions ([#1190](https://github.com/PrismJS/prism/issues/1190)) [[`8ee2cd3`](https://github.com/PrismJS/prism/commit/8ee2cd3)] + +### Update plugins +* __Copy to clipboard__: + * Fix error occurring when using in Chrome 61+ ([#1206](https://github.com/PrismJS/prism/issues/1206)) [[`b41d571`](https://github.com/PrismJS/prism/commit/b41d571)] +* __Show invisibles__: + * Prevent error when using with Autoloader plugin ([#1195](https://github.com/PrismJS/prism/issues/1195)) [[`ed8bdb5`](https://github.com/PrismJS/prism/commit/ed8bdb5)] + +## 1.8.1 (2017-09-16) + +### Other changes + +* Add Arduino to components.js [[`290a3c6`](https://github.com/PrismJS/prism/commit/290a3c6)] + +## 1.8.0 (2017-09-16) + +### New components + +* __Arduino__ ([#1184](https://github.com/PrismJS/prism/issues/1184)) [[`edf2454`](https://github.com/PrismJS/prism/commit/edf2454)] +* __OpenCL__ ([#1175](https://github.com/PrismJS/prism/issues/1175)) [[`131e8fa`](https://github.com/PrismJS/prism/commit/131e8fa)] + +### Updated plugins + +* __Autolinker__: + * Silently catch any error thrown by decodeURIComponent. Fixes [#1186](https://github.com/PrismJS/prism/issues/1186) [[`2e43fcf`](https://github.com/PrismJS/prism/commit/2e43fcf)] + +## 1.7.0 (2017-09-09) + +### New components + +* __Django/Jinja2__ ([#1085](https://github.com/PrismJS/prism/issues/1085)) [[`345b1b2`](https://github.com/PrismJS/prism/commit/345b1b2)] +* __N4JS__ ([#1141](https://github.com/PrismJS/prism/issues/1141)) [[`eaa8ebb`](https://github.com/PrismJS/prism/commit/eaa8ebb)] +* __Ren'py__ ([#658](https://github.com/PrismJS/prism/issues/658)) [[`7ab4013`](https://github.com/PrismJS/prism/commit/7ab4013)] +* __VB.Net__ ([#1122](https://github.com/PrismJS/prism/issues/1122)) [[`5400651`](https://github.com/PrismJS/prism/commit/5400651)] + +### Updated components + +* __APL__: + * Add left shoe underbar and right shoe underbar ([#1072](https://github.com/PrismJS/prism/issues/1072)) [[`12238c5`](https://github.com/PrismJS/prism/commit/12238c5)] + * Update prism-apl.js ([#1126](https://github.com/PrismJS/prism/issues/1126)) [[`a5f3cdb`](https://github.com/PrismJS/prism/commit/a5f3cdb)] +* __C__: + * Add more keywords and constants for C. ([#1029](https://github.com/PrismJS/prism/issues/1029)) [[`43a388e`](https://github.com/PrismJS/prism/commit/43a388e)] +* __C#__: + * Fix wrong highlighting when three slashes appear inside string. Fix [#1091](https://github.com/PrismJS/prism/issues/1091) [[`dfb6f17`](https://github.com/PrismJS/prism/commit/dfb6f17)] +* __C-like__: + * Add support for unclosed block comments. Close [#828](https://github.com/PrismJS/prism/issues/828) [[`3426ed1`](https://github.com/PrismJS/prism/commit/3426ed1)] +* __Crystal__: + * Update Crystal keywords ([#1092](https://github.com/PrismJS/prism/issues/1092)) [[`125bff1`](https://github.com/PrismJS/prism/commit/125bff1)] +* __CSS Extras__: + * Support CSS #RRGGBBAA ([#1139](https://github.com/PrismJS/prism/issues/1139)) [[`07a6806`](https://github.com/PrismJS/prism/commit/07a6806)] +* __Docker__: + * Add dockerfile alias for docker language ([#1164](https://github.com/PrismJS/prism/issues/1164)) [[`601c47f`](https://github.com/PrismJS/prism/commit/601c47f)] + * Update the list of keywords for dockerfiles ([#1180](https://github.com/PrismJS/prism/issues/1180)) [[`f0d73e0`](https://github.com/PrismJS/prism/commit/f0d73e0)] +* __Eiffel__: + * Add class-name highlighting for Eiffel ([#471](https://github.com/PrismJS/prism/issues/471)) [[`cd03587`](https://github.com/PrismJS/prism/commit/cd03587)] +* __Handlebars__: + * Check for possible pre-existing marker strings in Handlebars [[`7a1a404`](https://github.com/PrismJS/prism/commit/7a1a404)] +* __JavaScript__: + * Properly match every operator as a whole token. Fix [#1133](https://github.com/PrismJS/prism/issues/1133) [[`9f649fb`](https://github.com/PrismJS/prism/commit/9f649fb)] + * Allows uppercase prefixes in JS number literals ([#1151](https://github.com/PrismJS/prism/issues/1151)) [[`d4ee904`](https://github.com/PrismJS/prism/commit/d4ee904)] + * Reduced backtracking in regex pattern. Fix [#1159](https://github.com/PrismJS/prism/issues/1159) [[`ac09e97`](https://github.com/PrismJS/prism/commit/ac09e97)] +* __JSON__: + * Fix property and string patterns performance. Fix [#1080](https://github.com/PrismJS/prism/issues/1080) [[`0ca1353`](https://github.com/PrismJS/prism/commit/0ca1353)] +* __JSX__: + * JSX spread operator break. Fixes [#1061](https://github.com/PrismJS/prism/issues/1061) ([#1094](https://github.com/PrismJS/prism/issues/1094)) [[`561bceb`](https://github.com/PrismJS/prism/commit/561bceb)] + * Fix highlighting of attributes containing spaces [[`867ea42`](https://github.com/PrismJS/prism/commit/867ea42)] + * Improved performance for tags (when not matching) Fix [#1152](https://github.com/PrismJS/prism/issues/1152) [[`b0fe103`](https://github.com/PrismJS/prism/commit/b0fe103)] +* __LOLCODE__: + * Make strings greedy Golmote [[`1a5e7a4`](https://github.com/PrismJS/prism/commit/1a5e7a4)] +* __Markup__: + * Support HTML entities in attribute values ([#1143](https://github.com/PrismJS/prism/issues/1143)) [[`1d5047d`](https://github.com/PrismJS/prism/commit/1d5047d)] +* __NSIS__: + * Update patterns ([#1033](https://github.com/PrismJS/prism/issues/1033)) [[`01a59d8`](https://github.com/PrismJS/prism/commit/01a59d8)] + * Add support for NSIS 3.02 ([#1169](https://github.com/PrismJS/prism/issues/1169)) [[`393b5f7`](https://github.com/PrismJS/prism/commit/393b5f7)] +* __PHP__: + * Fix the PHP language ([#1100](https://github.com/PrismJS/prism/issues/1100)) [[`1453fa7`](https://github.com/PrismJS/prism/commit/1453fa7)] + * Check for possible pre-existing marker strings in PHP [[`36bc560`](https://github.com/PrismJS/prism/commit/36bc560)] +* __Ruby__: + * Fix slash regex performance. Fix [#1083](https://github.com/PrismJS/prism/issues/1083) [[`a708730`](https://github.com/PrismJS/prism/commit/a708730)] + * Add support for =begin =end comments. Manual merge of [#1121](https://github.com/PrismJS/prism/issues/1121). [[`62cdaf8`](https://github.com/PrismJS/prism/commit/62cdaf8)] +* __Smarty__: + * Check for possible pre-existing marker strings in Smarty [[`5df26e2`](https://github.com/PrismJS/prism/commit/5df26e2)] +* __TypeScript__: + * Update typescript keywords ([#1064](https://github.com/PrismJS/prism/issues/1064)) [[`52020a0`](https://github.com/PrismJS/prism/commit/52020a0)] + * Chmod -x prism-typescript component ([#1145](https://github.com/PrismJS/prism/issues/1145)) [[`afe0542`](https://github.com/PrismJS/prism/commit/afe0542)] +* __YAML__: + * Make strings greedy (partial fix for [#1075](https://github.com/PrismJS/prism/issues/1075)) [[`565a2cc`](https://github.com/PrismJS/prism/commit/565a2cc)] + +### Updated plugins + +* __Autolinker__: + * Fixed an rendering issue for encoded urls ([#1173](https://github.com/PrismJS/prism/issues/1173)) [[`abc007f`](https://github.com/PrismJS/prism/commit/abc007f)] +* __Custom Class__: + * Add missing noCSS property for the Custom Class plugin [[`ba64f8d`](https://github.com/PrismJS/prism/commit/ba64f8d)] + * Added a default for classMap. Fixes [#1137](https://github.com/PrismJS/prism/issues/1137). ([#1157](https://github.com/PrismJS/prism/issues/1157)) [[`5400af9`](https://github.com/PrismJS/prism/commit/5400af9)] +* __Keep Markup__: + * Store highlightedCode after reinserting markup. Fix [#1127](https://github.com/PrismJS/prism/issues/1127) [[`6df2ceb`](https://github.com/PrismJS/prism/commit/6df2ceb)] +* __Line Highlight__: + * Cleanup left-over line-highlight tags before other plugins run [[`79b723d`](https://github.com/PrismJS/prism/commit/79b723d)] + * Avoid conflict between line-highlight and other plugins [[`224fdb8`](https://github.com/PrismJS/prism/commit/224fdb8)] +* __Line Numbers__: + * Support soft wrap for line numbers plugin ([#584](https://github.com/PrismJS/prism/issues/584)) [[`849f1d6`](https://github.com/PrismJS/prism/commit/849f1d6)] + * Plugins fixes (unescaped-markup, line-numbers) ([#1012](https://github.com/PrismJS/prism/issues/1012)) [[`3fb7cf8`](https://github.com/PrismJS/prism/commit/3fb7cf8)] +* __Normalize Whitespace__: + * Add Node.js support for the normalize-whitespace plugin [[`6c7dae2`](https://github.com/PrismJS/prism/commit/6c7dae2)] +* __Unescaped Markup__: + * Plugins fixes (unescaped-markup, line-numbers) ([#1012](https://github.com/PrismJS/prism/issues/1012)) [[`3fb7cf8`](https://github.com/PrismJS/prism/commit/3fb7cf8)] + +### Updated themes +* __Coy__: + * Scroll 'Coy' background with contents ([#1163](https://github.com/PrismJS/prism/issues/1163)) [[`310990b`](https://github.com/PrismJS/prism/commit/310990b)] + +### Other changes + +* Initial implementation of manual highlighting ([#1087](https://github.com/PrismJS/prism/issues/1087)) [[`bafc4cb`](https://github.com/PrismJS/prism/commit/bafc4cb)] +* Remove dead link in Third-party tutorials section. Fixes [#1028](https://github.com/PrismJS/prism/issues/1028) [[`dffadc6`](https://github.com/PrismJS/prism/commit/dffadc6)] +* Most languages now use the greedy flag for better highlighting [[`7549ecc`](https://github.com/PrismJS/prism/commit/7549ecc)] +* .npmignore: Unignore components.js ([#1108](https://github.com/PrismJS/prism/issues/1108)) [[`1f699e7`](https://github.com/PrismJS/prism/commit/1f699e7)] +* Run before-highlight and after-highlight hooks even when no grammar is found. Fix [#1134](https://github.com/PrismJS/prism/issues/1134) [[`70cb472`](https://github.com/PrismJS/prism/commit/70cb472)] +* Replace [\w\W] with [\s\S] and [0-9] with \d in regexes ([#1107](https://github.com/PrismJS/prism/issues/1107)) [[`8aa2cc4`](https://github.com/PrismJS/prism/commit/8aa2cc4)] +* Fix corner cases for the greedy flag ([#1095](https://github.com/PrismJS/prism/issues/1095)) [[`6530709`](https://github.com/PrismJS/prism/commit/6530709)] +* Add Third Party Tutorial ([#1156](https://github.com/PrismJS/prism/issues/1156)) [[`c34e57b`](https://github.com/PrismJS/prism/commit/c34e57b)] +* Add Composer support ([#648](https://github.com/PrismJS/prism/issues/648)) [[`2989633`](https://github.com/PrismJS/prism/commit/2989633)] +* Remove IE8 plugin ([#992](https://github.com/PrismJS/prism/issues/992)) [[`25788eb`](https://github.com/PrismJS/prism/commit/25788eb)] +* Website: remove width and height on logo.svg, so it becomes scalable. Close [#1005](https://github.com/PrismJS/prism/issues/1005) [[`0621ff7`](https://github.com/PrismJS/prism/commit/0621ff7)] +* Remove yarn.lock ([#1098](https://github.com/PrismJS/prism/issues/1098)) [[`11eed25`](https://github.com/PrismJS/prism/commit/11eed25)] + +## 1.6.0 (2016-12-03) + +### New components + +* __.properties__ ([#980](https://github.com/PrismJS/prism/issues/980)) [[`be6219a`](https://github.com/PrismJS/prism/commit/be6219a)] +* __Ada__ ([#949](https://github.com/PrismJS/prism/issues/949)) [[`65619f7`](https://github.com/PrismJS/prism/commit/65619f7)] +* __GraphQL__ ([#971](https://github.com/PrismJS/prism/issues/971)) [[`e018087`](https://github.com/PrismJS/prism/commit/e018087)] +* __Jolie__ ([#1014](https://github.com/PrismJS/prism/issues/1014)) [[`dfc1941`](https://github.com/PrismJS/prism/commit/dfc1941)] +* __LiveScript__ ([#982](https://github.com/PrismJS/prism/issues/982)) [[`62e258c`](https://github.com/PrismJS/prism/commit/62e258c)] +* __Reason__ (Fixes [#1046](https://github.com/PrismJS/prism/issues/1046)) [[`3cae6ce`](https://github.com/PrismJS/prism/commit/3cae6ce)] +* __Xojo__ ([#994](https://github.com/PrismJS/prism/issues/994)) [[`0224b7c`](https://github.com/PrismJS/prism/commit/0224b7c)] + +### Updated components + +* __APL__: + * Add iota underbar ([#1024](https://github.com/PrismJS/prism/issues/1024)) [[`3c5c89a`](https://github.com/PrismJS/prism/commit/3c5c89a), [`ac21d33`](https://github.com/PrismJS/prism/commit/ac21d33)] +* __AsciiDoc__: + * Optimized block regexps to prevent struggling on large files. Fixes [#1001](https://github.com/PrismJS/prism/issues/1001). [[`1a86d34`](https://github.com/PrismJS/prism/commit/1a86d34)] +* __Bash__: + * Add `npm` to function list ([#969](https://github.com/PrismJS/prism/issues/969)) [[`912bdfe`](https://github.com/PrismJS/prism/commit/912bdfe)] +* __CSS__: + * Make CSS strings greedy. Fix [#1013](https://github.com/PrismJS/prism/issues/1013). [[`e57e26d`](https://github.com/PrismJS/prism/commit/e57e26d)] +* __CSS Extras__: + * Match attribute inside selectors [[`13fed76`](https://github.com/PrismJS/prism/commit/13fed76)] +* __Groovy__: + * Fix order of decoding entities in groovy. Fixes [#1049](https://github.com/PrismJS/prism/issues/1049) ([#1050](https://github.com/PrismJS/prism/issues/1050)) [[`d75da8e`](https://github.com/PrismJS/prism/commit/d75da8e)] +* __Ini__: + * Remove important token in ini definition ([#1047](https://github.com/PrismJS/prism/issues/1047)) [[`fe8ad8b`](https://github.com/PrismJS/prism/commit/fe8ad8b)] +* __JavaScript__: + * Add exponentiation & spread/rest operator ([#991](https://github.com/PrismJS/prism/issues/991)) [[`b2de65a`](https://github.com/PrismJS/prism/commit/b2de65a), [`268d01e`](https://github.com/PrismJS/prism/commit/268d01e)] +* __JSON__: + * JSON: Fixed issues with properties and strings + added tests. Fix [#1025](https://github.com/PrismJS/prism/issues/1025) [[`25a541d`](https://github.com/PrismJS/prism/commit/25a541d)] +* __Markup__: + * Allow for dots in Markup tag names, but not in HTML tags included in Textile. Fixes [#888](https://github.com/PrismJS/prism/issues/888). [[`31ea66b`](https://github.com/PrismJS/prism/commit/31ea66b)] + * Make doctype case-insensitive ([#1009](https://github.com/PrismJS/prism/issues/1009)) [[`3dd7219`](https://github.com/PrismJS/prism/commit/3dd7219)] +* __NSIS__: + * Updated patterns ([#1032](https://github.com/PrismJS/prism/issues/1032)) [[`76ba1b8`](https://github.com/PrismJS/prism/commit/76ba1b8)] +* __PHP__: + * Make comments greedy. Fix [#197](https://github.com/PrismJS/prism/issues/197) [[`318aab3`](https://github.com/PrismJS/prism/commit/318aab3)] +* __PowerShell__: + * Fix highlighting of empty comments ([#977](https://github.com/PrismJS/prism/issues/977)) [[`4fda477`](https://github.com/PrismJS/prism/commit/4fda477)] +* __Puppet__: + * Fix over-greedy regexp detection ([#978](https://github.com/PrismJS/prism/issues/978)) [[`105be25`](https://github.com/PrismJS/prism/commit/105be25)] +* __Ruby__: + * Fix typo `Fload` to `Float` in prism-ruby.js ([#1023](https://github.com/PrismJS/prism/issues/1023)) [[`22cb018`](https://github.com/PrismJS/prism/commit/22cb018)] + * Make strings greedy. Fixes [#1048](https://github.com/PrismJS/prism/issues/1048) [[`8b0520a`](https://github.com/PrismJS/prism/commit/8b0520a)] +* __SCSS__: + * Alias statement as keyword. Fix [#246](https://github.com/PrismJS/prism/issues/246) [[`fd09391`](https://github.com/PrismJS/prism/commit/fd09391)] + * Highlight variables inside selectors and properties. [[`d6b5c2f`](https://github.com/PrismJS/prism/commit/d6b5c2f)] + * Highlight parent selector [[`8f5f1fa`](https://github.com/PrismJS/prism/commit/8f5f1fa)] +* __TypeScript__: + * Add missing `from` keyword to typescript & set `ts` as alias. ([#1042](https://github.com/PrismJS/prism/issues/1042)) [[`cba78f3`](https://github.com/PrismJS/prism/commit/cba78f3)] + +### New plugins + +* __Copy to Clipboard__ ([#891](https://github.com/PrismJS/prism/issues/891)) [[`07b81ac`](https://github.com/PrismJS/prism/commit/07b81ac)] +* __Custom Class__ ([#950](https://github.com/PrismJS/prism/issues/950)) [[`a0bd686`](https://github.com/PrismJS/prism/commit/a0bd686)] +* __Data-URI Highlight__ ([#996](https://github.com/PrismJS/prism/issues/996)) [[`bdca61b`](https://github.com/PrismJS/prism/commit/bdca61b)] +* __Toolbar__ ([#891](https://github.com/PrismJS/prism/issues/891)) [[`07b81ac`](https://github.com/PrismJS/prism/commit/07b81ac)] + +### Updated plugins + +* __Autoloader__: + * Updated documentation for Autoloader plugin [[`b4f3423`](https://github.com/PrismJS/prism/commit/b4f3423)] + * Download all grammars as a zip from Autoloader plugin page ([#981](https://github.com/PrismJS/prism/issues/981)) [[`0d0a007`](https://github.com/PrismJS/prism/commit/0d0a007), [`5c815d3`](https://github.com/PrismJS/prism/commit/5c815d3)] + * Removed duplicated script on Autoloader plugin page [[`9671996`](https://github.com/PrismJS/prism/commit/9671996)] + * Don't try to load "none" component. Fix [#1000](https://github.com/PrismJS/prism/issues/1000) [[`f89b0b9`](https://github.com/PrismJS/prism/commit/f89b0b9)] +* __WPD__: + * Fix at-rule detection + don't process if language is not handled [[`2626728`](https://github.com/PrismJS/prism/commit/2626728)] + +### Other changes + +* Improvement to greedy-flag ([#967](https://github.com/PrismJS/prism/issues/967)) [[`500121b`](https://github.com/PrismJS/prism/commit/500121b), [`9893489`](https://github.com/PrismJS/prism/commit/9893489)] +* Add setTimeout fallback for requestAnimationFrame. Fixes [#987](https://github.com/PrismJS/prism/issues/987). ([#988](https://github.com/PrismJS/prism/issues/988)) [[`c9bdcd3`](https://github.com/PrismJS/prism/commit/c9bdcd3)] +* Added aria-hidden attributes on elements created by the Line Highlight and Line Numbers plugins. Fixes [#574](https://github.com/PrismJS/prism/issues/574). [[`e5587a7`](https://github.com/PrismJS/prism/commit/e5587a7)] +* Don't insert space before ">" when there is no attributes [[`3dc8c9e`](https://github.com/PrismJS/prism/commit/3dc8c9e)] +* Added missing hooks-related tests for AsciiDoc, Groovy, Handlebars, Markup, PHP and Smarty [[`c1a0c1b`](https://github.com/PrismJS/prism/commit/c1a0c1b)] +* Fix issue when using Line numbers plugin and Normalise whitespace plugin together with Handlebars, PHP or Smarty. Fix [#1018](https://github.com/PrismJS/prism/issues/1018), [#997](https://github.com/PrismJS/prism/issues/997), [#935](https://github.com/PrismJS/prism/issues/935). Revert [#998](https://github.com/PrismJS/prism/issues/998). [[`86aa3d2`](https://github.com/PrismJS/prism/commit/86aa3d2)] +* Optimized logo ([#990](https://github.com/PrismJS/prism/issues/990)) ([#1002](https://github.com/PrismJS/prism/issues/1002)) [[`f69e570`](https://github.com/PrismJS/prism/commit/f69e570), [`218fd25`](https://github.com/PrismJS/prism/commit/218fd25)] +* Remove unneeded prefixed CSS ([#989](https://github.com/PrismJS/prism/issues/989)) [[`5e56833`](https://github.com/PrismJS/prism/commit/5e56833)] +* Optimize images ([#1007](https://github.com/PrismJS/prism/issues/1007)) [[`b2fa6d5`](https://github.com/PrismJS/prism/commit/b2fa6d5)] +* Add yarn.lock to .gitignore ([#1035](https://github.com/PrismJS/prism/issues/1035)) [[`03ecf74`](https://github.com/PrismJS/prism/commit/03ecf74)] +* Fix greedy flag bug. Fixes [#1039](https://github.com/PrismJS/prism/issues/1039) [[`32cd99f`](https://github.com/PrismJS/prism/commit/32cd99f)] +* Ruby: Fix test after [#1023](https://github.com/PrismJS/prism/issues/1023) [[`b15d43b`](https://github.com/PrismJS/prism/commit/b15d43b)] +* Ini: Fix test after [#1047](https://github.com/PrismJS/prism/issues/1047) [[`25cdd3f`](https://github.com/PrismJS/prism/commit/25cdd3f)] +* Reduce risk of XSS ([#1051](https://github.com/PrismJS/prism/issues/1051)) [[`17e33bc`](https://github.com/PrismJS/prism/commit/17e33bc)] +* env.code can be modified by before-sanity-check hook even when using language-none. Fix [#1066](https://github.com/PrismJS/prism/issues/1066) [[`83bafbd`](https://github.com/PrismJS/prism/commit/83bafbd)] + + +## 1.5.1 (2016-06-05) + +### Updated components + +* __Normalize Whitespace__: + * Add class that disables the normalize whitespace plugin [[`9385c54`](https://github.com/PrismJS/prism/commit/9385c54)] +* __JavaScript Language__: + * Rearrange the `string` and `template-string` token in JavaScript [[`1158e46`](https://github.com/PrismJS/prism/commit/1158e46)] +* __SQL Language__: + * add delimeter and delimeters keywords to sql ([#958](https://github.com/PrismJS/prism/pull/958)) [[`a9ef24e`](https://github.com/PrismJS/prism/commit/a9ef24e)] + * add AUTO_INCREMENT and DATE keywords to sql ([#954](https://github.com/PrismJS/prism/pull/954)) [[`caea2af`](https://github.com/PrismJS/prism/commit/caea2af)] +* __Diff Language__: + * Highlight diff lines with only + or - ([#952](https://github.com/PrismJS/prism/pull/952)) [[`4d0526f`](https://github.com/PrismJS/prism/commit/4d0526f)] + +### Other changes + +* Allow for asynchronous loading of prism.js ([#959](https://github.com/PrismJS/prism/pull/959)) +* Use toLowerCase on language names ([#957](https://github.com/PrismJS/prism/pull/957)) [[`acd9508`](https://github.com/PrismJS/prism/commit/acd9508)] +* link to index for basic usage - fixes [#945](https://github.com/PrismJS/prism/issues/945) ([#946](https://github.com/PrismJS/prism/pull/946)) [[`6c772d8`](https://github.com/PrismJS/prism/commit/6c772d8)] +* Fixed monospace typo ([#953](https://github.com/PrismJS/prism/pull/953)) [[`e6c3498`](https://github.com/PrismJS/prism/commit/e6c3498)] + +## 1.5.0 (2016-05-01) + +### New components + +* __Bro Language__ ([#925](https://github.com/PrismJS/prism/pull/925)) +* __Protocol Buffers Language__ ([#938](https://github.com/PrismJS/prism/pull/938)) [[`ae4a4f2`](https://github.com/PrismJS/prism/commit/ae4a4f2)] + +### Updated components + +* __Keep Markup__: + * Fix Keep Markup plugin incorrect highlighting ([#880](https://github.com/PrismJS/prism/pull/880)) [[`24841ef`](https://github.com/PrismJS/prism/commit/24841ef)] +* __Groovy Language__: + * Fix double HTML-encoding bug in Groovy language [[`24a0936`](https://github.com/PrismJS/prism/commit/24a0936)] +* __Java Language__: + * Adding annotation token for Java ([#905](https://github.com/PrismJS/prism/pull/905)) [[`367ace6`](https://github.com/PrismJS/prism/commit/367ace6)] +* __SAS Language__: + * Add missing keywords for SAS ([#922](https://github.com/PrismJS/prism/pull/922)) +* __YAML Language__: + * fix hilighting of YAML keys on first line of code block ([#943](https://github.com/PrismJS/prism/pull/943)) [[`f19db81`](https://github.com/PrismJS/prism/commit/f19db81)] +* __C# Language__: + * Support for generic methods in csharp [[`6f75735`](https://github.com/PrismJS/prism/commit/6f75735)] + +### New plugins + +* __Unescaped Markup__ [[`07d77e5`](https://github.com/PrismJS/prism/commit/07d77e5)] +* __Normalize Whitespace__ ([#847](https://github.com/PrismJS/prism/pull/847)) [[`e86ec01`](https://github.com/PrismJS/prism/commit/e86ec01)] + +### Other changes + +* Add JSPM support [[`ad048ab`](https://github.com/PrismJS/prism/commit/ad048ab)] +* update linear-gradient syntax from `left` to `to right` [[`cd234dc`](https://github.com/PrismJS/prism/commit/cd234dc)] +* Add after-property to allow ordering of plugins [[`224b7a1`](https://github.com/PrismJS/prism/commit/224b7a1)] +* Partial solution for the "Comment-like substrings"-problem [[`2705c50`](https://github.com/PrismJS/prism/commit/2705c50)] +* Add property 'aliasTitles' to components.js [[`54400fb`](https://github.com/PrismJS/prism/commit/54400fb)] +* Add before-highlightall hook [[`70a8602`](https://github.com/PrismJS/prism/commit/70a8602)] +* Fix catastrophic backtracking regex issues in JavaScript [[`ab65be2`](https://github.com/PrismJS/prism/commit/ab65be2)] + +## 1.4.1 (2016-02-03) + +### Other changes + +* Fix DFS bug in Prism core [[`b86c727`](https://github.com/PrismJS/prism/commit/b86c727)] + +## 1.4.0 (2016-02-03) + +### New components + +* __Solarized Light__ ([#855](https://github.com/PrismJS/prism/pull/855)) [[`70846ba`](https://github.com/PrismJS/prism/commit/70846ba)] +* __JSON__ ([#370](https://github.com/PrismJS/prism/pull/370)) [[`ad2fcd0`](https://github.com/PrismJS/prism/commit/ad2fcd0)] + +### Updated components + +* __Show Language__: + * Remove data-language attribute ([#840](https://github.com/PrismJS/prism/pull/840)) [[`eb9a83c`](https://github.com/PrismJS/prism/commit/eb9a83c)] + * Allow custom label without a language mapping ([#837](https://github.com/PrismJS/prism/pull/837)) [[`7e74aef`](https://github.com/PrismJS/prism/commit/7e74aef)] +* __JSX__: + * Better Nesting in JSX attributes ([#842](https://github.com/PrismJS/prism/pull/842)) [[`971dda7`](https://github.com/PrismJS/prism/commit/971dda7)] +* __File Highlight__: + * Defer File Highlight until the full DOM has loaded. ([#844](https://github.com/PrismJS/prism/pull/844)) [[`6f995ef`](https://github.com/PrismJS/prism/commit/6f995ef)] +* __Coy Theme__: + * Fix coy theme shadows ([#865](https://github.com/PrismJS/prism/pull/865)) [[`58d2337`](https://github.com/PrismJS/prism/commit/58d2337)] +* __Show Invisibles__: + * Ensure show-invisibles compat with autoloader ([#874](https://github.com/PrismJS/prism/pull/874)) [[`c3cfb1f`](https://github.com/PrismJS/prism/commit/c3cfb1f)] + * Add support for the space character for the show-invisibles plugin ([#876](https://github.com/PrismJS/prism/pull/876)) [[`05442d3`](https://github.com/PrismJS/prism/commit/05442d3)] + +### New plugins + +* __Command Line__ ([#831](https://github.com/PrismJS/prism/pull/831)) [[`8378906`](https://github.com/PrismJS/prism/commit/8378906)] + +### Other changes + +* Use document.currentScript instead of document.getElementsByTagName() [[`fa98743`](https://github.com/PrismJS/prism/commit/fa98743)] +* Add prefix for Firefox selection and move prefixed rule first [[`6d54717`](https://github.com/PrismJS/prism/commit/6d54717)] +* No background for `` in `
        ` [[`8c310bc`](https://github.com/PrismJS/prism/commit/8c310bc)]
        +* Fixing to initial copyright year [[`69cbf7a`](https://github.com/PrismJS/prism/commit/69cbf7a)]
        +* Simplify the “lang” regex [[`417f54a`](https://github.com/PrismJS/prism/commit/417f54a)]
        +* Fix broken heading links [[`a7f9e62`](https://github.com/PrismJS/prism/commit/a7f9e62)]
        +* Prevent infinite recursion in DFS [[`02894e1`](https://github.com/PrismJS/prism/commit/02894e1)]
        +* Fix incorrect page title [[`544b56f`](https://github.com/PrismJS/prism/commit/544b56f)]
        +* Link scss to webplatform wiki [[`08d979a`](https://github.com/PrismJS/prism/commit/08d979a)]
        +* Revert white-space to normal when code is inline instead of in a pre [[`1a971b5`](https://github.com/PrismJS/prism/commit/1a971b5)]
        +
        +## 1.3.0 (2015-10-26)
        +
        +### New components
        +
        +* __AsciiDoc__ ([#800](https://github.com/PrismJS/prism/issues/800)) [[`6803ca0`](https://github.com/PrismJS/prism/commit/6803ca0)]
        +* __Haxe__ ([#811](https://github.com/PrismJS/prism/issues/811)) [[`bd44341`](https://github.com/PrismJS/prism/commit/bd44341)]
        +* __Icon__ ([#803](https://github.com/PrismJS/prism/issues/803)) [[`b43c5f3`](https://github.com/PrismJS/prism/commit/b43c5f3)]
        +* __Kotlin__ ([#814](https://github.com/PrismJS/prism/issues/814)) [[`e8a31a5`](https://github.com/PrismJS/prism/commit/e8a31a5)]
        +* __Lua__ ([#804](https://github.com/PrismJS/prism/issues/804)) [[`a36bc4a`](https://github.com/PrismJS/prism/commit/a36bc4a)]
        +* __Nix__ ([#795](https://github.com/PrismJS/prism/issues/795)) [[`9b275c8`](https://github.com/PrismJS/prism/commit/9b275c8)]
        +* __Oz__ ([#805](https://github.com/PrismJS/prism/issues/805)) [[`388c53f`](https://github.com/PrismJS/prism/commit/388c53f)]
        +* __PARI/GP__ ([#802](https://github.com/PrismJS/prism/issues/802)) [[`253c035`](https://github.com/PrismJS/prism/commit/253c035)]
        +* __Parser__ ([#808](https://github.com/PrismJS/prism/issues/808)) [[`a953b3a`](https://github.com/PrismJS/prism/commit/a953b3a)]
        +* __Puppet__ ([#813](https://github.com/PrismJS/prism/issues/813)) [[`81933ee`](https://github.com/PrismJS/prism/commit/81933ee)]
        +* __Roboconf__ ([#812](https://github.com/PrismJS/prism/issues/812)) [[`f5db346`](https://github.com/PrismJS/prism/commit/f5db346)]
        +
        +### Updated components
        +
        +* __C__:
        +	* Highlight directives in preprocessor lines ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)]
        +* __C#__:
        +	* Highlight directives in preprocessor lines ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)]
        +	* Fix detection of float numbers ([#806](https://github.com/PrismJS/prism/issues/806)) [[`1dae72b`](https://github.com/PrismJS/prism/commit/1dae72b)]
        +* __F#__:
        +	* Highlight directives in preprocessor lines ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)]
        +* __JavaScript__:
        +	* Highlight true and false as booleans ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)]
        +* __Python__:
        +	* Highlight triple-quoted strings before comments. Fix [#815](https://github.com/PrismJS/prism/issues/815) [[`90fbf0b`](https://github.com/PrismJS/prism/commit/90fbf0b)]
        +
        +### New plugins
        +
        +* __Previewer: Time__ ([#790](https://github.com/PrismJS/prism/issues/790)) [[`88173de`](https://github.com/PrismJS/prism/commit/88173de)]
        +* __Previewer: Angle__ ([#791](https://github.com/PrismJS/prism/issues/791)) [[`a434c86`](https://github.com/PrismJS/prism/commit/a434c86)]
        +
        +### Other changes
        +
        +* Increase mocha's timeout [[`f1c41db`](https://github.com/PrismJS/prism/commit/f1c41db)]
        +* Prevent most errors in IE8. Fix [#9](https://github.com/PrismJS/prism/issues/9) [[`9652d75`](https://github.com/PrismJS/prism/commit/9652d75)]
        +* Add U.S. Web Design Standards on homepage. Fix [#785](https://github.com/PrismJS/prism/issues/785) [[`e10d48b`](https://github.com/PrismJS/prism/commit/e10d48b), [`79ebbf8`](https://github.com/PrismJS/prism/commit/79ebbf8), [`2f7088d`](https://github.com/PrismJS/prism/commit/2f7088d)]
        +* Added gulp task to autolink PRs and commits in changelog [[`5ec4e4d`](https://github.com/PrismJS/prism/commit/5ec4e4d)]
        +* Use child processes to run each set of tests, in order to deal with the memory leak in vm.runInNewContext() [[`9a4b6fa`](https://github.com/PrismJS/prism/commit/9a4b6fa)]
        +
        +## 1.2.0 (2015-10-07)
        +
        +### New components
        +
        +* __Batch__ ([#781](https://github.com/PrismJS/prism/issues/781)) [[`eab5b06`](https://github.com/PrismJS/prism/commit/eab5b06)]
        +
        +### Updated components
        +
        +* __ASP.NET__:
        +	* Simplified pattern for ``) or bundle it with your webapp. 
        +
        +Note that the recommended way to use Uppy is to install it with yarn/npm and use a 
        +bundler like Webpack so that you can create a smaller custom build with just the
        +things that you need. More info on .
        +
        +## How to use this bundle
        +
        +You can extract the contents of this zip to e.g. `./js/uppy`
        +
        +Now you can create an HTML file, e.g.: `./upload.html` with the following contents:
        +
        +```html
        +
        +
        +  
        +
        +
        +
        +  
        + +
        +
        Uploaded files:
        +
          +
          + + + + +``` + +Now open `upload.html` in your browser, and the Uppy Dashboard will appear. + +## Next steps + +In the example you just built, Uppy uploads to a demo server where files will be deleted +shortly after uploading. You'll want to target your own tusd server, S3 bucket, or Nginx/Apache server. For the latter, use the Xhr plugin: which uploads using regular multipart form posts, that you'll existing Ruby or PHP backend will be able to make sense of, just as if a `` had been used. + +The Dashboard currently opens when clicking the button, but you can also draw it inline into the page. This, and many more configuration options can be found here: . + +Uppy has many more Plugins besides Xhr and the Dashboard. For example, you can enable Webcam, Instagram, or video encoding support. For a full list of Plugins check here: . + +Note that for some Plugins, you will need to run a server side component called: Companion. Those plugins are marked with a (c) symbol. Alternatively, you can sign up for a free Transloadit account. Transloadit runs Companion for you, tusd servers to handle resumable file uploads, and can post-process files to scan for viruses, recognize faces, etc. Check: . + +## Getting help + +Stuck with anything? We're welcoming all your questions and feedback over at . diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/uppy/uppy.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/uppy/uppy.css new file mode 100644 index 00000000..5a504b07 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/uppy/uppy.css @@ -0,0 +1,4574 @@ +@charset "UTF-8"; +/** +* General Uppy styles that apply to everything inside the .uppy-Root container +*/ +.uppy-Root { + box-sizing: border-box; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-align: left; + position: relative; + color: #333; +} + +[dir=rtl] .uppy-Root, .uppy-Root[dir=rtl] { + text-align: right; +} + +.uppy-Root *, .uppy-Root *:before, .uppy-Root *:after { + box-sizing: inherit; +} + +.uppy-Root [hidden] { + display: none; +} + +.uppy-u-reset { + -webkit-appearance: none; + line-height: 1; + padding: 0; + margin: 0; + border: 0; + color: inherit; + -webkit-backface-visibility: visible; + backface-visibility: visible; + background: none; + border: medium none currentColor; + border-collapse: separate; + border-image: none; + border-radius: 0; + border-spacing: 0; + box-shadow: none; + clear: none; + cursor: auto; + display: inline; + empty-cells: show; + float: none; + font-family: inherit; + font-size: inherit; + font-style: normal; + font-variant: normal; + font-weight: normal; + font-stretch: normal; + -webkit-hyphens: none; + -ms-hyphens: none; + hyphens: none; + left: auto; + letter-spacing: normal; + list-style: none; + margin: 0; + max-height: none; + max-width: none; + min-height: 0; + min-width: 0; + opacity: 1; + outline: medium none invert; + overflow: visible; + overflow-x: visible; + overflow-y: visible; + text-align: left; + text-decoration: none; + text-indent: 0; + text-shadow: none; + text-transform: none; + top: auto; + transform: none; + transform-origin: 50% 50% 0; + transform-style: flat; + transition: none 0s ease 0s; + unicode-bidi: normal; + vertical-align: baseline; + visibility: visible; + white-space: normal; + z-index: auto; +} + +[dir=rtl] .uppy-u-reset { + text-align: right; +} + +.uppy-c-textInput { + border: 1px solid #ddd; + border-radius: 4px; + font-size: 14px; + line-height: 1.5; + padding: 6px 8px; + background-color: #fff; +} +.uppy-size--md .uppy-c-textInput { + padding: 8px 10px; +} +.uppy-c-textInput:focus { + border-color: rgba(34, 117, 215, 0.6); + outline: none; + box-shadow: 0 0 0 3px rgba(34, 117, 215, 0.15); +} +[data-uppy-theme=dark] .uppy-c-textInput { + background-color: #333; + border-color: #333; + color: #eaeaea; +} +[data-uppy-theme=dark] .uppy-c-textInput:focus { + border-color: #525252; + box-shadow: none; +} + +.uppy-c-icon { + max-width: 100%; + max-height: 100%; + fill: currentColor; + display: inline-block; + overflow: hidden; +} + +.uppy-c-btn { + display: inline-block; + text-align: center; + white-space: nowrap; + vertical-align: middle; + font-family: inherit; + font-size: 16px; + line-height: 1; + font-weight: 500; + transition-property: background-color, color; + transition-duration: 0.3s; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} +[dir=rtl] .uppy-c-btn { + text-align: center; +} + +.uppy-c-btn:not(:disabled):not(.disabled) { + cursor: pointer; +} + +.uppy-c-btn::-moz-focus-inner { + border: 0; +} + +.uppy-c-btn-primary { + font-size: 14px; + padding: 10px 18px; + border-radius: 4px; + background-color: #2275d7; + color: #fff; +} +.uppy-c-btn-primary:hover { + background-color: #1b5dab; +} +.uppy-c-btn-primary:focus { + outline: none; + box-shadow: 0 0 0 3px rgba(34, 117, 215, 0.4); +} +.uppy-size--md .uppy-c-btn-primary { + padding: 13px 22px; +} +[data-uppy-theme=dark] .uppy-c-btn-primary { + color: #eaeaea; +} +[data-uppy-theme=dark] .uppy-c-btn-primary:focus { + outline: none; +} +[data-uppy-theme=dark] .uppy-c-btn-primary::-moz-focus-inner { + border: 0; +} +[data-uppy-theme=dark] .uppy-c-btn-primary:focus { + box-shadow: 0 0 0 2px rgba(170, 225, 255, 0.85); +} + +.uppy-c-btn-link { + font-size: 14px; + line-height: 1; + padding: 10px 15px; + border-radius: 4px; + background-color: transparent; + color: #525252; +} +.uppy-c-btn-link:hover { + color: #333; +} +.uppy-c-btn-link:focus { + outline: none; + box-shadow: 0 0 0 3px rgba(34, 117, 215, 0.25); +} +.uppy-size--md .uppy-c-btn-link { + padding: 13px 18px; +} +[data-uppy-theme=dark] .uppy-c-btn-link { + color: #eaeaea; +} +[data-uppy-theme=dark] .uppy-c-btn-link:focus { + outline: none; +} +[data-uppy-theme=dark] .uppy-c-btn-link::-moz-focus-inner { + border: 0; +} +[data-uppy-theme=dark] .uppy-c-btn-link:focus { + box-shadow: 0 0 0 2px rgba(170, 225, 255, 0.85); +} +[data-uppy-theme=dark] .uppy-c-btn-link:hover { + color: #939393; +} + +.uppy-c-btn--small { + font-size: 0.9em; + padding: 7px 16px; + border-radius: 2px; +} +.uppy-size--md .uppy-c-btn--small { + padding: 8px 10px; + border-radius: 2px; +} + +.uppy-Informer { + position: absolute; + bottom: 60px; + left: 0; + right: 0; + text-align: center; + opacity: 1; + transform: none; + transition: all 250ms ease-in; + z-index: 1005; +} + +.uppy-Informer[aria-hidden=true] { + opacity: 0; + transform: translateY(350%); + transition: all 300ms ease-in; + z-index: -1000; +} + +.uppy-Informer p { + display: inline-block; + margin: 0; + padding: 0; + font-size: 12px; + line-height: 1.4; + font-weight: 400; + padding: 6px 15px; + background-color: #757575; + color: #fff; + border-radius: 18px; + max-width: 90%; +} +.uppy-size--md .uppy-Informer p { + font-size: 14px; + line-height: 1.3; + max-width: 500px; + padding: 10px 20px; +} +[data-uppy-theme=dark] .uppy-Informer p { + background-color: #333; +} + +[dir="ltr"] .uppy-Informer span{ + left: 3px; +} + +[dir="rtl"] .uppy-Informer span{ + right: 3px; +} + +[dir="ltr"] .uppy-Informer span{ + margin-left: -1px; +} + +[dir="rtl"] .uppy-Informer span{ + margin-right: -1px; +} + +.uppy-Informer span { + line-height: 12px; + width: 13px; + height: 13px; + display: inline-block; + vertical-align: middle; + color: #525252; + background-color: #fff; + border-radius: 50%; + position: relative; + top: -1px; + font-size: 10px; + -webkit-margin-start: -1px; +} + +.uppy-Informer span:hover { + cursor: help; +} + +.uppy-Informer span:after { + line-height: 1.3; + word-wrap: break-word; +} + +/* ------------------------------------------------------------------- + Microtip + + Modern, lightweight css-only tooltips + Just 1kb minified and gzipped + + @author Ghosh + @package Microtip + +---------------------------------------------------------------------- + 1. Base Styles + 2. Direction Modifiers + 3. Position Modifiers +--------------------------------------------------------------------*/ +/* ------------------------------------------------ + [1] Base Styles +-------------------------------------------------*/ +.uppy-Root [aria-label][role~=tooltip] { + /* no important */ + position: relative; +} + +.uppy-Root [aria-label][role~=tooltip]::before, +.uppy-Root [aria-label][role~=tooltip]::after { + /* no important */ + transform: translate3d(0, 0, 0); + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + will-change: transform; + opacity: 0; + pointer-events: none; + transition: all var(--microtip-transition-duration, 0.18s) var(--microtip-transition-easing, ease-in-out) var(--microtip-transition-delay, 0s); + position: absolute; + box-sizing: border-box; + z-index: 10; + transform-origin: top; +} + +.uppy-Root [aria-label][role~=tooltip]::before { + /* no important */ + background-size: 100% auto !important; + content: ""; +} + +.uppy-Root [aria-label][role~=tooltip]::after { + /* no important */ + background: rgba(17, 17, 17, 0.9); + border-radius: 4px; + color: #ffffff; + content: attr(aria-label); + font-size: var(--microtip-font-size, 13px); + font-weight: var(--microtip-font-weight, normal); + text-transform: var(--microtip-text-transform, none); + padding: 0.5em 1em; + white-space: nowrap; + box-sizing: content-box; +} + +.uppy-Root [aria-label][role~=tooltip]:hover::before, +.uppy-Root [aria-label][role~=tooltip]:hover::after, +.uppy-Root [aria-label][role~=tooltip]:focus::before, +.uppy-Root [aria-label][role~=tooltip]:focus::after { + /* no important */ + opacity: 1; + pointer-events: auto; +} + +/* ------------------------------------------------ + [2] Position Modifiers +-------------------------------------------------*/ +.uppy-Root [role~=tooltip][data-microtip-position|=top]::before { + /* no important */ + background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat; + height: 6px; + width: 18px; + margin-bottom: 5px; +} + +.uppy-Root [role~=tooltip][data-microtip-position|=top]::after { + /* no important */ + margin-bottom: 11px; +} + +.uppy-Root [role~=tooltip][data-microtip-position|=top]::before { + /* no important */ + transform: translate3d(-50%, 0, 0); + bottom: 100%; + left: 50%; +} + +.uppy-Root [role~=tooltip][data-microtip-position|=top]:hover::before { + /* no important */ + transform: translate3d(-50%, -5px, 0); +} + +.uppy-Root [role~=tooltip][data-microtip-position|=top]::after { + /* no important */ + transform: translate3d(-50%, 0, 0); + bottom: 100%; + left: 50%; +} + +.uppy-Root [role~=tooltip][data-microtip-position=top]:hover::after { + /* no important */ + transform: translate3d(-50%, -5px, 0); +} + +/* ------------------------------------------------ + [2.1] Top Left +-------------------------------------------------*/ +.uppy-Root [role~=tooltip][data-microtip-position=top-left]::after { + /* no important */ + transform: translate3d(calc(-100% + 16px), 0, 0); + bottom: 100%; +} + +.uppy-Root [role~=tooltip][data-microtip-position=top-left]:hover::after { + /* no important */ + transform: translate3d(calc(-100% + 16px), -5px, 0); +} + +/* ------------------------------------------------ + [2.2] Top Right +-------------------------------------------------*/ +.uppy-Root [role~=tooltip][data-microtip-position=top-right]::after { + /* no important */ + transform: translate3d(calc(0% + -16px), 0, 0); + bottom: 100%; +} + +.uppy-Root [role~=tooltip][data-microtip-position=top-right]:hover::after { + /* no important */ + transform: translate3d(calc(0% + -16px), -5px, 0); +} + +/* ------------------------------------------------ + [2.3] Bottom +-------------------------------------------------*/ +.uppy-Root [role~=tooltip][data-microtip-position|=bottom]::before { + /* no important */ + background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat; + height: 6px; + width: 18px; + margin-top: 5px; + margin-bottom: 0; +} + +.uppy-Root [role~=tooltip][data-microtip-position|=bottom]::after { + /* no important */ + margin-top: 11px; +} + +.uppy-Root [role~=tooltip][data-microtip-position|=bottom]::before { + /* no important */ + transform: translate3d(-50%, -10px, 0); + bottom: auto; + left: 50%; + top: 100%; +} + +.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:hover::before { + /* no important */ + transform: translate3d(-50%, 0, 0); +} + +.uppy-Root [role~=tooltip][data-microtip-position|=bottom]::after { + /* no important */ + transform: translate3d(-50%, -10px, 0); + top: 100%; + left: 50%; +} + +.uppy-Root [role~=tooltip][data-microtip-position=bottom]:hover::after { + /* no important */ + transform: translate3d(-50%, 0, 0); +} + +/* ------------------------------------------------ + [2.4] Bottom Left +-------------------------------------------------*/ +.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]::after { + /* no important */ + transform: translate3d(calc(-100% + 16px), -10px, 0); + top: 100%; +} + +.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]:hover::after { + /* no important */ + transform: translate3d(calc(-100% + 16px), 0, 0); +} + +/* ------------------------------------------------ + [2.5] Bottom Right +-------------------------------------------------*/ +.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]::after { + /* no important */ + transform: translate3d(calc(0% + -16px), -10px, 0); + top: 100%; +} + +.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]:hover::after { + /* no important */ + transform: translate3d(calc(0% + -16px), 0, 0); +} + +/* ------------------------------------------------ + [2.6] Left +-------------------------------------------------*/ +.uppy-Root [role~=tooltip][data-microtip-position=left]::before, +.uppy-Root [role~=tooltip][data-microtip-position=left]::after { + /* no important */ + bottom: auto; + left: auto; + right: 100%; + top: 50%; + transform: translate3d(10px, -50%, 0); +} + +.uppy-Root [role~=tooltip][data-microtip-position=left]::before { + /* no important */ + background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat; + height: 18px; + width: 6px; + margin-right: 5px; + margin-bottom: 0; +} + +.uppy-Root [role~=tooltip][data-microtip-position=left]::after { + /* no important */ + margin-right: 11px; +} + +.uppy-Root [role~=tooltip][data-microtip-position=left]:hover::before, +.uppy-Root [role~=tooltip][data-microtip-position=left]:hover::after { + /* no important */ + transform: translate3d(0, -50%, 0); +} + +/* ------------------------------------------------ + [2.7] Right +-------------------------------------------------*/ +.uppy-Root [role~=tooltip][data-microtip-position=right]::before, +.uppy-Root [role~=tooltip][data-microtip-position=right]::after { + /* no important */ + bottom: auto; + left: 100%; + top: 50%; + transform: translate3d(-10px, -50%, 0); +} + +.uppy-Root [role~=tooltip][data-microtip-position=right]::before { + /* no important */ + background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat; + height: 18px; + width: 6px; + margin-bottom: 0; + margin-left: 5px; +} + +.uppy-Root [role~=tooltip][data-microtip-position=right]::after { + /* no important */ + margin-left: 11px; +} + +.uppy-Root [role~=tooltip][data-microtip-position=right]:hover::before, +.uppy-Root [role~=tooltip][data-microtip-position=right]:hover::after { + /* no important */ + transform: translate3d(0, -50%, 0); +} + +/* ------------------------------------------------ + [3] Size +-------------------------------------------------*/ +.uppy-Root [role~=tooltip][data-microtip-size=small]::after { + /* no important */ + white-space: initial; + width: 80px; +} + +.uppy-Root [role~=tooltip][data-microtip-size=medium]::after { + /* no important */ + white-space: initial; + width: 150px; +} + +.uppy-Root [role~=tooltip][data-microtip-size=large]::after { + /* no important */ + white-space: initial; + width: 260px; +} + +.uppy-StatusBar { + display: -ms-flexbox; + display: flex; + position: relative; + height: 40px; + line-height: 40px; + font-size: 12px; + font-weight: 400; + color: #fff; + background-color: #fff; + z-index: 1001; + transition: height 0.2s; +} +.uppy-size--md .uppy-StatusBar { + height: 46px; +} +[data-uppy-theme=dark] .uppy-StatusBar { + background-color: #1f1f1f; +} + +.uppy-StatusBar:before { + content: ""; + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + width: 100%; + height: 2px; + background-color: #eaeaea; +} +[data-uppy-theme=dark] .uppy-StatusBar:before { + background-color: #757575; +} + +.uppy-StatusBar[aria-hidden=true] { + overflow-y: hidden; + height: 0; +} + +.uppy-StatusBar.is-complete .uppy-StatusBar-progress { + background-color: #1bb240; +} + +.uppy-StatusBar.is-error .uppy-StatusBar-progress { + background-color: #e32437; +} + +.uppy-StatusBar.is-complete .uppy-StatusBar-statusIndicator { + color: #1bb240; +} + +.uppy-StatusBar.is-error .uppy-StatusBar-statusIndicator { + color: #e32437; +} + +.uppy-StatusBar:not([aria-hidden=true]).is-waiting { + background-color: #fff; + height: 65px; + border-top: 1px solid #eaeaea; +} +[data-uppy-theme=dark] .uppy-StatusBar:not([aria-hidden=true]).is-waiting { + background-color: #1f1f1f; + border-top: 1px solid #333; +} + +.uppy-StatusBar-progress { + background-color: #2275d7; + height: 2px; + position: absolute; + z-index: 1001; + transition: background-color, width 0.3s ease-out; +} +.uppy-StatusBar-progress.is-indeterminate { + background-size: 64px 64px; + background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.3) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.3) 75%, transparent 75%, transparent); + animation: uppy-StatusBar-ProgressStripes 1s linear infinite; +} + +@keyframes uppy-StatusBar-ProgressStripes { + from { + background-position: 0 0; + } + to { + background-position: 64px 0; + } +} +.uppy-StatusBar.is-preprocessing .uppy-StatusBar-progress, +.uppy-StatusBar.is-postprocessing .uppy-StatusBar-progress { + background-color: #f6a623; +} + +.uppy-StatusBar.is-waiting .uppy-StatusBar-progress { + display: none; +} + +[dir="ltr"] .uppy-StatusBar-content{ + padding-left: 10px; +} + +[dir="rtl"] .uppy-StatusBar-content{ + padding-right: 10px; +} + +.uppy-StatusBar-content { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + position: relative; + z-index: 1002; + -webkit-padding-start: 10px; + white-space: nowrap; + text-overflow: ellipsis; + color: #333; + height: 100%; +} +[dir="ltr"] .uppy-size--md .uppy-StatusBar-content{ + padding-left: 15px; +} +[dir="rtl"] .uppy-size--md .uppy-StatusBar-content{ + padding-right: 15px; +} +.uppy-size--md .uppy-StatusBar-content { + -webkit-padding-start: 15px; +} +[data-uppy-theme=dark] .uppy-StatusBar-content { + color: #eaeaea; +} + +[dir="ltr"] .uppy-StatusBar-status{ + padding-right: 0.3em; +} + +[dir="rtl"] .uppy-StatusBar-status{ + padding-left: 0.3em; +} + +.uppy-StatusBar-status { + line-height: 1.4; + font-weight: normal; + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + -ms-flex-pack: center; + justify-content: center; + -webkit-padding-end: 0.3em; +} + +.uppy-StatusBar-statusPrimary { + font-weight: 500; + line-height: 1; +} +[data-uppy-theme=dark] .uppy-StatusBar-statusPrimary { + color: #eaeaea; +} + +.uppy-StatusBar-statusSecondary { + margin-top: 1px; + font-size: 11px; + line-height: 1.2; + display: inline-block; + color: #757575; + white-space: nowrap; +} +[data-uppy-theme=dark] .uppy-StatusBar-statusSecondary { + color: #bbb; +} + +[dir="ltr"] .uppy-StatusBar-statusSecondaryHint{ + margin-right: 5px; +} + +[dir="rtl"] .uppy-StatusBar-statusSecondaryHint{ + margin-left: 5px; +} + +.uppy-StatusBar-statusSecondaryHint { + display: inline-block; + vertical-align: middle; + -webkit-margin-end: 5px; + line-height: 1; +} +[dir="ltr"] .uppy-size--md .uppy-StatusBar-statusSecondaryHint{ + margin-right: 8px; +} +[dir="rtl"] .uppy-size--md .uppy-StatusBar-statusSecondaryHint{ + margin-left: 8px; +} +.uppy-size--md .uppy-StatusBar-statusSecondaryHint { + -webkit-margin-end: 8px; +} + +[dir="ltr"] .uppy-StatusBar-statusIndicator{ + margin-right: 7px; +} + +[dir="rtl"] .uppy-StatusBar-statusIndicator{ + margin-left: 7px; +} + +.uppy-StatusBar-statusIndicator { + position: relative; + top: 1px; + color: #525252; + -webkit-margin-end: 7px; +} +.uppy-StatusBar-statusIndicator svg { + vertical-align: text-bottom; +} + +[dir="ltr"] .uppy-StatusBar-actions{ + right: 10px; +} + +[dir="rtl"] .uppy-StatusBar-actions{ + left: 10px; +} + +.uppy-StatusBar-actions { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + position: absolute; + top: 0; + bottom: 0; + z-index: 1004; +} + +.uppy-StatusBar.is-waiting .uppy-StatusBar-actions { + width: 100%; + height: 100%; + position: static; + padding: 0 15px; + background-color: #fafafa; +} +[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actions { + background-color: #1f1f1f; +} + +.uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts { + height: 90px; + -ms-flex-direction: column; + flex-direction: column; +} +.uppy-size--md .uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts { + height: 65px; + -ms-flex-direction: row; + flex-direction: row; +} +.uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts .uppy-StatusBar-actions { + -ms-flex-direction: column; + flex-direction: column; + -ms-flex-pack: center; + justify-content: center; +} +.uppy-size--md .uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts .uppy-StatusBar-actions { + -ms-flex-direction: row; + flex-direction: row; + -ms-flex-pack: initial; + justify-content: initial; +} + +.uppy-StatusBar-actionCircleBtn { + line-height: 1; + cursor: pointer; + margin: 3px; + opacity: 0.9; +} +.uppy-StatusBar-actionCircleBtn:focus { + outline: none; +} +.uppy-StatusBar-actionCircleBtn::-moz-focus-inner { + border: 0; +} +.uppy-StatusBar-actionCircleBtn:focus { + box-shadow: 0 0 0 3px rgba(34, 117, 215, 0.5); +} +[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn:focus { + outline: none; +} +[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn::-moz-focus-inner { + border: 0; +} +[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn:focus { + box-shadow: 0 0 0 2px rgba(170, 225, 255, 0.85); +} +.uppy-StatusBar-actionCircleBtn:hover { + opacity: 1; +} +.uppy-StatusBar-actionCircleBtn:focus { + border-radius: 50%; +} + +.uppy-StatusBar-actionCircleBtn svg { + vertical-align: bottom; +} + +.uppy-StatusBar-actionBtn { + display: inline-block; + vertical-align: middle; + font-size: 10px; + line-height: inherit; + color: #2275d7; +} +.uppy-size--md .uppy-StatusBar-actionBtn { + font-size: 11px; +} + +.uppy-StatusBar-actionBtn--disabled { + opacity: 0.4; +} +[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--disabled { + opacity: 0.7; +} + +[dir="ltr"] .uppy-StatusBar-actionBtn--retry{ + margin-right: 6px; +} + +[dir="rtl"] .uppy-StatusBar-actionBtn--retry{ + margin-left: 6px; +} + +.uppy-StatusBar-actionBtn--retry { + height: 16px; + border-radius: 8px; + -webkit-margin-end: 6px; + background-color: #ff4b23; + line-height: 1; + color: #fff; + padding: 1px 6px 3px 18px; + position: relative; +} +.uppy-StatusBar-actionBtn--retry:focus { + outline: none; +} +.uppy-StatusBar-actionBtn--retry::-moz-focus-inner { + border: 0; +} +.uppy-StatusBar-actionBtn--retry:focus { + box-shadow: 0 0 0 3px rgba(34, 117, 215, 0.5); +} +[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry:focus { + outline: none; +} +[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry::-moz-focus-inner { + border: 0; +} +[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry:focus { + box-shadow: 0 0 0 2px rgba(170, 225, 255, 0.85); +} +.uppy-StatusBar-actionBtn--retry:hover { + background-color: #f92d00; +} +[dir="ltr"] .uppy-StatusBar-actionBtn--retry svg{ + left: 6px; +} +[dir="rtl"] .uppy-StatusBar-actionBtn--retry svg{ + right: 6px; +} +.uppy-StatusBar-actionBtn--retry svg { + position: absolute; + top: 3px; +} + +.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload { + font-size: 14px; + width: 100%; + padding: 15px 10px; + color: #fff; + background-color: #1bb240; + line-height: 1; +} +.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover { + background-color: #189c38; +} +[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload { + background-color: #1c8b37; +} +[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover { + background-color: #18762f; +} + +.uppy-size--md .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload { + padding: 13px 22px; + width: auto; +} + +.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload.uppy-StatusBar-actionBtn--disabled:hover { + cursor: not-allowed; + background-color: #1bb240; +} + +[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload.uppy-StatusBar-actionBtn--disabled:hover { + background-color: #1c8b37; +} + +.uppy-StatusBar:not(.is-waiting) .uppy-StatusBar-actionBtn--upload { + background-color: transparent; + color: #2275d7; +} + +[dir="ltr"] .uppy-StatusBar-actionBtn--uploadNewlyAdded{ + padding-right: 3px; +} + +[dir="rtl"] .uppy-StatusBar-actionBtn--uploadNewlyAdded{ + padding-left: 3px; +} + +[dir="ltr"] .uppy-StatusBar-actionBtn--uploadNewlyAdded{ + padding-left: 3px; +} + +[dir="rtl"] .uppy-StatusBar-actionBtn--uploadNewlyAdded{ + padding-right: 3px; +} + +.uppy-StatusBar-actionBtn--uploadNewlyAdded { + -webkit-padding-end: 3px; + -webkit-padding-start: 3px; + padding-bottom: 1px; + border-radius: 3px; +} +.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus { + outline: none; +} +.uppy-StatusBar-actionBtn--uploadNewlyAdded::-moz-focus-inner { + border: 0; +} +.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus { + box-shadow: 0 0 0 3px rgba(34, 117, 215, 0.5); +} +[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded:focus { + outline: none; +} +[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded::-moz-focus-inner { + border: 0; +} +[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded:focus { + box-shadow: 0 0 0 2px rgba(170, 225, 255, 0.85); +} + +.uppy-StatusBar-actionBtn--done { + line-height: 1; + border-radius: 3px; + padding: 7px 8px; +} +.uppy-StatusBar-actionBtn--done:focus { + outline: none; +} +.uppy-StatusBar-actionBtn--done::-moz-focus-inner { + border: 0; +} +.uppy-StatusBar-actionBtn--done:hover { + color: #1b5dab; +} +.uppy-StatusBar-actionBtn--done:focus { + background-color: #eceef2; +} +[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--done:focus { + background-color: #333; +} +[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--done { + color: #02baf2; +} + +.uppy-size--md .uppy-StatusBar-actionBtn--done { + font-size: 14px; +} + +.uppy-StatusBar-serviceMsg { + font-size: 11px; + line-height: 1.1; + color: #000; + padding-left: 10px; +} +.uppy-size--md .uppy-StatusBar-serviceMsg { + font-size: 14px; + padding-left: 15px; +} +[data-uppy-theme=dark] .uppy-StatusBar-serviceMsg { + color: #eaeaea; +} + +.uppy-StatusBar-serviceMsg-ghostsIcon { + opacity: 0.5; + vertical-align: text-bottom; + position: relative; + top: 2px; + left: 6px; + width: 10px; +} +.uppy-size--md .uppy-StatusBar-serviceMsg-ghostsIcon { + width: 15px; + left: 10px; + top: 1px; +} + +[dir="ltr"] .uppy-StatusBar-details{ + left: 2px; +} + +[dir="rtl"] .uppy-StatusBar-details{ + right: 2px; +} + +.uppy-StatusBar-details { + line-height: 12px; + width: 13px; + height: 13px; + display: inline-block; + vertical-align: middle; + color: #fff; + background-color: #939393; + border-radius: 50%; + position: relative; + top: 0; + font-size: 10px; + font-weight: 600; + text-align: center; + cursor: help; +} + +.uppy-StatusBar-details:after { + line-height: 1.3; + word-wrap: break-word; +} + +[dir="ltr"] .uppy-StatusBar-spinner{ + margin-right: 10px; +} + +[dir="rtl"] .uppy-StatusBar-spinner{ + margin-left: 10px; +} + +.uppy-StatusBar-spinner { + animation-name: uppy-StatusBar-spinnerAnimation; + animation-duration: 1s; + animation-iteration-count: infinite; + animation-timing-function: linear; + -webkit-margin-end: 10px; + fill: #2275d7; +} + +.uppy-StatusBar.is-preprocessing .uppy-StatusBar-spinner, +.uppy-StatusBar.is-postprocessing .uppy-StatusBar-spinner { + fill: #f6a623; +} + +@keyframes uppy-StatusBar-spinnerAnimation { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: row; + flex-direction: row; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -ms-flex-pack: justify; + justify-content: space-between; + -ms-flex-align: start; + align-items: flex-start; + padding: 6px; +} +.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list::after { + content: ""; + -ms-flex: auto; + flex: auto; +} +.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem { + width: 50%; + position: relative; + margin: 0; +} +.uppy-size--md .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem { + width: 33.3333%; +} +.uppy-size--lg .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem { + width: 25%; +} +.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem::before { + content: ""; + padding-top: 100%; + display: block; +} +.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected img, .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected svg { + opacity: 0.85; +} +.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--disabled { + opacity: 0.5; +} +.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner { + background-color: rgba(147, 147, 147, 0.2); +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner { + background-color: rgba(234, 234, 234, 0.2); +} +.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview svg { + fill: rgba(0, 0, 0, 0.7); + width: 30%; + height: 30%; +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview svg { + fill: rgba(255, 255, 255, 0.8); +} +.uppy-ProviderBrowser-viewType--grid button.uppy-ProviderBrowserItem-inner { + border-radius: 4px; + overflow: hidden; + position: absolute; + top: 7px; + left: 7px; + right: 7px; + bottom: 7px; + text-align: center; + width: calc(100% - 14px); + height: calc(100% - 14px); +} +.uppy-ProviderBrowser-viewType--grid button.uppy-ProviderBrowserItem-inner:focus { + outline: none; + box-shadow: 0 0 0 3px rgba(34, 117, 215, 0.9); +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid button.uppy-ProviderBrowserItem-inner { + box-shadow: 0 0 0 3px rgba(170, 225, 255, 0.7); +} +.uppy-ProviderBrowser-viewType--grid button.uppy-ProviderBrowserItem-inner img { + width: 100%; + height: 100%; + object-fit: cover; + border-radius: 4px; +} +.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-fakeCheckbox { + position: absolute; + top: 16px; + right: 16px; + width: 26px; + height: 26px; + background-color: #2275d7; + border-radius: 50%; + z-index: 1002; + opacity: 0; +} +[dir="ltr"] .uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-fakeCheckbox:after{ + left: 7px; +} +[dir="rtl"] .uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-fakeCheckbox:after{ + right: 7px; +} +.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-fakeCheckbox:after { + width: 12px; + height: 7px; + top: 8px; +} +.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-fakeCheckbox--is-checked { + opacity: 1; +} + +.uppy-ProviderBrowser-viewType--list { + background-color: #fff; +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list { + background-color: #1f1f1f; +} +.uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + padding: 7px 15px; + margin: 0; +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem { + color: #eaeaea; +} +.uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem--disabled { + opacity: 0.6; +} +[dir="ltr"] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-fakeCheckbox{ + margin-right: 15px; +} +[dir="rtl"] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-fakeCheckbox{ + margin-left: 15px; +} +.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-fakeCheckbox { + -webkit-margin-end: 15px; + height: 17px; + width: 17px; + border-radius: 3px; + background-color: #fff; + border: 1px solid #cfcfcf; +} +.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-fakeCheckbox:focus { + border: 1px solid #2275d7; + box-shadow: 0 0 0 3px rgba(34, 117, 215, 0.25); + outline: none; +} +[dir="ltr"] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-fakeCheckbox::after{ + left: 3px; +} +[dir="rtl"] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-fakeCheckbox::after{ + right: 3px; +} +.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-fakeCheckbox::after { + opacity: 0; + height: 5px; + width: 9px; + top: 4px; +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-fakeCheckbox:focus { + border-color: rgba(2, 186, 242, 0.7); + box-shadow: 0 0 0 3px rgba(2, 186, 242, 0.2); +} +.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-fakeCheckbox--is-checked { + background-color: #2275d7; + border-color: #2275d7; +} +.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-fakeCheckbox--is-checked::after { + opacity: 1; +} +.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + padding: 2px; +} +.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner:focus { + outline: none; + text-decoration: underline; +} +[dir="ltr"] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner img,[dir="ltr"] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner svg{ + margin-right: 8px; +} +[dir="rtl"] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner img,[dir="rtl"] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner svg{ + margin-left: 8px; +} +.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner img, .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner svg { + -webkit-margin-end: 8px; + max-width: 20px; + max-height: 20px; +} +.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner span { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + line-height: 1.2; +} +.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--disabled .uppy-ProviderBrowserItem-inner { + cursor: default; +} +[dir="ltr"] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-iconWrap{ + margin-right: 7px; +} +[dir="rtl"] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-iconWrap{ + margin-left: 7px; +} +.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-iconWrap { + width: 20px; + -webkit-margin-end: 7px; +} + +.uppy-ProviderBrowserItem-fakeCheckbox { + position: relative; + cursor: pointer; + -ms-flex-negative: 0; + flex-shrink: 0; +} +.uppy-ProviderBrowserItem-fakeCheckbox:disabled { + cursor: default; +} +.uppy-ProviderBrowserItem-fakeCheckbox::after { + content: ""; + position: absolute; + cursor: pointer; + border-left: 2px solid #eaeaea; + border-bottom: 2px solid #eaeaea; + transform: rotate(-45deg); +} +.uppy-ProviderBrowserItem-fakeCheckbox:disabled::after { + cursor: default; +} +[data-uppy-theme=dark] .uppy-ProviderBrowserItem-fakeCheckbox { + background-color: #1f1f1f; + border-color: #939393; +} + +[data-uppy-theme=dark] .uppy-ProviderBrowserItem-fakeCheckbox--is-checked { + background-color: #333; +} + +.uppy-SearchProvider { + width: 100%; + height: 100%; + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + -ms-flex: 1; + flex: 1; +} +[data-uppy-theme=dark] .uppy-SearchProvider { + background-color: #1f1f1f; +} + +.uppy-SearchProvider-input { + width: 90%; + max-width: 650px; + margin-bottom: 15px; +} +.uppy-size--md .uppy-SearchProvider-input { + margin-bottom: 20px; +} + +.uppy-SearchProvider-searchButton { + padding: 13px 25px; +} +.uppy-size--md .uppy-SearchProvider-searchButton { + padding: 13px 30px; +} + +.uppy-DashboardContent-panelBody { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -ms-flex: 1; + flex: 1; +} +[data-uppy-theme=dark] .uppy-DashboardContent-panelBody { + background-color: #1f1f1f; +} + +.uppy-Provider-auth, +.uppy-Provider-error, +.uppy-Provider-loading, +.uppy-Provider-empty { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-flow: column wrap; + flex-flow: column wrap; + -ms-flex: 1; + flex: 1; + color: #939393; +} + +.uppy-Provider-empty { + color: #939393; +} + +.uppy-Provider-authIcon svg { + width: 100px; + height: 75px; + margin-bottom: 15px; +} + +.uppy-Provider-authTitle { + font-size: 17px; + line-height: 1.4; + font-weight: 400; + margin-bottom: 30px; + padding: 0 15px; + max-width: 500px; + text-align: center; + color: #757575; +} +.uppy-size--md .uppy-Provider-authTitle { + font-size: 20px; +} +[data-uppy-theme=dark] .uppy-Provider-authTitle { + color: #cfcfcf; +} + +[dir="ltr"] .uppy-Provider-breadcrumbs{ + text-align: left; +} + +[dir="rtl"] .uppy-Provider-breadcrumbs{ + text-align: right; +} + +.uppy-Provider-breadcrumbs { + -ms-flex: 1; + flex: 1; + color: #525252; + font-size: 12px; + margin-bottom: 10px; +} +.uppy-size--md .uppy-Provider-breadcrumbs { + margin-bottom: 0; +} +[data-uppy-theme=dark] .uppy-Provider-breadcrumbs { + color: #eaeaea; +} + +[dir="ltr"] .uppy-Provider-breadcrumbsIcon{ + margin-right: 4px; +} + +[dir="rtl"] .uppy-Provider-breadcrumbsIcon{ + margin-left: 4px; +} + +.uppy-Provider-breadcrumbsIcon { + display: inline-block; + color: #525252; + vertical-align: middle; + -webkit-margin-end: 4px; + line-height: 1; +} + +.uppy-Provider-breadcrumbsIcon svg { + width: 13px; + height: 13px; + fill: #525252; +} + +.uppy-Provider-breadcrumbs button { + display: inline-block; + line-height: inherit; + padding: 4px; + border-radius: 3px; +} +.uppy-Provider-breadcrumbs button:focus { + outline: none; +} +.uppy-Provider-breadcrumbs button::-moz-focus-inner { + border: 0; +} +.uppy-Provider-breadcrumbs button:hover { + color: #1b5dab; +} +.uppy-Provider-breadcrumbs button:focus { + background-color: #eceef2; +} +[data-uppy-theme=dark] .uppy-Provider-breadcrumbs button:focus { + background-color: #333; +} +.uppy-Provider-breadcrumbs button:hover { + text-decoration: underline; + cursor: pointer; +} +[data-uppy-theme=dark] .uppy-Provider-breadcrumbs button { + color: #eaeaea; +} + +.uppy-ProviderBrowser { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + -ms-flex: 1; + flex: 1; + font-size: 14px; + font-weight: 400; + height: 100%; +} + +.uppy-ProviderBrowser-user { + margin: 0 8px 0 0; + font-weight: 500; + color: #333; +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-user { + color: #eaeaea; +} + +[dir="ltr"] .uppy-ProviderBrowser-user:after{ + left: 4px; +} + +[dir="rtl"] .uppy-ProviderBrowser-user:after{ + right: 4px; +} + +.uppy-ProviderBrowser-user:after { + content: "·"; + position: relative; + color: #939393; + font-weight: normal; +} + +.uppy-ProviderBrowser-header { + z-index: 1001; + border-bottom: 1px solid #eaeaea; + position: relative; +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-header { + border-bottom: 1px solid #333; +} + +.uppy-ProviderBrowser-headerBar { + padding: 7px 15px; + background-color: #fafafa; + z-index: 1001; + color: #757575; + line-height: 1.4; + font-size: 12px; +} +.uppy-size--md .uppy-ProviderBrowser-headerBar { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-headerBar { + background-color: #1f1f1f; +} + +.uppy-ProviderBrowser-headerBar--simple { + text-align: center; + display: block; + -ms-flex-pack: center; + justify-content: center; +} + +.uppy-ProviderBrowser-headerBar--simple .uppy-Provider-breadcrumbsWrap { + -ms-flex: none; + flex: none; + display: inline-block; + vertical-align: middle; +} + +.uppy-ProviderBrowser-search { + width: 100%; + background-color: #fff; + position: relative; + height: 30px; + margin-top: 10px; + margin-bottom: 5px; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-search { + background-color: #1f1f1f; +} + +[dir="ltr"] .uppy-ProviderBrowser-searchIcon{ + left: 16px; +} + +[dir="rtl"] .uppy-ProviderBrowser-searchIcon{ + right: 16px; +} + +.uppy-ProviderBrowser-searchIcon { + position: absolute; + width: 12px; + height: 12px; + z-index: 1002; + color: #bbb; +} + +[dir="ltr"] .uppy-ProviderBrowser-searchInput{ + padding-left: 27px; +} + +[dir="rtl"] .uppy-ProviderBrowser-searchInput{ + padding-right: 27px; +} + +.uppy-ProviderBrowser-searchInput { + width: 100%; + height: 30px; + background-color: transparent; + outline: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-size: 12px; + line-height: 1.4; + border: 0; + margin: 0 8px; + -webkit-padding-start: 27px; + z-index: 1001; + border-radius: 4px; +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-searchInput { + background-color: #1f1f1f; + color: #eaeaea; +} + +.uppy-ProviderBrowser-searchInput:focus { + outline: 0; + background-color: #f4f4f4; +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-searchInput:focus { + background-color: #333; +} + +[dir="ltr"] .uppy-ProviderBrowser-searchClose{ + right: 12px; +} + +[dir="rtl"] .uppy-ProviderBrowser-searchClose{ + left: 12px; +} + +.uppy-ProviderBrowser-searchClose { + position: absolute; + width: 22px; + height: 22px; + padding: 6px; + top: 4px; + z-index: 1002; + color: #939393; + cursor: pointer; +} +.uppy-ProviderBrowser-searchClose:hover { + color: #757575; +} + +.uppy-ProviderBrowser-searchClose svg { + vertical-align: text-top; +} + +.uppy-ProviderBrowser-searchInput:-ms-input-placeholder { + color: #939393; + opacity: 1; +} + +.uppy-ProviderBrowser-searchInput::placeholder { + color: #939393; + opacity: 1; +} + +.uppy-ProviderBrowser-userLogout { + cursor: pointer; + line-height: inherit; + color: #2275d7; + padding: 4px; + border-radius: 3px; +} +.uppy-ProviderBrowser-userLogout:focus { + outline: none; +} +.uppy-ProviderBrowser-userLogout::-moz-focus-inner { + border: 0; +} +.uppy-ProviderBrowser-userLogout:hover { + color: #1b5dab; +} +.uppy-ProviderBrowser-userLogout:focus { + background-color: #eceef2; +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-userLogout:focus { + background-color: #333; +} +.uppy-ProviderBrowser-userLogout:hover { + text-decoration: underline; +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-userLogout { + color: #eaeaea; +} + +.uppy-ProviderBrowser-body { + -ms-flex: 1; + flex: 1; + position: relative; +} + +.uppy-ProviderBrowser-list { + -ms-flex: 1; + flex: 1; + position: relative; + display: block; + width: 100%; + height: 100%; + background-color: #fff; + border-spacing: 0; + overflow-x: hidden; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + list-style: none; + margin: 0; + padding: 0; +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-list { + background-color: #1f1f1f; +} +.uppy-ProviderBrowser-list:focus { + outline: none; +} + +.uppy-ProviderBrowserItem-inner { + cursor: pointer; + font-weight: 500; + font-size: 13px; +} + +.uppy-ProviderBrowser-footer { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + background-color: #fff; + height: 65px; + border-top: 1px solid #eaeaea; + padding: 0 15px; +} +[dir="ltr"] .uppy-ProviderBrowser-footer button{ + margin-right: 8px; +} +[dir="rtl"] .uppy-ProviderBrowser-footer button{ + margin-left: 8px; +} +.uppy-ProviderBrowser-footer button { + -webkit-margin-end: 8px; +} +[data-uppy-theme=dark] .uppy-ProviderBrowser-footer { + background-color: #1f1f1f; + border-top: 1px solid #333; +} + +.uppy-Dashboard-Item-previewInnerWrap { + width: 100%; + height: 100%; + overflow: hidden; + position: relative; + display: -ms-flexbox; + display: flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + -ms-flex-direction: column; + flex-direction: column; + box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.4); + border-radius: 3px; +} +.uppy-size--md .uppy-Dashboard-Item-previewInnerWrap { + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); +} + +.uppy-Dashboard-Item-previewInnerWrap:after { + content: ""; + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.65); + display: none; + z-index: 1001; +} + +.uppy-Dashboard-Item-previewLink { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 1002; +} +.uppy-Dashboard-Item-previewLink:focus { + box-shadow: inset 0 0 0 3px #76abe9; +} +[data-uppy-theme=dark] .uppy-Dashboard-Item-previewLink:focus { + box-shadow: inset 0 0 0 3px #016c8d; +} + +.uppy-Dashboard-Item-preview img.uppy-Dashboard-Item-previewImg { + width: 100%; + height: 100%; + object-fit: cover; + transform: translateZ(0); + border-radius: 3px; +} + +.uppy-Dashboard-Item-progress { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 1002; + color: #fff; + text-align: center; + width: 120px; + transition: all 0.35 ease; +} + +.uppy-Dashboard-Item-progressIndicator { + display: inline-block; + width: 38px; + height: 38px; + opacity: 0.9; +} +.uppy-size--md .uppy-Dashboard-Item-progressIndicator { + width: 55px; + height: 55px; +} + +button.uppy-Dashboard-Item-progressIndicator { + cursor: pointer; +} +button.uppy-Dashboard-Item-progressIndicator:focus { + outline: none; +} +button.uppy-Dashboard-Item-progressIndicator::-moz-focus-inner { + border: 0; +} +button.uppy-Dashboard-Item-progressIndicator:focus .uppy-Dashboard-Item-progressIcon--bg, +button.uppy-Dashboard-Item-progressIndicator:focus .uppy-Dashboard-Item-progressIcon--retry { + fill: #76abe9; +} + +.uppy-Dashboard-Item-progressIcon--circle { + width: 100%; + height: 100%; +} + +.uppy-Dashboard-Item-progressIcon--bg { + stroke: rgba(255, 255, 255, 0.4); +} + +.uppy-Dashboard-Item-progressIcon--progress { + stroke: #fff; + transition: stroke-dashoffset 0.5s ease-out; +} + +.uppy-Dashboard-Item-progressIcon--play { + stroke: #fff; + fill: #fff; + transition: all 0.2s; +} + +.uppy-Dashboard-Item-progressIcon--cancel { + fill: #fff; + transition: all 0.2s; +} + +.uppy-Dashboard-Item-progressIcon--pause { + stroke: #fff; + fill: #fff; + transition: all 0.2s; +} + +.uppy-Dashboard-Item-progressIcon--check { + fill: #fff; + transition: all 0.2s; +} + +.uppy-Dashboard-Item-progressIcon--retry { + fill: #fff; +} + +[dir="ltr"] .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{ + right: -8px; +} + +[dir="rtl"] .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{ + left: -8px; +} + +[dir="ltr"] .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{ + left: initial; +} + +[dir="rtl"] .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{ + right: initial; +} + +.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress { + transform: initial; + top: -9px; + width: auto; +} + +.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progressIndicator { + width: 18px; + height: 18px; +} +.uppy-size--md .uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progressIndicator { + width: 28px; + height: 28px; +} + +.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progressIndicator { + width: 18px; + height: 18px; + opacity: 1; +} +.uppy-size--md .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progressIndicator { + width: 22px; + height: 22px; +} + +.uppy-Dashboard-Item.is-processing .uppy-Dashboard-Item-progress { + opacity: 0; +} + +[dir="ltr"] .uppy-Dashboard-Item-fileInfo{ + padding-right: 5px; +} + +[dir="rtl"] .uppy-Dashboard-Item-fileInfo{ + padding-left: 5px; +} + +.uppy-Dashboard-Item-fileInfo { + -webkit-padding-end: 5px; +} + +.uppy-Dashboard-Item-name { + font-size: 12px; + line-height: 1.3; + font-weight: 500; + margin-bottom: 5px; + word-break: break-all; + word-wrap: anywhere; +} +[data-uppy-theme=dark] .uppy-Dashboard-Item-name { + color: #eaeaea; +} + +.uppy-Dashboard-Item-status { + font-size: 11px; + line-height: 1; + font-weight: normal; + color: #757575; +} +[data-uppy-theme=dark] .uppy-Dashboard-Item-status { + color: #bbb; +} + +.uppy-Dashboard-Item-statusSize { + display: inline-block; + vertical-align: bottom; + text-transform: uppercase; +} + +.uppy-Dashboard-Item-reSelect { + font-family: inherit; + font-size: inherit; + font-weight: 600; + color: #2275d7; +} + +.uppy-Dashboard-Item-action { + cursor: pointer; + color: #939393; +} +.uppy-Dashboard-Item-action:focus { + outline: none; +} +.uppy-Dashboard-Item-action::-moz-focus-inner { + border: 0; +} +.uppy-Dashboard-Item-action:focus { + box-shadow: 0 0 0 3px rgba(34, 117, 215, 0.5); +} +.uppy-Dashboard-Item-action:hover { + opacity: 1; + color: #1f1f1f; +} +[data-uppy-theme=dark] .uppy-Dashboard-Item-action { + color: #cfcfcf; +} +[data-uppy-theme=dark] .uppy-Dashboard-Item-action:focus { + outline: none; +} +[data-uppy-theme=dark] .uppy-Dashboard-Item-action::-moz-focus-inner { + border: 0; +} +[data-uppy-theme=dark] .uppy-Dashboard-Item-action:focus { + box-shadow: 0 0 0 2px rgba(170, 225, 255, 0.85); +} +[data-uppy-theme=dark] .uppy-Dashboard-Item-action:hover { + color: #eaeaea; +} + +.uppy-Dashboard-Item-action--remove { + color: #1f1f1f; + opacity: 0.95; +} +.uppy-Dashboard-Item-action--remove:hover { + opacity: 1; + color: #000; +} +[data-uppy-theme=dark] .uppy-Dashboard-Item-action--remove { + color: #525252; +} +[data-uppy-theme=dark] .uppy-Dashboard-Item-action--remove:hover { + color: #333; +} + +.uppy-Dashboard:not(.uppy-size--md) .uppy-Dashboard-Item-actionWrapper { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; +} +.uppy-Dashboard:not(.uppy-size--md) .uppy-Dashboard-Item-action { + width: 22px; + height: 22px; + padding: 3px; + margin-left: 3px; +} +.uppy-Dashboard:not(.uppy-size--md) .uppy-Dashboard-Item-action:focus { + border-radius: 3px; +} + +.uppy-size--md .uppy-Dashboard-Item-action--copyLink, +.uppy-size--md .uppy-Dashboard-Item-action--edit { + width: 16px; + height: 16px; + padding: 0; +} +.uppy-size--md .uppy-Dashboard-Item-action--copyLink:focus, +.uppy-size--md .uppy-Dashboard-Item-action--edit:focus { + border-radius: 3px; +} +[dir="ltr"] .uppy-size--md .uppy-Dashboard-Item-action--remove{ + right: -8px; +} +[dir="rtl"] .uppy-size--md .uppy-Dashboard-Item-action--remove{ + left: -8px; +} +.uppy-size--md .uppy-Dashboard-Item-action--remove { + z-index: 1002; + position: absolute; + top: -8px; + width: 18px; + height: 18px; + padding: 0; +} +.uppy-size--md .uppy-Dashboard-Item-action--remove:focus { + border-radius: 50%; +} + +[dir="ltr"] .uppy-Dashboard-Item{ + padding-right: 0; +} + +[dir="rtl"] .uppy-Dashboard-Item{ + padding-left: 0; +} + +.uppy-Dashboard-Item { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + border-bottom: 1px solid #eaeaea; + padding: 10px; + -webkit-padding-end: 0; +} +[data-uppy-theme=dark] .uppy-Dashboard-Item { + border-bottom: 1px solid #333; +} +[dir="ltr"] .uppy-size--md .uppy-Dashboard-Item{ + float: left; +} +[dir="rtl"] .uppy-size--md .uppy-Dashboard-Item{ + float: right; +} +.uppy-size--md .uppy-Dashboard-Item { + position: relative; + display: block; + margin: 5px 15px; + padding: 0; + /* When changing width: also update `itemsPerRow` values in `src/components/Dashboard.js`. */ + width: calc(33.333% - 15px - 15px); + height: 215px; + border-bottom: 0; +} +.uppy-size--lg .uppy-Dashboard-Item { + margin: 5px 15px; + /* When changing width: also update `itemsPerRow` values in `src/components/Dashboard.js`. */ + width: calc(25% - 15px - 15px); + height: 190px; +} +.uppy-size--xl .uppy-Dashboard-Item { + /* When changing width: also update `itemsPerRow` values in `src/components/Dashboard.js`. */ + width: calc(20% - 15px - 15px); + height: 210px; +} + +.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-previewInnerWrap { + opacity: 0.2; +} + +.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-name { + opacity: 0.7; +} + +.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before { + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='35' height='39' viewBox='0 0 35 39'%3E%3Cpath d='M1.708 38.66c1.709 0 3.417-3.417 6.834-3.417 3.416 0 5.125 3.417 8.61 3.417 3.348 0 5.056-3.417 8.473-3.417 4.305 0 5.125 3.417 6.833 3.417.889 0 1.709-.889 1.709-1.709v-19.68C34.167-5.757 0-5.757 0 17.271v19.68c0 .82.888 1.709 1.708 1.709zm8.542-17.084a3.383 3.383 0 01-3.417-3.416 3.383 3.383 0 013.417-3.417 3.383 3.383 0 013.417 3.417 3.383 3.383 0 01-3.417 3.416zm13.667 0A3.383 3.383 0 0120.5 18.16a3.383 3.383 0 013.417-3.417 3.383 3.383 0 013.416 3.417 3.383 3.383 0 01-3.416 3.416z' fill='%2523000' fill-rule='nonzero'/%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-position: 50% 10px; + background-size: 25px; + z-index: 1005; + opacity: 0.5; +} +.uppy-size--md .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before { + background-size: 40px; + background-position: 50% 50%; +} + +.uppy-Dashboard-Item-preview { + position: relative; +} +.uppy-Dashboard:not(.uppy-size--md) .uppy-Dashboard-Item-preview { + -ms-flex-negative: 0; + flex-shrink: 0; + -ms-flex-positive: 0; + flex-grow: 0; + width: 50px; + height: 50px; +} +.uppy-size--md .uppy-Dashboard-Item-preview { + width: 100%; + height: 140px; +} +.uppy-size--lg .uppy-Dashboard-Item-preview { + height: 120px; +} +.uppy-size--xl .uppy-Dashboard-Item-preview { + height: 140px; +} + +[dir="ltr"] .uppy-Dashboard-Item-fileInfoAndButtons{ + padding-right: 8px; +} + +[dir="rtl"] .uppy-Dashboard-Item-fileInfoAndButtons{ + padding-left: 8px; +} + +[dir="ltr"] .uppy-Dashboard-Item-fileInfoAndButtons{ + padding-left: 12px; +} + +[dir="rtl"] .uppy-Dashboard-Item-fileInfoAndButtons{ + padding-right: 12px; +} + +.uppy-Dashboard-Item-fileInfoAndButtons { + -ms-flex-positive: 1; + flex-grow: 1; + -webkit-padding-end: 8px; + -webkit-padding-start: 12px; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: justify; + justify-content: space-between; +} +.uppy-size--md .uppy-Dashboard-Item-fileInfoAndButtons { + -ms-flex-align: start; + align-items: flex-start; + width: 100%; + padding: 0; + padding-top: 9px; +} + +.uppy-Dashboard-Item-fileInfo { + -ms-flex-positive: 1; + flex-grow: 1; + -ms-flex-negative: 1; + flex-shrink: 1; +} + +.uppy-Dashboard-Item-actionWrapper { + -ms-flex-positive: 0; + flex-grow: 0; + -ms-flex-negative: 0; + flex-shrink: 0; +} + +.uppy-Dashboard-Item.is-inprogress .uppy-Dashboard-Item-previewInnerWrap:after, +.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-previewInnerWrap:after { + display: block; +} + +.uppy-Dashboard-Item.is-inprogress:not(.is-resumable) .uppy-Dashboard-Item-action--remove { + display: none; +} + +[dir="ltr"] .uppy-Dashboard-Item-errorDetails{ + left: 6px; +} + +[dir="rtl"] .uppy-Dashboard-Item-errorDetails{ + right: 6px; +} + +.uppy-Dashboard-Item-errorDetails { + line-height: 12px; + width: 12px; + height: 12px; + display: inline-block; + vertical-align: middle; + color: #fff; + background-color: #939393; + border-radius: 50%; + position: relative; + top: -1px; + font-size: 8px; + font-weight: 600; + text-align: center; + cursor: help; +} + +.uppy-Dashboard-Item-errorDetails:after { + line-height: 1.3; + word-wrap: break-word; +} + +.uppy-Dashboard-FileCard { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 1005; + box-shadow: 0px 0px 10px 4px rgba(0, 0, 0, 0.1); + background-color: #fff; + border-radius: 5px; + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; +} +.uppy-Dashboard-FileCard .uppy-DashboardContent-bar { + border-top-left-radius: 5px; + border-top-right-radius: 5px; +} +.uppy-Dashboard-FileCard .uppy-Dashboard-FileCard-actions { + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; +} + +.uppy-Dashboard-FileCard-inner { + height: 100%; + -ms-flex-positive: 1; + flex-grow: 1; + -ms-flex-negative: 1; + flex-shrink: 1; + min-height: 0; + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; +} + +.uppy-Dashboard-FileCard-preview { + height: 60%; + -ms-flex-positive: 0; + flex-grow: 0; + -ms-flex-negative: 1; + flex-shrink: 1; + min-height: 0; + border-bottom: 1px solid #eaeaea; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + position: relative; +} +[data-uppy-theme=dark] .uppy-Dashboard-FileCard-preview { + background-color: #333; + border-bottom: 0; +} + +.uppy-Dashboard-FileCard-preview img.uppy-Dashboard-Item-previewImg { + max-width: 90%; + max-height: 90%; + object-fit: cover; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + border-radius: 3px; + box-shadow: 0px 3px 20px rgba(0, 0, 0, 0.15); +} + +[dir="ltr"] .uppy-Dashboard-FileCard-edit{ + right: 10px; +} + +[dir="rtl"] .uppy-Dashboard-FileCard-edit{ + left: 10px; +} + +.uppy-Dashboard-FileCard-edit { + position: absolute; + top: 10px; + font-size: 13px; + background-color: rgba(0, 0, 0, 0.5); + color: #fff; + padding: 7px 15px; + border-radius: 50px; +} +.uppy-Dashboard-FileCard-edit:focus { + outline: none; +} +.uppy-Dashboard-FileCard-edit::-moz-focus-inner { + border: 0; +} +.uppy-Dashboard-FileCard-edit:focus { + box-shadow: 0 0 0 3px rgba(34, 117, 215, 0.5); +} +.uppy-Dashboard-FileCard-edit:hover { + background-color: rgba(0, 0, 0, 0.8); +} + +.uppy-Dashboard-FileCard-info { + height: 40%; + -ms-flex-positive: 0; + flex-grow: 0; + -ms-flex-negative: 0; + flex-shrink: 0; + padding: 30px 20px 20px 20px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; +} +[data-uppy-theme=dark] .uppy-Dashboard-FileCard-info { + background-color: #1f1f1f; +} + +.uppy-Dashboard-FileCard-fieldset { + font-size: 0; + border: 0; + padding: 0; + max-width: 640px; + margin: auto; + margin-bottom: 12px; +} + +.uppy-Dashboard-FileCard-label { + display: inline-block; + vertical-align: middle; + width: 22%; + font-size: 12px; + color: #525252; +} +.uppy-size--md .uppy-Dashboard-FileCard-label { + font-size: 14px; +} +[data-uppy-theme=dark] .uppy-Dashboard-FileCard-label { + color: #eaeaea; +} + +.uppy-Dashboard-FileCard-input { + display: inline-block; + vertical-align: middle; + width: 78%; +} + +.uppy-Dashboard-FileCard-actions { + height: 55px; + -ms-flex-negative: 0; + flex-shrink: 0; + -ms-flex-positive: 0; + flex-grow: 0; + border-top: 1px solid #eaeaea; + padding: 0 15px; + background-color: #fafafa; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; +} +.uppy-size--md .uppy-Dashboard-FileCard-actions { + height: 65px; +} +[data-uppy-theme=dark] .uppy-Dashboard-FileCard-actions { + border-top: 1px solid #333; + background-color: #1f1f1f; +} + +[dir="ltr"] .uppy-Dashboard-FileCard-actionsBtn{ + margin-right: 10px; +} + +[dir="rtl"] .uppy-Dashboard-FileCard-actionsBtn{ + margin-left: 10px; +} + +.uppy-Dashboard-FileCard-actionsBtn { + -webkit-margin-end: 10px; +} + +.uppy-transition-slideDownUp-enter { + opacity: 0.01; + transform: translate3d(0, -105%, 0); + transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out; +} + +.uppy-transition-slideDownUp-enter.uppy-transition-slideDownUp-enter-active { + opacity: 1; + transform: translate3d(0, 0, 0); +} + +.uppy-transition-slideDownUp-leave { + opacity: 1; + transform: translate3d(0, 0, 0); + transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out; +} + +.uppy-transition-slideDownUp-leave.uppy-transition-slideDownUp-leave-active { + opacity: 0.01; + transform: translate3d(0, -105%, 0); +} + +@keyframes uppy-Dashboard-fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes uppy-Dashboard-fadeOut { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +@keyframes uppy-Dashboard-slideDownAndFadeIn { + from { + transform: translate3d(-50%, -70%, 0); + opacity: 0; + } + to { + transform: translate3d(-50%, -50%, 0); + opacity: 1; + } +} +@keyframes uppy-Dashboard-slideDownAndFadeIn--small { + from { + transform: translate3d(0, -20%, 0); + opacity: 0; + } + to { + transform: translate3d(0, 0, 0); + opacity: 1; + } +} +@keyframes uppy-Dashboard-slideUpFadeOut { + from { + transform: translate3d(-50%, -50%, 0); + opacity: 1; + } + to { + transform: translate3d(-50%, -70%, 0); + opacity: 0; + } +} +@keyframes uppy-Dashboard-slideUpFadeOut--small { + from { + transform: translate3d(0, 0, 0); + opacity: 1; + } + to { + transform: translate3d(0, -20%, 0); + opacity: 0; + } +} +.uppy-Dashboard--modal { + z-index: 1001; +} + +.uppy-Dashboard--modal[aria-hidden=true] { + display: none; +} + +.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose > .uppy-Dashboard-inner { + animation: uppy-Dashboard-slideDownAndFadeIn--small 0.3s cubic-bezier(0, 0, 0.2, 1); +} +@media only screen and (min-width: 820px) { + .uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose > .uppy-Dashboard-inner { + animation: uppy-Dashboard-slideDownAndFadeIn 0.3s cubic-bezier(0, 0, 0.2, 1); + } +} + +.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose > .uppy-Dashboard-overlay { + animation: uppy-Dashboard-fadeIn 0.3s cubic-bezier(0, 0, 0.2, 1); +} + +.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing > .uppy-Dashboard-inner { + animation: uppy-Dashboard-slideUpFadeOut--small 0.3s cubic-bezier(0, 0, 0.2, 1); +} +@media only screen and (min-width: 820px) { + .uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing > .uppy-Dashboard-inner { + animation: uppy-Dashboard-slideUpFadeOut 0.3s cubic-bezier(0, 0, 0.2, 1); + } +} + +.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing > .uppy-Dashboard-overlay { + animation: uppy-Dashboard-fadeOut 0.3s cubic-bezier(0, 0, 0.2, 1); +} + +.uppy-Dashboard-isFixed { + overflow: hidden; + height: 100vh; +} + +.uppy-Dashboard--modal .uppy-Dashboard-overlay { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.5); + z-index: 1001; +} + +.uppy-Dashboard-inner { + position: relative; + background-color: #fafafa; + max-width: 100%; + max-height: 100%; + outline: none; + border: 1px solid #eaeaea; + border-radius: 5px; +} +.uppy-size--md .uppy-Dashboard-inner { + min-height: auto; +} +@media only screen and (min-width: 820px) { + .uppy-Dashboard-inner { + width: 750px; + height: 550px; + } +} +.uppy-Dashboard--modal .uppy-Dashboard-inner { + z-index: 1002; +} +[data-uppy-theme=dark] .uppy-Dashboard-inner { + background-color: #1f1f1f; +} +.uppy-Dashboard--isDisabled .uppy-Dashboard-inner { + cursor: not-allowed; +} + +.uppy-Dashboard-innerWrap { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + height: 100%; + overflow: hidden; + position: relative; + border-radius: 5px; + opacity: 0; +} +.uppy-Dashboard--isInnerWrapVisible .uppy-Dashboard-innerWrap { + opacity: 1; +} +.uppy-Dashboard--isDisabled .uppy-Dashboard-innerWrap { + pointer-events: none; + opacity: 0.6; + filter: grayscale(100%); + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.uppy-Dashboard--isDisabled .uppy-ProviderIconBg { + fill: #9f9f9f; +} + +.uppy-Dashboard--modal .uppy-Dashboard-inner { + position: fixed; + top: 35px; + left: 15px; + right: 15px; + bottom: 15px; + border: none; +} +@media only screen and (min-width: 820px) { + .uppy-Dashboard--modal .uppy-Dashboard-inner { + top: 50%; + left: 50%; + right: auto; + transform: translate(-50%, -50%); + box-shadow: 0 5px 15px 4px rgba(0, 0, 0, 0.15); + } +} + +[dir="ltr"] .uppy-Dashboard-close{ + right: -2px; +} + +[dir="rtl"] .uppy-Dashboard-close{ + left: -2px; +} + +.uppy-Dashboard-close { + display: block; + position: absolute; + top: -33px; + cursor: pointer; + color: rgba(255, 255, 255, 0.9); + font-size: 27px; + z-index: 1005; +} +.uppy-Dashboard-close:focus { + outline: none; +} +.uppy-Dashboard-close::-moz-focus-inner { + border: 0; +} +.uppy-Dashboard-close:focus { + color: #8cb8ed; +} +@media only screen and (min-width: 820px) { + [dir="ltr"] .uppy-Dashboard-close{ + right: -35px; + } + [dir="rtl"] .uppy-Dashboard-close{ + left: -35px; + } + .uppy-Dashboard-close { + font-size: 35px; + top: -10px; + } +} + +.uppy-Dashboard-serviceMsg { + background-color: #FFFBF7; + border-top: 1px solid #edd4b9; + border-bottom: 1px solid #edd4b9; + font-size: 12px; + line-height: 1.3; + font-weight: 500; + padding: 12px 0; + position: relative; + top: -1px; + z-index: 1004; +} +.uppy-size--md .uppy-Dashboard-serviceMsg { + font-size: 14px; + line-height: 1.4; +} +[data-uppy-theme=dark] .uppy-Dashboard-serviceMsg { + background-color: #1f1f1f; + color: #eaeaea; + border-top: 1px solid #333; + border-bottom: 1px solid #333; +} + +.uppy-Dashboard-serviceMsg-title { + display: block; + margin-bottom: 4px; + padding-left: 42px; + line-height: 1; +} + +.uppy-Dashboard-serviceMsg-text { + padding: 0 15px; +} + +.uppy-Dashboard-serviceMsg-actionBtn { + font-size: inherit; + font-weight: inherit; + vertical-align: initial; + color: #2275d7; +} +[data-uppy-theme=dark] .uppy-Dashboard-serviceMsg-actionBtn { + color: rgba(2, 186, 242, 0.9); +} + +.uppy-Dashboard-serviceMsg-icon { + position: absolute; + top: 10px; + left: 15px; +} + +.uppy-Dashboard-AddFiles { + display: -ms-flexbox; + display: flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + -ms-flex-direction: column; + flex-direction: column; + height: 100%; + position: relative; + text-align: center; +} +[data-uppy-drag-drop-supported=true] .uppy-Dashboard-AddFiles { + margin: 7px; + height: calc(100% - 14px); + border-radius: 3px; + border: 1px dashed #dfdfdf; +} +.uppy-Dashboard-AddFilesPanel .uppy-Dashboard-AddFiles { + border: none; + height: calc(100% - 14px - 40px); +} +.uppy-Dashboard--modal .uppy-Dashboard-AddFiles { + border-color: #cfcfcf; +} +[data-uppy-theme=dark] .uppy-Dashboard-AddFiles { + border-color: #757575; +} + +.uppy-Dashboard-AddFiles-info { + padding-top: 15px; + padding-bottom: 15px; + margin-top: auto; + display: none; +} +.uppy-size--height-md .uppy-Dashboard-AddFiles-info { + display: block; +} +.uppy-size--md .uppy-Dashboard-AddFiles-info { + position: absolute; + bottom: 25px; + left: 0; + right: 0; + padding-top: 30px; + padding-bottom: 0; +} +[data-uppy-num-acquirers="0"] .uppy-Dashboard-AddFiles-info { + margin-top: 0; +} + +.uppy-Dashboard-browse { + cursor: pointer; + color: rgba(34, 117, 215, 0.9); +} +.uppy-Dashboard-browse:focus { + outline: none; +} +.uppy-Dashboard-browse::-moz-focus-inner { + border: 0; +} +.uppy-Dashboard-browse:hover, .uppy-Dashboard-browse:focus { + border-bottom: 1px solid #2275d7; +} +[data-uppy-theme=dark] .uppy-Dashboard-browse { + color: rgba(2, 186, 242, 0.9); +} +[data-uppy-theme=dark] .uppy-Dashboard-browse:hover, [data-uppy-theme=dark] .uppy-Dashboard-browse:focus { + border-bottom: 1px solid #02baf2; +} + +.uppy-Dashboard-browseBtn { + display: block; + font-size: 14px; + font-weight: 500; + margin-top: 8px; + margin-bottom: 5px; + width: 100%; +} +.uppy-size--md .uppy-Dashboard-browseBtn { + font-size: 15px; + width: auto; + margin: auto; + margin-top: 15px; + margin-bottom: 15px; + padding: 13px 44px; +} + +.uppy-Dashboard-AddFiles-list { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + -ms-flex: 1; + flex: 1; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + margin-top: 2px; + padding: 2px 0; + width: 100%; +} +.uppy-size--md .uppy-Dashboard-AddFiles-list { + -ms-flex-direction: row; + flex-direction: row; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -ms-flex-pack: center; + justify-content: center; + max-width: 600px; + overflow-y: visible; + margin-top: 15px; + padding-top: 0; + -ms-flex: none; + flex: none; +} + +.uppy-DashboardTab { + width: 100%; + text-align: center; + border-bottom: 1px solid #eaeaea; +} +[data-uppy-theme=dark] .uppy-DashboardTab { + border-bottom: 1px solid #333; +} +.uppy-size--md .uppy-DashboardTab { + display: inline-block; + width: initial; + margin-bottom: 10px; + border-bottom: none; +} + +.uppy-DashboardTab-btn { + width: 100%; + height: 100%; + cursor: pointer; + background-color: transparent; + -webkit-appearance: none; + appearance: none; + color: #525252; + display: -ms-flexbox; + display: flex; + -ms-flex-direction: row; + flex-direction: row; + -ms-flex-align: center; + align-items: center; + padding: 12px 15px; +} +.uppy-DashboardTab-btn:focus { + outline: none; +} +.uppy-DashboardTab-btn::-moz-focus-inner { + border: 0; +} +[dir="ltr"] .uppy-size--md .uppy-DashboardTab-btn{ + margin-right: 1px; +} +[dir="rtl"] .uppy-size--md .uppy-DashboardTab-btn{ + margin-left: 1px; +} +.uppy-size--md .uppy-DashboardTab-btn { + width: 86px; + -webkit-margin-end: 1px; + -ms-flex-direction: column; + flex-direction: column; + padding: 10px 3px; + border-radius: 5px; +} +[data-uppy-theme=dark] .uppy-DashboardTab-btn { + color: #eaeaea; +} + +.uppy-DashboardTab-btn::-moz-focus-inner { + border: 0; +} + +.uppy-DashboardTab-btn:hover { + background-color: #f1f3f6; +} +[data-uppy-theme=dark] .uppy-DashboardTab-btn:hover { + background-color: #333; +} + +.uppy-DashboardTab-btn:active, +.uppy-DashboardTab-btn:focus { + background-color: #eceef2; +} +[data-uppy-theme=dark] .uppy-DashboardTab-btn:active, +[data-uppy-theme=dark] .uppy-DashboardTab-btn:focus { + background-color: #525252; +} + +[dir="ltr"] .uppy-DashboardTab-btn svg{ + margin-right: 10px; +} + +[dir="rtl"] .uppy-DashboardTab-btn svg{ + margin-left: 10px; +} + +.uppy-DashboardTab-btn svg { + max-width: 100%; + max-height: 100%; + display: inline-block; + vertical-align: text-top; + overflow: hidden; + transition: transform ease-in-out 0.15s; + -webkit-margin-end: 10px; +} +[dir="ltr"] .uppy-size--md .uppy-DashboardTab-btn svg{ + margin-right: 0; +} +[dir="rtl"] .uppy-size--md .uppy-DashboardTab-btn svg{ + margin-left: 0; +} +.uppy-size--md .uppy-DashboardTab-btn svg { + -webkit-margin-end: 0; +} + +.uppy-DashboardTab-name { + font-size: 14px; + font-weight: 500; +} +.uppy-size--md .uppy-DashboardTab-name { + font-size: 11px; + line-height: 15px; + margin-top: 8px; + margin-bottom: 0; +} + +.uppy-DashboardTab svg { + width: 23px; + height: 23px; + vertical-align: middle; +} +.uppy-size--md .uppy-DashboardTab svg { + width: 30px; + height: 30px; +} + +.uppy-Dashboard-input { + width: 0.1px; + height: 0.1px; + opacity: 0; + overflow: hidden; + position: absolute; + z-index: -1; +} + +.uppy-DashboardContent-bar { + -ms-flex-negative: 0; + flex-shrink: 0; + height: 40px; + width: 100%; + padding: 0 10px; + z-index: 1004; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: justify; + justify-content: space-between; + position: relative; + border-bottom: 1px solid #eaeaea; + background-color: #fafafa; +} +.uppy-size--md .uppy-DashboardContent-bar { + height: 50px; + padding: 0 15px; +} +[data-uppy-theme=dark] .uppy-DashboardContent-bar { + background-color: #1f1f1f; + border-bottom: 1px solid #333; +} + +.uppy-DashboardContent-title { + position: absolute; + top: 0; + left: 0; + right: 0; + text-align: center; + font-size: 12px; + line-height: 40px; + font-weight: 500; + width: 100%; + max-width: 170px; + text-overflow: ellipsis; + white-space: nowrap; + overflow-x: hidden; + margin: auto; +} +.uppy-size--md .uppy-DashboardContent-title { + font-size: 14px; + line-height: 50px; + max-width: 300px; +} +[data-uppy-theme=dark] .uppy-DashboardContent-title { + color: #eaeaea; +} + +[dir="ltr"] .uppy-DashboardContent-back,[dir="ltr"] +.uppy-DashboardContent-save{ + margin-left: -6px; +} + +[dir="rtl"] .uppy-DashboardContent-back,[dir="rtl"] +.uppy-DashboardContent-save{ + margin-right: -6px; +} + +.uppy-DashboardContent-back, +.uppy-DashboardContent-save { + background: none; + -webkit-appearance: none; + font-family: inherit; + font-size: inherit; + line-height: 1; + padding: 0; + margin: 0; + border: 0; + color: inherit; + border-radius: 3px; + font-size: 12px; + font-weight: 400; + cursor: pointer; + color: #2275d7; + padding: 7px 6px; + -webkit-margin-start: -6px; +} +.uppy-DashboardContent-back:focus, +.uppy-DashboardContent-save:focus { + outline: none; +} +.uppy-DashboardContent-back::-moz-focus-inner, +.uppy-DashboardContent-save::-moz-focus-inner { + border: 0; +} +.uppy-DashboardContent-back:hover, +.uppy-DashboardContent-save:hover { + color: #1b5dab; +} +.uppy-DashboardContent-back:focus, +.uppy-DashboardContent-save:focus { + background-color: #eceef2; +} +[data-uppy-theme=dark] .uppy-DashboardContent-back:focus, +[data-uppy-theme=dark] .uppy-DashboardContent-save:focus { + background-color: #333; +} +.uppy-size--md .uppy-DashboardContent-back, +.uppy-size--md .uppy-DashboardContent-save { + font-size: 14px; +} +[data-uppy-theme=dark] .uppy-DashboardContent-back, +[data-uppy-theme=dark] .uppy-DashboardContent-save { + color: #02baf2; +} + +[dir="ltr"] .uppy-DashboardContent-addMore{ + margin-right: -5px; +} + +[dir="rtl"] .uppy-DashboardContent-addMore{ + margin-left: -5px; +} + +.uppy-DashboardContent-addMore { + background: none; + -webkit-appearance: none; + font-family: inherit; + font-size: inherit; + line-height: 1; + padding: 0; + margin: 0; + border: 0; + color: inherit; + border-radius: 3px; + font-weight: 500; + cursor: pointer; + color: #2275d7; + width: 29px; + height: 29px; + padding: 7px 8px; + -webkit-margin-end: -5px; +} +.uppy-DashboardContent-addMore:focus { + outline: none; +} +.uppy-DashboardContent-addMore::-moz-focus-inner { + border: 0; +} +.uppy-DashboardContent-addMore:hover { + color: #1b5dab; +} +.uppy-DashboardContent-addMore:focus { + background-color: #eceef2; +} +[data-uppy-theme=dark] .uppy-DashboardContent-addMore:focus { + background-color: #333; +} +[dir="ltr"] .uppy-size--md .uppy-DashboardContent-addMore{ + margin-right: -8px; +} +[dir="rtl"] .uppy-size--md .uppy-DashboardContent-addMore{ + margin-left: -8px; +} +.uppy-size--md .uppy-DashboardContent-addMore { + font-size: 14px; + width: auto; + height: auto; + -webkit-margin-end: -8px; +} +[data-uppy-theme=dark] .uppy-DashboardContent-addMore { + color: #02baf2; +} + +[dir="ltr"] .uppy-DashboardContent-addMore svg{ + margin-right: 4px; +} + +[dir="rtl"] .uppy-DashboardContent-addMore svg{ + margin-left: 4px; +} + +.uppy-DashboardContent-addMore svg { + vertical-align: baseline; + -webkit-margin-end: 4px; +} +.uppy-size--md .uppy-DashboardContent-addMore svg { + width: 11px; + height: 11px; +} + +.uppy-DashboardContent-addMoreCaption { + display: none; +} +.uppy-size--md .uppy-DashboardContent-addMoreCaption { + display: inline; +} + +.uppy-DashboardContent-panel { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: whitesmoke; + overflow: hidden; + z-index: 1005; + border-radius: 5px; + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + -ms-flex: 1; + flex: 1; +} + +.uppy-Dashboard-AddFilesPanel { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background: #fafafa; + background: linear-gradient(0deg, #fafafa 35%, rgba(250, 250, 250, 0.85) 100%); + box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.15); + overflow: hidden; + z-index: 1005; + border-radius: 5px; + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; +} +[data-uppy-theme=dark] .uppy-Dashboard-AddFilesPanel { + background-color: #333; + background: linear-gradient(0deg, #1f1f1f 35%, rgba(31, 31, 31, 0.85) 100%); +} + +.uppy-Dashboard--isAddFilesPanelVisible .uppy-Dashboard-files { + filter: blur(2px); +} + +.uppy-Dashboard-progress { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 12%; +} + +.uppy-Dashboard-progressBarContainer.is-active { + z-index: 1004; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.uppy-Dashboard:not(.uppy-size--md) .uppy-StatusBar-additionalInfo { + display: none; +} + +.uppy-Dashboard-filesContainer { + position: relative; + overflow-y: hidden; + margin: 0; + -ms-flex: 1; + flex: 1; +} +.uppy-Dashboard-filesContainer:after { + content: ""; + display: table; + clear: both; +} + +.uppy-Dashboard-files { + margin: 0; + padding: 0 0 10px 0; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + -ms-flex: 1; + flex: 1; +} +.uppy-size--md .uppy-Dashboard-files { + padding-top: 10px; +} + +.uppy-Dashboard-dropFilesHereHint { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + visibility: hidden; + position: absolute; + top: 7px; + right: 7px; + bottom: 7px; + left: 7px; + padding-top: 90px; + border: 1px dashed #2275d7; + border-radius: 3px; + z-index: 2000; + text-align: center; + background-image: url("data:image/svg+xml,%3Csvg width='48' height='48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 1v1C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22S36.15 2 24 2V1zm0 0V0c13.254 0 24 10.746 24 24S37.254 48 24 48 0 37.254 0 24 10.746 0 24 0v1zm7.707 19.293a.999.999 0 1 1-1.414 1.414L25 16.414V34a1 1 0 1 1-2 0V16.414l-5.293 5.293a.999.999 0 1 1-1.414-1.414l7-7a.999.999 0 0 1 1.414 0l7 7z' fill='%232275D7' fill-rule='nonzero'/%3E%3C/svg%3E"); + background-position: 50% 50%; + background-repeat: no-repeat; + color: #757575; + font-size: 16px; +} +[data-uppy-theme=dark] .uppy-Dashboard-dropFilesHereHint { + color: #bbb; + border-color: #02baf2; + background-image: url("data:image/svg+xml,%3Csvg width='48' height='48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 1v1C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22S36.15 2 24 2V1zm0 0V0c13.254 0 24 10.746 24 24S37.254 48 24 48 0 37.254 0 24 10.746 0 24 0v1zm7.707 19.293a.999.999 0 1 1-1.414 1.414L25 16.414V34a1 1 0 1 1-2 0V16.414l-5.293 5.293a.999.999 0 1 1-1.414-1.414l7-7a.999.999 0 0 1 1.414 0l7 7z' fill='%2302BAF2' fill-rule='nonzero'/%3E%3C/svg%3E"); +} + +.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-dropFilesHereHint { + visibility: visible; +} +.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-DashboardContent-bar, +.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-files, +.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-progressindicators, +.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-serviceMsg { + opacity: 0.15; +} +.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-AddFiles { + opacity: 0.03; +} + +.uppy-Dashboard-AddFiles-title { + font-size: 17px; + line-height: 1.35; + font-weight: 500; + color: #000; + margin-top: 15px; + margin-bottom: 5px; + text-align: inline-start; + padding: 0 15px; + width: 100%; +} +.uppy-size--md .uppy-Dashboard-AddFiles-title { + font-size: 25px; + margin-top: 5px; + font-weight: 400; + text-align: center; + max-width: 480px; +} +[data-uppy-num-acquirers="0"] .uppy-Dashboard-AddFiles-title { + text-align: center; +} +[data-uppy-theme=dark] .uppy-Dashboard-AddFiles-title { + color: #eaeaea; +} +.uppy-Dashboard-AddFiles-title button { + font-weight: 500; +} +.uppy-size--md .uppy-Dashboard-AddFiles-title button { + font-weight: 400; +} + +.uppy-Dashboard-note { + font-size: 14px; + line-height: 1.25; + text-align: center; + color: #757575; + max-width: 350px; + margin: auto; + padding: 0 15px; +} +.uppy-size--md .uppy-Dashboard-note { + font-size: 15px; + line-height: 1.35; + max-width: 600px; +} +[data-uppy-theme=dark] .uppy-Dashboard-note { + color: #cfcfcf; +} + +a.uppy-Dashboard-poweredBy { + display: inline-block; + text-align: center; + font-size: 11px; + color: #939393; + text-decoration: none; + margin-top: 8px; +} + +.uppy-Dashboard-poweredByIcon { + stroke: #939393; + fill: none; + margin-left: 1px; + margin-right: 1px; + position: relative; + top: 1px; + opacity: 0.9; + vertical-align: text-top; +} + +.uppy-Dashboard-Item-previewIcon { + width: 25px; + height: 25px; + z-index: 100; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} +.uppy-size--md .uppy-Dashboard-Item-previewIcon { + width: 38px; + height: 38px; +} +.uppy-Dashboard-Item-previewIcon svg { + width: 100%; + height: 100%; +} + +.uppy-Dashboard-Item-previewIconWrap { + height: 76px; + max-height: 75%; + position: relative; +} + +.uppy-Dashboard-Item-previewIconBg { + width: 100%; + height: 100%; + filter: drop-shadow(rgba(0, 0, 0, 0.1) 0px 1px 1px); +} + +.uppy-Dashboard-upload { + position: relative; + width: 50px; + height: 50px; +} +.uppy-size--md .uppy-Dashboard-upload { + width: 60px; + height: 60px; +} + +.uppy-Dashboard-upload .uppy-c-icon { + position: relative; + top: 1px; + width: 50%; +} + +[dir="ltr"] .uppy-Dashboard-uploadCount{ + right: -12px; +} + +[dir="rtl"] .uppy-Dashboard-uploadCount{ + left: -12px; +} + +.uppy-Dashboard-uploadCount { + position: absolute; + top: -12px; + background-color: #1bb240; + color: #fff; + border-radius: 50%; + width: 16px; + height: 16px; + line-height: 16px; + font-size: 8px; +} +.uppy-size--md .uppy-Dashboard-uploadCount { + width: 18px; + height: 18px; + line-height: 18px; + font-size: 9px; +} + +.uppy-DragDrop-container { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + border-radius: 7px; + background-color: #fff; + cursor: pointer; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + max-width: 100%; +} +.uppy-DragDrop-container:focus { + outline: none; + box-shadow: 0 0 0 3px rgba(34, 117, 215, 0.4); +} +.uppy-DragDrop-container::-moz-focus-inner { + border: 0; +} + +.uppy-DragDrop-inner { + margin: 0; + text-align: center; + padding: 80px 20px; + line-height: 1.4; +} + +.uppy-DragDrop-arrow { + width: 60px; + height: 60px; + fill: #e0e0e0; + margin-bottom: 17px; +} + +.uppy-DragDrop--isDragDropSupported { + border: 2px dashed #adadad; +} + +.uppy-DragDrop--isDraggingOver { + border: 2px dashed #2275d7; + background: #eaeaea; +} +.uppy-DragDrop--isDraggingOver .uppy-DragDrop-arrow { + fill: #939393; +} + +.uppy-DragDrop-label { + display: block; + font-size: 1.15em; + margin-bottom: 5px; +} + +.uppy-DragDrop-browse { + color: #2275d7; + cursor: pointer; +} + +.uppy-DragDrop-note { + font-size: 1em; + color: #adadad; +} + +.uppy-FileInput-container { + margin-bottom: 15px; +} + +.uppy-FileInput-btn { + background: none; + -webkit-appearance: none; + font-family: inherit; + font-size: inherit; + line-height: 1; + padding: 0; + margin: 0; + border: 0; + color: inherit; + font-family: sans-serif; + font-size: 0.85em; + padding: 10px 15px; + color: #14457f; + border: 1px solid #14457f; + border-radius: 8px; + cursor: pointer; +} +.uppy-FileInput-btn:hover { + background-color: #14457f; + color: #fff; +} + +.uppy-ProgressBar { + /* no important */ + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 3px; + z-index: 10000; + transition: height 0.2s; +} + +.uppy-ProgressBar[aria-hidden=true] { + /* no important */ + height: 0; +} + +.uppy-ProgressBar-inner { + /* no important */ + background-color: #2275d7; + box-shadow: 0 0 10px rgba(34, 117, 215, 0.7); + height: 100%; + width: 0; + transition: width 0.4s ease; +} + +.uppy-ProgressBar-percentage { + /* no important */ + display: none; + text-align: center; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + color: #fff; +} + +.uppy-Url { + width: 100%; + height: 100%; + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + -ms-flex: 1; + flex: 1; +} +[data-uppy-theme=dark] .uppy-Url { + background-color: #1f1f1f; +} + +.uppy-Url-input { + width: 90%; + max-width: 650px; + margin-bottom: 15px; +} +.uppy-size--md .uppy-Url-input { + margin-bottom: 20px; +} + +.uppy-Url-importButton { + padding: 13px 25px; +} +.uppy-size--md .uppy-Url-importButton { + padding: 13px 30px; +} + +.uppy-Webcam-container { + width: 100%; + height: 100%; + display: -ms-flexbox; + display: flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + -ms-flex-direction: column; + flex-direction: column; +} + +.uppy-Webcam-videoContainer { + width: 100%; + -ms-flex: 1; + flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + overflow: hidden; + background-color: #333; + text-align: center; + position: relative; +} + +.uppy-Webcam-video { + max-width: 100%; + max-height: 100%; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + margin: auto; +} + +.uppy-Webcam-video--mirrored { + transform: scaleX(-1); +} + +.uppy-Webcam-footer { + width: 100%; + min-height: 75px; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: justify; + justify-content: space-between; + padding: 20px 20px; +} + +.uppy-Webcam-videoSourceContainer { + width: 100%; + -ms-flex-positive: 0; + flex-grow: 0; +} + +.uppy-size--lg .uppy-Webcam-videoSourceContainer { + width: 33%; + margin: 0; +} + +.uppy-Webcam-videoSource-select { + display: block; + font-size: 16px; + line-height: 1.2; + padding: 0.4em 1em 0.3em 0.4em; + width: 100%; + max-width: 90%; + border: 1px solid #757575; + background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23757575%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); + background-repeat: no-repeat; + background-position: right 0.4em top 50%, 0 0; + background-size: 0.65em auto, 100%; + margin: auto; + margin-bottom: 10px; + white-space: nowrap; + text-overflow: ellipsis; +} +.uppy-size--lg .uppy-Webcam-videoSource-select { + font-size: 14px; + margin-bottom: 0; +} + +.uppy-Webcam-videoSource-select::-ms-expand { + display: none; +} + +.uppy-Webcam-buttonContainer { + width: 50%; + margin-left: 25%; + text-align: center; +} + +.uppy-size--lg .uppy-Webcam-buttonContainer { + width: 34%; + margin-left: 0; +} + +.uppy-Webcam-recordingLength { + width: 25%; + -ms-flex-positive: 0; + flex-grow: 0; + color: #757575; + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + text-align: right; +} + +.uppy-size--lg .uppy-Webcam-recordingLength { + width: 33%; +} + +.uppy-Webcam-button { + width: 45px; + height: 45px; + border-radius: 50%; + background-color: #e32437; + color: #fff; + cursor: pointer; + transition: all 0.3s; +} +.uppy-Webcam-button:focus { + outline: none; +} +.uppy-Webcam-button::-moz-focus-inner { + border: 0; +} +.uppy-Webcam-button:focus { + box-shadow: 0 0 0 3px rgba(34, 117, 215, 0.5); +} +.uppy-Webcam-button:hover { + background-color: #d31b2d; +} +[data-uppy-theme=dark] .uppy-Webcam-button:focus { + outline: none; +} +[data-uppy-theme=dark] .uppy-Webcam-button::-moz-focus-inner { + border: 0; +} +[data-uppy-theme=dark] .uppy-Webcam-button:focus { + box-shadow: 0 0 0 2px rgba(170, 225, 255, 0.85); +} + +.uppy-Webcam-button--submit { + background-color: #2275d7; + margin: 0 12px; +} +.uppy-Webcam-button--submit:hover { + background-color: #1f69c1; +} + +.uppy-Webcam-button svg { + width: 30px; + height: 30px; + max-width: 100%; + max-height: 100%; + display: inline-block; + vertical-align: text-top; + overflow: hidden; + fill: currentColor; +} + +.uppy-size--md .uppy-Webcam-button { + width: 60px; + height: 60px; +} + +.uppy-Webcam-button--picture { + margin-right: 12px; +} + +.uppy-Webcam-permissons { + padding: 15px; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-flow: column wrap; + flex-flow: column wrap; + height: 100%; + -ms-flex: 1; + flex: 1; +} + +.uppy-Webcam-permissons p { + max-width: 450px; + line-height: 1.3; + text-align: center; + line-height: 1.45; + color: #939393; + margin: 0; +} + +.uppy-Webcam-permissonsIcon svg { + width: 100px; + height: 75px; + color: #bbb; + margin-bottom: 30px; +} + +.uppy-Webcam-title { + font-size: 22px; + line-height: 1.35; + font-weight: 400; + margin: 0; + margin-bottom: 5px; + padding: 0 15px; + max-width: 500px; + text-align: center; + color: #333; +} +[data-uppy-theme=dark] .uppy-Webcam-title { + color: #eaeaea; +} + +.uppy-ScreenCapture-container { + width: 100%; + height: 100%; + display: -ms-flexbox; + display: flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + -ms-flex-direction: column; + flex-direction: column; +} + +.uppy-ScreenCapture-videoContainer { + width: 100%; + -ms-flex: 1; + flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + overflow: hidden; + background-color: #333; + text-align: center; + position: relative; +} +.uppy-size--md .uppy-ScreenCapture-videoContainer { + max-width: 100%; +} + +.uppy-ScreenCapture-video { + max-width: 100%; + max-height: 100%; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + margin: auto; + outline: 0; +} + +.uppy-ScreenCapture-buttonContainer { + width: 100%; + height: 75px; + border-top: 1px solid #eaeaea; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + padding: 0 20px; + background-color: #fff; +} +[data-uppy-theme=dark] .uppy-ScreenCapture-buttonContainer { + background-color: #1f1f1f; + border-top: 1px solid #333; +} + +.uppy-ScreenCapture-button { + width: 45px; + height: 45px; + border-radius: 50%; + color: #fff; + cursor: pointer; + transition: all 0.3s; +} +.uppy-ScreenCapture-button:focus { + outline: none; +} +.uppy-ScreenCapture-button::-moz-focus-inner { + border: 0; +} +.uppy-ScreenCapture-button:focus { + box-shadow: 0 0 0 3px rgba(34, 117, 215, 0.5); +} +[data-uppy-theme=dark] .uppy-ScreenCapture-button:focus { + outline: none; +} +[data-uppy-theme=dark] .uppy-ScreenCapture-button::-moz-focus-inner { + border: 0; +} +[data-uppy-theme=dark] .uppy-ScreenCapture-button:focus { + box-shadow: 0 0 0 2px rgba(170, 225, 255, 0.85); +} +.uppy-size--md .uppy-ScreenCapture-button { + width: 60px; + height: 60px; +} +.uppy-ScreenCapture-button:hover { + background-color: #d31b2d; +} + +.uppy-ScreenCapture-button svg { + width: 30px; + height: 30px; + max-width: 100%; + max-height: 100%; + display: inline-block; + vertical-align: text-top; + overflow: hidden; + fill: currentColor; +} + +.uppy-ScreenCapture-button--submit { + background-color: #2275d7; + margin-left: 12px; +} +.uppy-ScreenCapture-button--submit:hover { + background-color: #1f69c1; +} +.uppy-ScreenCapture-button--submit:disabled { + background-color: #939393; + cursor: default; +} +.uppy-ScreenCapture-button--submit:disabled:hover { + background-color: #eaeaea; +} + +.uppy-ScreenCapture-title { + font-size: 22px; + line-height: 1.35; + font-weight: 400; + margin: 0; + margin-bottom: 5px; + padding: 0 15px; + max-width: 500px; + text-align: center; + color: #333; +} + +.uppy-ScreenCapture-icon--stream { + position: absolute; + right: 0; + top: 0; + margin: 1rem; + z-index: 1; +} +.uppy-ScreenCapture-icon--stream svg { + fill: #939393; +} + +.uppy-ScreenCapture-icon--streamActive svg { + animation: uppy-ScreenCapture-icon--blink 1s cubic-bezier(0.47, 0, 0.75, 0.72) infinite; +} + +@keyframes uppy-ScreenCapture-icon--blink { + 0% { + fill: #2275d7; + } + 50% { + fill: #939393; + } + 100% { + fill: #2275d7; + } +} +.uppy-ScreenCapture-button--video { + color: #fff; + background: #e32437; +} +.uppy-ScreenCapture-button--video:hover { + background-color: #bc1828; +} + +[type=range] { + -webkit-appearance: none; + background: transparent; + margin: 9px 0; + width: 100%; +} +[type=range]::-moz-focus-outer { + border: 0; +} +[type=range]:focus { + outline: 0; +} +[type=range]:focus::-webkit-slider-runnable-track { + background: rgba(255, 255, 255, 0.2); +} +[type=range]:focus::-ms-fill-lower { + background: rgba(255, 255, 255, 0.2); +} +[type=range]:focus::-ms-fill-upper { + background: rgba(255, 255, 255, 0.2); +} +[type=range]::-webkit-slider-runnable-track { + cursor: default; + height: 4px; + -webkit-transition: all 0.2s ease; + transition: all 0.2s ease; + width: 100%; + box-shadow: 0 0 0 transparent, 0 0 0 rgba(13, 13, 13, 0); + background: rgba(255, 255, 255, 0.2); + border: 0 solid transparent; + border-radius: 5px; +} +[type=range]::-webkit-slider-thumb { + box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), 0 0 0 rgba(13, 13, 13, 0.2); + background: #fff; + border: 0 solid transparent; + border-radius: 9px; + box-sizing: border-box; + cursor: default; + height: 18px; + width: 18px; + -webkit-appearance: none; + margin-top: -7px; +} +[type=range]::-moz-range-track { + box-shadow: 0 0 0 transparent, 0 0 0 rgba(13, 13, 13, 0); + cursor: default; + height: 4px; + -moz-transition: all 0.2s ease; + transition: all 0.2s ease; + width: 100%; + background: rgba(255, 255, 255, 0.2); + border: 0 solid transparent; + border-radius: 5px; + height: 4px; +} +[type=range]::-moz-range-thumb { + box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), 0 0 0 rgba(13, 13, 13, 0.2); + background: #fff; + border: 0 solid transparent; + border-radius: 9px; + box-sizing: border-box; + cursor: default; + height: 18px; + width: 18px; +} +[type=range]::-ms-track { + cursor: default; + height: 4px; + -ms-transition: all 0.2s ease; + transition: all 0.2s ease; + width: 100%; + background: transparent; + border-color: transparent; + border-width: 9px 0; + color: transparent; +} +[type=range]::-ms-fill-lower { + box-shadow: 0 0 0 transparent, 0 0 0 rgba(13, 13, 13, 0); + background: rgba(242, 242, 242, 0.2); + border: 0 solid transparent; + border-radius: 10px; +} +[type=range]::-ms-fill-upper { + box-shadow: 0 0 0 transparent, 0 0 0 rgba(13, 13, 13, 0); + background: rgba(255, 255, 255, 0.2); + border: 0 solid transparent; + border-radius: 10px; +} +[type=range]::-ms-thumb { + box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), 0 0 0 rgba(13, 13, 13, 0.2); + background: #fff; + border: 0 solid transparent; + border-radius: 9px; + box-sizing: border-box; + cursor: default; + height: 18px; + width: 18px; + margin-top: 1px; +} +[type=range]:disabled::-webkit-slider-thumb, [type=range]:disabled::-moz-range-thumb, [type=range]:disabled::-ms-thumb, [type=range]:disabled::-webkit-slider-runnable-track, [type=range]:disabled::-ms-fill-lower, [type=range]:disabled::-ms-fill-upper { + cursor: not-allowed; +} + +/*! + * Cropper.js v1.5.6 + * https://fengyuanchen.github.io/cropperjs + * + * Copyright 2015-present Chen Fengyuan + * Released under the MIT license + * + * Date: 2019-10-04T04:33:44.164Z + */ +.cropper-container { + direction: ltr; + font-size: 0; + line-height: 0; + position: relative; + -ms-touch-action: none; + touch-action: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.cropper-container img { + display: block; + height: 100%; + image-orientation: 0deg; + max-height: none !important; + max-width: none !important; + min-height: 0 !important; + min-width: 0 !important; + width: 100%; +} + +.cropper-wrap-box, +.cropper-canvas, +.cropper-drag-box, +.cropper-crop-box, +.cropper-modal { + bottom: 0; + left: 0; + position: absolute; + right: 0; + top: 0; +} + +.cropper-wrap-box, +.cropper-canvas { + overflow: hidden; +} + +.cropper-drag-box { + background-color: #fff; + opacity: 0; +} + +.cropper-modal { + background-color: #000; + opacity: 1; +} + +.cropper-view-box { + display: block; + height: 100%; + outline: 1px solid #39f; + outline-color: rgba(51, 153, 255, 0.75); + overflow: hidden; + width: 100%; +} + +.cropper-dashed { + border: 0 dashed #eee; + display: block; + opacity: 0.5; + position: absolute; +} + +.cropper-dashed.dashed-h { + border-bottom-width: 1px; + border-top-width: 1px; + height: calc(100% / 3); + left: 0; + top: calc(100% / 3); + width: 100%; +} + +.cropper-dashed.dashed-v { + border-left-width: 1px; + border-right-width: 1px; + height: 100%; + left: calc(100% / 3); + top: 0; + width: calc(100% / 3); +} + +.cropper-center { + display: block; + height: 0; + left: 50%; + opacity: 0.75; + position: absolute; + top: 50%; + width: 0; +} + +.cropper-center::before, +.cropper-center::after { + background-color: #eee; + content: " "; + display: block; + position: absolute; +} + +.cropper-center::before { + height: 1px; + left: -3px; + top: 0; + width: 7px; +} + +.cropper-center::after { + height: 7px; + left: 0; + top: -3px; + width: 1px; +} + +.cropper-face, +.cropper-line, +.cropper-point { + display: block; + height: 100%; + opacity: 0.1; + position: absolute; + width: 100%; +} + +.cropper-face { + background-color: #fff; + left: 0; + top: 0; + opacity: 0; +} + +.cropper-line { + background-color: #39f; +} + +.cropper-line.line-e { + cursor: ew-resize; + right: -3px; + top: 0; + width: 5px; +} + +.cropper-line.line-n { + cursor: ns-resize; + height: 5px; + left: 0; + top: -3px; +} + +.cropper-line.line-w { + cursor: ew-resize; + left: -3px; + top: 0; + width: 5px; +} + +.cropper-line.line-s { + bottom: -3px; + cursor: ns-resize; + height: 5px; + left: 0; +} + +.cropper-point { + background-color: #39f; + height: 5px; + opacity: 0.75; + width: 5px; +} + +.cropper-point.point-e { + cursor: ew-resize; + margin-top: -3px; + right: -3px; + top: 50%; +} + +.cropper-point.point-n { + cursor: ns-resize; + left: 50%; + margin-left: -3px; + top: -3px; +} + +.cropper-point.point-w { + cursor: ew-resize; + left: -3px; + margin-top: -3px; + top: 50%; +} + +.cropper-point.point-s { + bottom: -3px; + cursor: s-resize; + left: 50%; + margin-left: -3px; +} + +.cropper-point.point-ne { + cursor: nesw-resize; + right: -3px; + top: -3px; +} + +.cropper-point.point-nw { + cursor: nwse-resize; + left: -3px; + top: -3px; +} + +.cropper-point.point-sw { + bottom: -3px; + cursor: nesw-resize; + left: -3px; +} + +.cropper-point.point-se { + bottom: -3px; + cursor: nwse-resize; + height: 20px; + opacity: 1; + right: -3px; + width: 20px; +} + +@media (min-width: 768px) { + .cropper-point.point-se { + height: 15px; + width: 15px; + } +} +@media (min-width: 992px) { + .cropper-point.point-se { + height: 10px; + width: 10px; + } +} +@media (min-width: 1200px) { + .cropper-point.point-se { + height: 5px; + opacity: 0.75; + width: 5px; + } +} +.cropper-point.point-se::before { + background-color: #39f; + bottom: -50%; + content: " "; + display: block; + height: 200%; + opacity: 0; + position: absolute; + right: -50%; + width: 200%; +} + +.cropper-invisible { + opacity: 0; +} + +.cropper-bg { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC"); +} + +.cropper-hide { + display: block; + height: 0; + position: absolute; + width: 0; +} + +.cropper-hidden { + display: none !important; +} + +.cropper-move { + cursor: move; +} + +.cropper-crop { + cursor: crosshair; +} + +.cropper-disabled .cropper-drag-box, +.cropper-disabled .cropper-face, +.cropper-disabled .cropper-line, +.cropper-disabled .cropper-point { + cursor: not-allowed; +} + +.uppy-ImageCropper { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + width: 100%; + height: 100%; +} + +.uppy-ImageCropper-container { + -ms-flex-positive: 1; + flex-grow: 1; +} + +.uppy-ImageCropper-image { + display: block; + max-height: 400px; +} + +.uppy-ImageCropper-controls { + position: absolute; + bottom: 15px; + left: 50%; + transform: translateX(-50%); + background-color: rgba(0, 0, 0, 0.6); + color: #fff; + display: -ms-flexbox; + display: flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + padding-top: 38px; +} +@media screen and (min-width: 768px) { + .uppy-ImageCropper-controls { + padding-top: 0; + } +} + +.uppy-ImageCropper-controls button { + width: 35px; + height: 35px; +} +.uppy-ImageCropper-controls button svg { + padding: 3px; +} +.uppy-size--md .uppy-ImageCropper-controls button { + width: 40px; + height: 40px; +} +.uppy-size--md .uppy-ImageCropper-controls button svg { + padding: 1px; +} +.uppy-ImageCropper-controls button:hover { + background-color: rgba(34, 117, 215, 0.8); +} +.uppy-ImageCropper-controls button:focus { + outline: none; + background-color: rgba(34, 117, 215, 0.8); +} + +.uppy-ImageCropper-rangeWrapper { + position: absolute !important; + height: 38px; + top: 0; + right: 10px; + left: 10px; +} +@media screen and (min-width: 768px) { + .uppy-ImageCropper-rangeWrapper { + position: static !important; + height: auto; + } +} + +@media screen and (min-width: 768px) { + .uppy-ImageCropper-range { + margin-right: 15px; + margin-left: 5px; + width: 180px; + } +} + +.uppy-ImageCropper .cropper-point { + width: 8px; + height: 8px; +} + +.uppy-ImageCropper .cropper-view-box { + outline: 2px solid #39f; +} + +.uppy-is-drag-over:after { + content: ""; + position: fixed; + top: 7px; + right: 7px; + bottom: 7px; + left: 7px; + border: 5px dashed #bbb; + z-index: 10000; + background-color: rgba(234, 234, 234, 0.5); +} \ No newline at end of file diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/uppy/uppy.js b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/uppy/uppy.js new file mode 100644 index 00000000..add2c253 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/libs/uppy/uppy.js @@ -0,0 +1,42133 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Uppy = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i= 10 || num % 1 === 0) { + // Do not show decimals when the number is two-digit, or if the number has no + // decimal component. + return (neg ? '-' : '') + num.toFixed(0) + ' ' + unit + } else { + return (neg ? '-' : '') + num.toFixed(1) + ' ' + unit + } +} + +},{}],2:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); + return true; + } catch (e) { + return false; + } +} + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +function _possibleConstructorReturn(self, call) { + if (call && (typeof call === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized(self); +} + +function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct(); + + return function _createSuperInternal() { + var Super = _getPrototypeOf(Derived), + result; + + if (hasNativeReflectConstruct) { + var NewTarget = _getPrototypeOf(this).constructor; + + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return _possibleConstructorReturn(this, result); + }; +} + +function _superPropBase(object, property) { + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = _getPrototypeOf(object); + if (object === null) break; + } + + return object; +} + +function _get(target, property, receiver) { + if (typeof Reflect !== "undefined" && Reflect.get) { + _get = Reflect.get; + } else { + _get = function _get(target, property, receiver) { + var base = _superPropBase(target, property); + + if (!base) return; + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) { + return desc.get.call(receiver); + } + + return desc.value; + }; + } + + return _get(target, property, receiver || target); +} + +var Emitter = /*#__PURE__*/function () { + function Emitter() { + _classCallCheck(this, Emitter); + + Object.defineProperty(this, 'listeners', { + value: {}, + writable: true, + configurable: true + }); + } + + _createClass(Emitter, [{ + key: "addEventListener", + value: function addEventListener(type, callback, options) { + if (!(type in this.listeners)) { + this.listeners[type] = []; + } + + this.listeners[type].push({ + callback: callback, + options: options + }); + } + }, { + key: "removeEventListener", + value: function removeEventListener(type, callback) { + if (!(type in this.listeners)) { + return; + } + + var stack = this.listeners[type]; + + for (var i = 0, l = stack.length; i < l; i++) { + if (stack[i].callback === callback) { + stack.splice(i, 1); + return; + } + } + } + }, { + key: "dispatchEvent", + value: function dispatchEvent(event) { + if (!(event.type in this.listeners)) { + return; + } + + var stack = this.listeners[event.type]; + var stackToCall = stack.slice(); + + for (var i = 0, l = stackToCall.length; i < l; i++) { + var listener = stackToCall[i]; + + try { + listener.callback.call(this, event); + } catch (e) { + Promise.resolve().then(function () { + throw e; + }); + } + + if (listener.options && listener.options.once) { + this.removeEventListener(event.type, listener.callback); + } + } + + return !event.defaultPrevented; + } + }]); + + return Emitter; +}(); + +var AbortSignal = /*#__PURE__*/function (_Emitter) { + _inherits(AbortSignal, _Emitter); + + var _super = _createSuper(AbortSignal); + + function AbortSignal() { + var _this; + + _classCallCheck(this, AbortSignal); + + _this = _super.call(this); // Some versions of babel does not transpile super() correctly for IE <= 10, if the parent + // constructor has failed to run, then "this.listeners" will still be undefined and then we call + // the parent constructor directly instead as a workaround. For general details, see babel bug: + // https://github.com/babel/babel/issues/3041 + // This hack was added as a fix for the issue described here: + // https://github.com/Financial-Times/polyfill-library/pull/59#issuecomment-477558042 + + if (!_this.listeners) { + Emitter.call(_assertThisInitialized(_this)); + } // Compared to assignment, Object.defineProperty makes properties non-enumerable by default and + // we want Object.keys(new AbortController().signal) to be [] for compat with the native impl + + + Object.defineProperty(_assertThisInitialized(_this), 'aborted', { + value: false, + writable: true, + configurable: true + }); + Object.defineProperty(_assertThisInitialized(_this), 'onabort', { + value: null, + writable: true, + configurable: true + }); + return _this; + } + + _createClass(AbortSignal, [{ + key: "toString", + value: function toString() { + return '[object AbortSignal]'; + } + }, { + key: "dispatchEvent", + value: function dispatchEvent(event) { + if (event.type === 'abort') { + this.aborted = true; + + if (typeof this.onabort === 'function') { + this.onabort.call(this, event); + } + } + + _get(_getPrototypeOf(AbortSignal.prototype), "dispatchEvent", this).call(this, event); + } + }]); + + return AbortSignal; +}(Emitter); +var AbortController = /*#__PURE__*/function () { + function AbortController() { + _classCallCheck(this, AbortController); + + // Compared to assignment, Object.defineProperty makes properties non-enumerable by default and + // we want Object.keys(new AbortController()) to be [] for compat with the native impl + Object.defineProperty(this, 'signal', { + value: new AbortSignal(), + writable: true, + configurable: true + }); + } + + _createClass(AbortController, [{ + key: "abort", + value: function abort() { + var event; + + try { + event = new Event('abort'); + } catch (e) { + if (typeof document !== 'undefined') { + if (!document.createEvent) { + // For Internet Explorer 8: + event = document.createEventObject(); + event.type = 'abort'; + } else { + // For Internet Explorer 11: + event = document.createEvent('Event'); + event.initEvent('abort', false, false); + } + } else { + // Fallback where document isn't available: + event = { + type: 'abort', + bubbles: false, + cancelable: false + }; + } + } + + this.signal.dispatchEvent(event); + } + }, { + key: "toString", + value: function toString() { + return '[object AbortController]'; + } + }]); + + return AbortController; +}(); + +if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { + // These are necessary to make sure that we get correct output for: + // Object.prototype.toString.call(new AbortController()) + AbortController.prototype[Symbol.toStringTag] = 'AbortController'; + AbortSignal.prototype[Symbol.toStringTag] = 'AbortSignal'; +} + +exports.AbortController = AbortController; +exports.AbortSignal = AbortSignal; +exports.default = AbortController; + +},{}],3:[function(require,module,exports){ +module.exports = after + +function after(count, callback, err_cb) { + var bail = false + err_cb = err_cb || noop + proxy.count = count + + return (count === 0) ? callback() : proxy + + function proxy(err, result) { + if (proxy.count <= 0) { + throw new Error('after called too many times') + } + --proxy.count + + // after first error, rest are passed to err_cb + if (err) { + bail = true + callback(err) + // future error callbacks will go to error handler + callback = err_cb + } else if (proxy.count === 0 && !bail) { + callback(null, result) + } + } +} + +function noop() {} + +},{}],4:[function(require,module,exports){ +/** + * An abstraction for slicing an arraybuffer even when + * ArrayBuffer.prototype.slice is not supported + * + * @api public + */ + +module.exports = function(arraybuffer, start, end) { + var bytes = arraybuffer.byteLength; + start = start || 0; + end = end || bytes; + + if (arraybuffer.slice) { return arraybuffer.slice(start, end); } + + if (start < 0) { start += bytes; } + if (end < 0) { end += bytes; } + if (end > bytes) { end = bytes; } + + if (start >= bytes || start >= end || bytes === 0) { + return new ArrayBuffer(0); + } + + var abv = new Uint8Array(arraybuffer); + var result = new Uint8Array(end - start); + for (var i = start, ii = 0; i < end; i++, ii++) { + result[ii] = abv[i]; + } + return result.buffer; +}; + +},{}],5:[function(require,module,exports){ + +/** + * Expose `Backoff`. + */ + +module.exports = Backoff; + +/** + * Initialize backoff timer with `opts`. + * + * - `min` initial timeout in milliseconds [100] + * - `max` max timeout [10000] + * - `jitter` [0] + * - `factor` [2] + * + * @param {Object} opts + * @api public + */ + +function Backoff(opts) { + opts = opts || {}; + this.ms = opts.min || 100; + this.max = opts.max || 10000; + this.factor = opts.factor || 2; + this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0; + this.attempts = 0; +} + +/** + * Return the backoff duration. + * + * @return {Number} + * @api public + */ + +Backoff.prototype.duration = function(){ + var ms = this.ms * Math.pow(this.factor, this.attempts++); + if (this.jitter) { + var rand = Math.random(); + var deviation = Math.floor(rand * this.jitter * ms); + ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation; + } + return Math.min(ms, this.max) | 0; +}; + +/** + * Reset the number of attempts. + * + * @api public + */ + +Backoff.prototype.reset = function(){ + this.attempts = 0; +}; + +/** + * Set the minimum duration + * + * @api public + */ + +Backoff.prototype.setMin = function(min){ + this.ms = min; +}; + +/** + * Set the maximum duration + * + * @api public + */ + +Backoff.prototype.setMax = function(max){ + this.max = max; +}; + +/** + * Set the jitter + * + * @api public + */ + +Backoff.prototype.setJitter = function(jitter){ + this.jitter = jitter; +}; + + +},{}],6:[function(require,module,exports){ +/* + * base64-arraybuffer + * https://github.com/niklasvh/base64-arraybuffer + * + * Copyright (c) 2012 Niklas von Hertzen + * Licensed under the MIT license. + */ +(function(){ + "use strict"; + + var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + // Use a lookup table to find the index. + var lookup = new Uint8Array(256); + for (var i = 0; i < chars.length; i++) { + lookup[chars.charCodeAt(i)] = i; + } + + exports.encode = function(arraybuffer) { + var bytes = new Uint8Array(arraybuffer), + i, len = bytes.length, base64 = ""; + + for (i = 0; i < len; i+=3) { + base64 += chars[bytes[i] >> 2]; + base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)]; + base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)]; + base64 += chars[bytes[i + 2] & 63]; + } + + if ((len % 3) === 2) { + base64 = base64.substring(0, base64.length - 1) + "="; + } else if (len % 3 === 1) { + base64 = base64.substring(0, base64.length - 2) + "=="; + } + + return base64; + }; + + exports.decode = function(base64) { + var bufferLength = base64.length * 0.75, + len = base64.length, i, p = 0, + encoded1, encoded2, encoded3, encoded4; + + if (base64[base64.length - 1] === "=") { + bufferLength--; + if (base64[base64.length - 2] === "=") { + bufferLength--; + } + } + + var arraybuffer = new ArrayBuffer(bufferLength), + bytes = new Uint8Array(arraybuffer); + + for (i = 0; i < len; i+=4) { + encoded1 = lookup[base64.charCodeAt(i)]; + encoded2 = lookup[base64.charCodeAt(i+1)]; + encoded3 = lookup[base64.charCodeAt(i+2)]; + encoded4 = lookup[base64.charCodeAt(i+3)]; + + bytes[p++] = (encoded1 << 2) | (encoded2 >> 4); + bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2); + bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63); + } + + return arraybuffer; + }; +})(); + +},{}],7:[function(require,module,exports){ +'use strict' + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + +},{}],8:[function(require,module,exports){ +/** + * Create a blob builder even when vendor prefixes exist + */ + +var BlobBuilder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : + typeof WebKitBlobBuilder !== 'undefined' ? WebKitBlobBuilder : + typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : + typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : + false; + +/** + * Check if Blob constructor is supported + */ + +var blobSupported = (function() { + try { + var a = new Blob(['hi']); + return a.size === 2; + } catch(e) { + return false; + } +})(); + +/** + * Check if Blob constructor supports ArrayBufferViews + * Fails in Safari 6, so we need to map to ArrayBuffers there. + */ + +var blobSupportsArrayBufferView = blobSupported && (function() { + try { + var b = new Blob([new Uint8Array([1,2])]); + return b.size === 2; + } catch(e) { + return false; + } +})(); + +/** + * Check if BlobBuilder is supported + */ + +var blobBuilderSupported = BlobBuilder + && BlobBuilder.prototype.append + && BlobBuilder.prototype.getBlob; + +/** + * Helper function that maps ArrayBufferViews to ArrayBuffers + * Used by BlobBuilder constructor and old browsers that didn't + * support it in the Blob constructor. + */ + +function mapArrayBufferViews(ary) { + return ary.map(function(chunk) { + if (chunk.buffer instanceof ArrayBuffer) { + var buf = chunk.buffer; + + // if this is a subarray, make a copy so we only + // include the subarray region from the underlying buffer + if (chunk.byteLength !== buf.byteLength) { + var copy = new Uint8Array(chunk.byteLength); + copy.set(new Uint8Array(buf, chunk.byteOffset, chunk.byteLength)); + buf = copy.buffer; + } + + return buf; + } + + return chunk; + }); +} + +function BlobBuilderConstructor(ary, options) { + options = options || {}; + + var bb = new BlobBuilder(); + mapArrayBufferViews(ary).forEach(function(part) { + bb.append(part); + }); + + return (options.type) ? bb.getBlob(options.type) : bb.getBlob(); +}; + +function BlobConstructor(ary, options) { + return new Blob(mapArrayBufferViews(ary), options || {}); +}; + +if (typeof Blob !== 'undefined') { + BlobBuilderConstructor.prototype = Blob.prototype; + BlobConstructor.prototype = Blob.prototype; +} + +module.exports = (function() { + if (blobSupported) { + return blobSupportsArrayBufferView ? Blob : BlobConstructor; + } else if (blobBuilderSupported) { + return BlobBuilderConstructor; + } else { + return undefined; + } +})(); + +},{}],9:[function(require,module,exports){ + +},{}],10:[function(require,module,exports){ +(function (Buffer){(function (){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +var base64 = require('base64-js') +var ieee754 = require('ieee754') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +var K_MAX_LENGTH = 0x7fffffff +exports.kMaxLength = K_MAX_LENGTH + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an Object + * implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ +Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() + +if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && + typeof console.error === 'function') { + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by ' + + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' + ) +} + +function typedArraySupport () { + // Can typed array instances can be augmented? + try { + var arr = new Uint8Array(1) + arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } + return arr.foo() === 42 + } catch (e) { + return false + } +} + +Object.defineProperty(Buffer.prototype, 'parent', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.buffer + } +}) + +Object.defineProperty(Buffer.prototype, 'offset', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.byteOffset + } +}) + +function createBuffer (length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('The value "' + length + '" is invalid for option "size"') + } + // Return an augmented `Uint8Array` instance + var buf = new Uint8Array(length) + buf.__proto__ = Buffer.prototype + return buf +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new TypeError( + 'The "string" argument must be of type string. Received type number' + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) +} + +// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 +if (typeof Symbol !== 'undefined' && Symbol.species != null && + Buffer[Symbol.species] === Buffer) { + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true, + enumerable: false, + writable: false + }) +} + +Buffer.poolSize = 8192 // not used by this implementation + +function from (value, encodingOrOffset, length) { + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + if (ArrayBuffer.isView(value)) { + return fromArrayLike(value) + } + + if (value == null) { + throw TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) + } + + if (isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'number') { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number' + ) + } + + var valueOf = value.valueOf && value.valueOf() + if (valueOf != null && valueOf !== value) { + return Buffer.from(valueOf, encodingOrOffset, length) + } + + var b = fromObject(value) + if (b) return b + + if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === 'function') { + return Buffer.from( + value[Symbol.toPrimitive]('string'), encodingOrOffset, length + ) + } + + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length) +} + +// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: +// https://github.com/feross/buffer/pull/148 +Buffer.prototype.__proto__ = Uint8Array.prototype +Buffer.__proto__ = Uint8Array + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be of type number') + } else if (size < 0) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } +} + +function alloc (size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) +} + +function allocUnsafe (size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + var length = byteLength(string, encoding) | 0 + var buf = createBuffer(length) + + var actual = buf.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual) + } + + return buf +} + +function fromArrayLike (array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + var buf = createBuffer(length) + for (var i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf +} + +function fromArrayBuffer (array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds') + } + + var buf + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array) + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + + // Return an augmented `Uint8Array` instance + buf.__proto__ = Buffer.prototype + return buf +} + +function fromObject (obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + var buf = createBuffer(len) + + if (buf.length === 0) { + return buf + } + + obj.copy(buf, 0, 0, len) + return buf + } + + if (obj.length !== undefined) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } +} + +function checked (length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return b != null && b._isBuffer === true && + b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false +} + +Buffer.compare = function compare (a, b) { + if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) + if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' + ) + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (isInstance(buf, Uint8Array)) { + buf = Buffer.from(buf) + } + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + + 'Received type ' + typeof string + ) + } + + var len = string.length + var mustMatch = (arguments.length > 2 && arguments[2] === true) + if (!mustMatch && len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 + } + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) +// to detect a Buffer instance. It's not possible to use `instanceof Buffer` +// reliably in a browserify context because there could be multiple different +// copies of the 'buffer' package in use. This method works even for Buffer +// instances that were created from another copy of the `buffer` package. +// See: https://github.com/feross/buffer/issues/154 +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.toLocaleString = Buffer.prototype.toString + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() + if (this.length > max) str += ' ... ' + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (isInstance(target, Uint8Array)) { + target = Buffer.from(target, target.offset, target.byteLength) + } + if (!Buffer.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. ' + + 'Received type ' + (typeof target) + ) + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + var strLen = string.length + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset >>> 0 + if (isFinite(length)) { + length = length >>> 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf = this.subarray(start, end) + // Return an augmented `Uint8Array` instance + newBuf.__proto__ = Buffer.prototype + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('Index out of range') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + + if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { + // Use built-in when available, missing from IE11 + this.copyWithin(targetStart, start, end) + } else if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (var i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if ((encoding === 'utf8' && code < 128) || + encoding === 'latin1') { + // Fast path: If `val` fits into a single byte, use that numeric value. + val = code + } + } + } else if (typeof val === 'number') { + val = val & 255 + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : Buffer.from(val, encoding) + var len = bytes.length + if (len === 0) { + throw new TypeError('The value "' + val + + '" is invalid for argument "value"') + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node takes equal signs as end of the Base64 encoding + str = str.split('=')[0] + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass +// the `instanceof` check but they should be treated as of that type. +// See: https://github.com/feross/buffer/issues/166 +function isInstance (obj, type) { + return obj instanceof type || + (obj != null && obj.constructor != null && obj.constructor.name != null && + obj.constructor.name === type.name) +} +function numberIsNaN (obj) { + // For IE11 support + return obj !== obj // eslint-disable-line no-self-compare +} + +}).call(this)}).call(this,require("buffer").Buffer) + +},{"base64-js":7,"buffer":10,"ieee754":29}],11:[function(require,module,exports){ +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ +/* global define */ + +(function () { + 'use strict'; + + var hasOwn = {}.hasOwnProperty; + + function classNames() { + var classes = []; + + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + if (!arg) continue; + + var argType = typeof arg; + + if (argType === 'string' || argType === 'number') { + classes.push(arg); + } else if (Array.isArray(arg)) { + if (arg.length) { + var inner = classNames.apply(null, arg); + if (inner) { + classes.push(inner); + } + } + } else if (argType === 'object') { + if (arg.toString === Object.prototype.toString) { + for (var key in arg) { + if (hasOwn.call(arg, key) && arg[key]) { + classes.push(key); + } + } + } else { + classes.push(arg.toString()); + } + } + } + + return classes.join(' '); + } + + if (typeof module !== 'undefined' && module.exports) { + classNames.default = classNames; + module.exports = classNames; + } else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) { + // register as 'classnames', consistent with npm package name + define('classnames', [], function () { + return classNames; + }); + } else { + window.classNames = classNames; + } +}()); + +},{}],12:[function(require,module,exports){ +/** + * Slice reference. + */ + +var slice = [].slice; + +/** + * Bind `obj` to `fn`. + * + * @param {Object} obj + * @param {Function|String} fn or string + * @return {Function} + * @api public + */ + +module.exports = function(obj, fn){ + if ('string' == typeof fn) fn = obj[fn]; + if ('function' != typeof fn) throw new Error('bind() requires a function'); + var args = slice.call(arguments, 2); + return function(){ + return fn.apply(obj, args.concat(slice.call(arguments))); + } +}; + +},{}],13:[function(require,module,exports){ + +module.exports = function(a, b){ + var fn = function(){}; + fn.prototype = b.prototype; + a.prototype = new fn; + a.prototype.constructor = a; +}; +},{}],14:[function(require,module,exports){ +/*! + * Cropper.js v1.5.7 + * https://fengyuanchen.github.io/cropperjs + * + * Copyright 2015-present Chen Fengyuan + * Released under the MIT license + * + * Date: 2020-05-23T05:23:00.081Z + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Cropper = factory()); +}(this, (function () { 'use strict'; + + function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + } + + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + + return keys; + } + + function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; + } + + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + + function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); + } + + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; + } + + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined'; + var WINDOW = IS_BROWSER ? window : {}; + var IS_TOUCH_DEVICE = IS_BROWSER && WINDOW.document.documentElement ? 'ontouchstart' in WINDOW.document.documentElement : false; + var HAS_POINTER_EVENT = IS_BROWSER ? 'PointerEvent' in WINDOW : false; + var NAMESPACE = 'cropper'; // Actions + + var ACTION_ALL = 'all'; + var ACTION_CROP = 'crop'; + var ACTION_MOVE = 'move'; + var ACTION_ZOOM = 'zoom'; + var ACTION_EAST = 'e'; + var ACTION_WEST = 'w'; + var ACTION_SOUTH = 's'; + var ACTION_NORTH = 'n'; + var ACTION_NORTH_EAST = 'ne'; + var ACTION_NORTH_WEST = 'nw'; + var ACTION_SOUTH_EAST = 'se'; + var ACTION_SOUTH_WEST = 'sw'; // Classes + + var CLASS_CROP = "".concat(NAMESPACE, "-crop"); + var CLASS_DISABLED = "".concat(NAMESPACE, "-disabled"); + var CLASS_HIDDEN = "".concat(NAMESPACE, "-hidden"); + var CLASS_HIDE = "".concat(NAMESPACE, "-hide"); + var CLASS_INVISIBLE = "".concat(NAMESPACE, "-invisible"); + var CLASS_MODAL = "".concat(NAMESPACE, "-modal"); + var CLASS_MOVE = "".concat(NAMESPACE, "-move"); // Data keys + + var DATA_ACTION = "".concat(NAMESPACE, "Action"); + var DATA_PREVIEW = "".concat(NAMESPACE, "Preview"); // Drag modes + + var DRAG_MODE_CROP = 'crop'; + var DRAG_MODE_MOVE = 'move'; + var DRAG_MODE_NONE = 'none'; // Events + + var EVENT_CROP = 'crop'; + var EVENT_CROP_END = 'cropend'; + var EVENT_CROP_MOVE = 'cropmove'; + var EVENT_CROP_START = 'cropstart'; + var EVENT_DBLCLICK = 'dblclick'; + var EVENT_TOUCH_START = IS_TOUCH_DEVICE ? 'touchstart' : 'mousedown'; + var EVENT_TOUCH_MOVE = IS_TOUCH_DEVICE ? 'touchmove' : 'mousemove'; + var EVENT_TOUCH_END = IS_TOUCH_DEVICE ? 'touchend touchcancel' : 'mouseup'; + var EVENT_POINTER_DOWN = HAS_POINTER_EVENT ? 'pointerdown' : EVENT_TOUCH_START; + var EVENT_POINTER_MOVE = HAS_POINTER_EVENT ? 'pointermove' : EVENT_TOUCH_MOVE; + var EVENT_POINTER_UP = HAS_POINTER_EVENT ? 'pointerup pointercancel' : EVENT_TOUCH_END; + var EVENT_READY = 'ready'; + var EVENT_RESIZE = 'resize'; + var EVENT_WHEEL = 'wheel'; + var EVENT_ZOOM = 'zoom'; // Mime types + + var MIME_TYPE_JPEG = 'image/jpeg'; // RegExps + + var REGEXP_ACTIONS = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/; + var REGEXP_DATA_URL = /^data:/; + var REGEXP_DATA_URL_JPEG = /^data:image\/jpeg;base64,/; + var REGEXP_TAG_NAME = /^img|canvas$/i; // Misc + + var DEFAULTS = { + // Define the view mode of the cropper + viewMode: 0, + // 0, 1, 2, 3 + // Define the dragging mode of the cropper + dragMode: DRAG_MODE_CROP, + // 'crop', 'move' or 'none' + // Define the initial aspect ratio of the crop box + initialAspectRatio: NaN, + // Define the aspect ratio of the crop box + aspectRatio: NaN, + // An object with the previous cropping result data + data: null, + // A selector for adding extra containers to preview + preview: '', + // Re-render the cropper when resize the window + responsive: true, + // Restore the cropped area after resize the window + restore: true, + // Check if the current image is a cross-origin image + checkCrossOrigin: true, + // Check the current image's Exif Orientation information + checkOrientation: true, + // Show the black modal + modal: true, + // Show the dashed lines for guiding + guides: true, + // Show the center indicator for guiding + center: true, + // Show the white modal to highlight the crop box + highlight: true, + // Show the grid background + background: true, + // Enable to crop the image automatically when initialize + autoCrop: true, + // Define the percentage of automatic cropping area when initializes + autoCropArea: 0.8, + // Enable to move the image + movable: true, + // Enable to rotate the image + rotatable: true, + // Enable to scale the image + scalable: true, + // Enable to zoom the image + zoomable: true, + // Enable to zoom the image by dragging touch + zoomOnTouch: true, + // Enable to zoom the image by wheeling mouse + zoomOnWheel: true, + // Define zoom ratio when zoom the image by wheeling mouse + wheelZoomRatio: 0.1, + // Enable to move the crop box + cropBoxMovable: true, + // Enable to resize the crop box + cropBoxResizable: true, + // Toggle drag mode between "crop" and "move" when click twice on the cropper + toggleDragModeOnDblclick: true, + // Size limitation + minCanvasWidth: 0, + minCanvasHeight: 0, + minCropBoxWidth: 0, + minCropBoxHeight: 0, + minContainerWidth: 200, + minContainerHeight: 100, + // Shortcuts of events + ready: null, + cropstart: null, + cropmove: null, + cropend: null, + crop: null, + zoom: null + }; + + var TEMPLATE = '
          ' + '
          ' + '
          ' + '
          ' + '
          ' + '
          ' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '
          ' + '
          '; + + /** + * Check if the given value is not a number. + */ + + var isNaN = Number.isNaN || WINDOW.isNaN; + /** + * Check if the given value is a number. + * @param {*} value - The value to check. + * @returns {boolean} Returns `true` if the given value is a number, else `false`. + */ + + function isNumber(value) { + return typeof value === 'number' && !isNaN(value); + } + /** + * Check if the given value is a positive number. + * @param {*} value - The value to check. + * @returns {boolean} Returns `true` if the given value is a positive number, else `false`. + */ + + var isPositiveNumber = function isPositiveNumber(value) { + return value > 0 && value < Infinity; + }; + /** + * Check if the given value is undefined. + * @param {*} value - The value to check. + * @returns {boolean} Returns `true` if the given value is undefined, else `false`. + */ + + function isUndefined(value) { + return typeof value === 'undefined'; + } + /** + * Check if the given value is an object. + * @param {*} value - The value to check. + * @returns {boolean} Returns `true` if the given value is an object, else `false`. + */ + + function isObject(value) { + return _typeof(value) === 'object' && value !== null; + } + var hasOwnProperty = Object.prototype.hasOwnProperty; + /** + * Check if the given value is a plain object. + * @param {*} value - The value to check. + * @returns {boolean} Returns `true` if the given value is a plain object, else `false`. + */ + + function isPlainObject(value) { + if (!isObject(value)) { + return false; + } + + try { + var _constructor = value.constructor; + var prototype = _constructor.prototype; + return _constructor && prototype && hasOwnProperty.call(prototype, 'isPrototypeOf'); + } catch (error) { + return false; + } + } + /** + * Check if the given value is a function. + * @param {*} value - The value to check. + * @returns {boolean} Returns `true` if the given value is a function, else `false`. + */ + + function isFunction(value) { + return typeof value === 'function'; + } + var slice = Array.prototype.slice; + /** + * Convert array-like or iterable object to an array. + * @param {*} value - The value to convert. + * @returns {Array} Returns a new array. + */ + + function toArray(value) { + return Array.from ? Array.from(value) : slice.call(value); + } + /** + * Iterate the given data. + * @param {*} data - The data to iterate. + * @param {Function} callback - The process function for each element. + * @returns {*} The original data. + */ + + function forEach(data, callback) { + if (data && isFunction(callback)) { + if (Array.isArray(data) || isNumber(data.length) + /* array-like */ + ) { + toArray(data).forEach(function (value, key) { + callback.call(data, value, key, data); + }); + } else if (isObject(data)) { + Object.keys(data).forEach(function (key) { + callback.call(data, data[key], key, data); + }); + } + } + + return data; + } + /** + * Extend the given object. + * @param {*} target - The target object to extend. + * @param {*} args - The rest objects for merging to the target object. + * @returns {Object} The extended object. + */ + + var assign = Object.assign || function assign(target) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + if (isObject(target) && args.length > 0) { + args.forEach(function (arg) { + if (isObject(arg)) { + Object.keys(arg).forEach(function (key) { + target[key] = arg[key]; + }); + } + }); + } + + return target; + }; + var REGEXP_DECIMALS = /\.\d*(?:0|9){12}\d*$/; + /** + * Normalize decimal number. + * Check out {@link https://0.30000000000000004.com/} + * @param {number} value - The value to normalize. + * @param {number} [times=100000000000] - The times for normalizing. + * @returns {number} Returns the normalized number. + */ + + function normalizeDecimalNumber(value) { + var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100000000000; + return REGEXP_DECIMALS.test(value) ? Math.round(value * times) / times : value; + } + var REGEXP_SUFFIX = /^width|height|left|top|marginLeft|marginTop$/; + /** + * Apply styles to the given element. + * @param {Element} element - The target element. + * @param {Object} styles - The styles for applying. + */ + + function setStyle(element, styles) { + var style = element.style; + forEach(styles, function (value, property) { + if (REGEXP_SUFFIX.test(property) && isNumber(value)) { + value = "".concat(value, "px"); + } + + style[property] = value; + }); + } + /** + * Check if the given element has a special class. + * @param {Element} element - The element to check. + * @param {string} value - The class to search. + * @returns {boolean} Returns `true` if the special class was found. + */ + + function hasClass(element, value) { + return element.classList ? element.classList.contains(value) : element.className.indexOf(value) > -1; + } + /** + * Add classes to the given element. + * @param {Element} element - The target element. + * @param {string} value - The classes to be added. + */ + + function addClass(element, value) { + if (!value) { + return; + } + + if (isNumber(element.length)) { + forEach(element, function (elem) { + addClass(elem, value); + }); + return; + } + + if (element.classList) { + element.classList.add(value); + return; + } + + var className = element.className.trim(); + + if (!className) { + element.className = value; + } else if (className.indexOf(value) < 0) { + element.className = "".concat(className, " ").concat(value); + } + } + /** + * Remove classes from the given element. + * @param {Element} element - The target element. + * @param {string} value - The classes to be removed. + */ + + function removeClass(element, value) { + if (!value) { + return; + } + + if (isNumber(element.length)) { + forEach(element, function (elem) { + removeClass(elem, value); + }); + return; + } + + if (element.classList) { + element.classList.remove(value); + return; + } + + if (element.className.indexOf(value) >= 0) { + element.className = element.className.replace(value, ''); + } + } + /** + * Add or remove classes from the given element. + * @param {Element} element - The target element. + * @param {string} value - The classes to be toggled. + * @param {boolean} added - Add only. + */ + + function toggleClass(element, value, added) { + if (!value) { + return; + } + + if (isNumber(element.length)) { + forEach(element, function (elem) { + toggleClass(elem, value, added); + }); + return; + } // IE10-11 doesn't support the second parameter of `classList.toggle` + + + if (added) { + addClass(element, value); + } else { + removeClass(element, value); + } + } + var REGEXP_CAMEL_CASE = /([a-z\d])([A-Z])/g; + /** + * Transform the given string from camelCase to kebab-case + * @param {string} value - The value to transform. + * @returns {string} The transformed value. + */ + + function toParamCase(value) { + return value.replace(REGEXP_CAMEL_CASE, '$1-$2').toLowerCase(); + } + /** + * Get data from the given element. + * @param {Element} element - The target element. + * @param {string} name - The data key to get. + * @returns {string} The data value. + */ + + function getData(element, name) { + if (isObject(element[name])) { + return element[name]; + } + + if (element.dataset) { + return element.dataset[name]; + } + + return element.getAttribute("data-".concat(toParamCase(name))); + } + /** + * Set data to the given element. + * @param {Element} element - The target element. + * @param {string} name - The data key to set. + * @param {string} data - The data value. + */ + + function setData(element, name, data) { + if (isObject(data)) { + element[name] = data; + } else if (element.dataset) { + element.dataset[name] = data; + } else { + element.setAttribute("data-".concat(toParamCase(name)), data); + } + } + /** + * Remove data from the given element. + * @param {Element} element - The target element. + * @param {string} name - The data key to remove. + */ + + function removeData(element, name) { + if (isObject(element[name])) { + try { + delete element[name]; + } catch (error) { + element[name] = undefined; + } + } else if (element.dataset) { + // #128 Safari not allows to delete dataset property + try { + delete element.dataset[name]; + } catch (error) { + element.dataset[name] = undefined; + } + } else { + element.removeAttribute("data-".concat(toParamCase(name))); + } + } + var REGEXP_SPACES = /\s\s*/; + + var onceSupported = function () { + var supported = false; + + if (IS_BROWSER) { + var once = false; + + var listener = function listener() {}; + + var options = Object.defineProperty({}, 'once', { + get: function get() { + supported = true; + return once; + }, + + /** + * This setter can fix a `TypeError` in strict mode + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only} + * @param {boolean} value - The value to set + */ + set: function set(value) { + once = value; + } + }); + WINDOW.addEventListener('test', listener, options); + WINDOW.removeEventListener('test', listener, options); + } + + return supported; + }(); + /** + * Remove event listener from the target element. + * @param {Element} element - The event target. + * @param {string} type - The event type(s). + * @param {Function} listener - The event listener. + * @param {Object} options - The event options. + */ + + + function removeListener(element, type, listener) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var handler = listener; + type.trim().split(REGEXP_SPACES).forEach(function (event) { + if (!onceSupported) { + var listeners = element.listeners; + + if (listeners && listeners[event] && listeners[event][listener]) { + handler = listeners[event][listener]; + delete listeners[event][listener]; + + if (Object.keys(listeners[event]).length === 0) { + delete listeners[event]; + } + + if (Object.keys(listeners).length === 0) { + delete element.listeners; + } + } + } + + element.removeEventListener(event, handler, options); + }); + } + /** + * Add event listener to the target element. + * @param {Element} element - The event target. + * @param {string} type - The event type(s). + * @param {Function} listener - The event listener. + * @param {Object} options - The event options. + */ + + function addListener(element, type, listener) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var _handler = listener; + type.trim().split(REGEXP_SPACES).forEach(function (event) { + if (options.once && !onceSupported) { + var _element$listeners = element.listeners, + listeners = _element$listeners === void 0 ? {} : _element$listeners; + + _handler = function handler() { + delete listeners[event][listener]; + element.removeEventListener(event, _handler, options); + + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + listener.apply(element, args); + }; + + if (!listeners[event]) { + listeners[event] = {}; + } + + if (listeners[event][listener]) { + element.removeEventListener(event, listeners[event][listener], options); + } + + listeners[event][listener] = _handler; + element.listeners = listeners; + } + + element.addEventListener(event, _handler, options); + }); + } + /** + * Dispatch event on the target element. + * @param {Element} element - The event target. + * @param {string} type - The event type(s). + * @param {Object} data - The additional event data. + * @returns {boolean} Indicate if the event is default prevented or not. + */ + + function dispatchEvent(element, type, data) { + var event; // Event and CustomEvent on IE9-11 are global objects, not constructors + + if (isFunction(Event) && isFunction(CustomEvent)) { + event = new CustomEvent(type, { + detail: data, + bubbles: true, + cancelable: true + }); + } else { + event = document.createEvent('CustomEvent'); + event.initCustomEvent(type, true, true, data); + } + + return element.dispatchEvent(event); + } + /** + * Get the offset base on the document. + * @param {Element} element - The target element. + * @returns {Object} The offset data. + */ + + function getOffset(element) { + var box = element.getBoundingClientRect(); + return { + left: box.left + (window.pageXOffset - document.documentElement.clientLeft), + top: box.top + (window.pageYOffset - document.documentElement.clientTop) + }; + } + var location = WINDOW.location; + var REGEXP_ORIGINS = /^(\w+:)\/\/([^:/?#]*):?(\d*)/i; + /** + * Check if the given URL is a cross origin URL. + * @param {string} url - The target URL. + * @returns {boolean} Returns `true` if the given URL is a cross origin URL, else `false`. + */ + + function isCrossOriginURL(url) { + var parts = url.match(REGEXP_ORIGINS); + return parts !== null && (parts[1] !== location.protocol || parts[2] !== location.hostname || parts[3] !== location.port); + } + /** + * Add timestamp to the given URL. + * @param {string} url - The target URL. + * @returns {string} The result URL. + */ + + function addTimestamp(url) { + var timestamp = "timestamp=".concat(new Date().getTime()); + return url + (url.indexOf('?') === -1 ? '?' : '&') + timestamp; + } + /** + * Get transforms base on the given object. + * @param {Object} obj - The target object. + * @returns {string} A string contains transform values. + */ + + function getTransforms(_ref) { + var rotate = _ref.rotate, + scaleX = _ref.scaleX, + scaleY = _ref.scaleY, + translateX = _ref.translateX, + translateY = _ref.translateY; + var values = []; + + if (isNumber(translateX) && translateX !== 0) { + values.push("translateX(".concat(translateX, "px)")); + } + + if (isNumber(translateY) && translateY !== 0) { + values.push("translateY(".concat(translateY, "px)")); + } // Rotate should come first before scale to match orientation transform + + + if (isNumber(rotate) && rotate !== 0) { + values.push("rotate(".concat(rotate, "deg)")); + } + + if (isNumber(scaleX) && scaleX !== 1) { + values.push("scaleX(".concat(scaleX, ")")); + } + + if (isNumber(scaleY) && scaleY !== 1) { + values.push("scaleY(".concat(scaleY, ")")); + } + + var transform = values.length ? values.join(' ') : 'none'; + return { + WebkitTransform: transform, + msTransform: transform, + transform: transform + }; + } + /** + * Get the max ratio of a group of pointers. + * @param {string} pointers - The target pointers. + * @returns {number} The result ratio. + */ + + function getMaxZoomRatio(pointers) { + var pointers2 = _objectSpread2({}, pointers); + + var ratios = []; + forEach(pointers, function (pointer, pointerId) { + delete pointers2[pointerId]; + forEach(pointers2, function (pointer2) { + var x1 = Math.abs(pointer.startX - pointer2.startX); + var y1 = Math.abs(pointer.startY - pointer2.startY); + var x2 = Math.abs(pointer.endX - pointer2.endX); + var y2 = Math.abs(pointer.endY - pointer2.endY); + var z1 = Math.sqrt(x1 * x1 + y1 * y1); + var z2 = Math.sqrt(x2 * x2 + y2 * y2); + var ratio = (z2 - z1) / z1; + ratios.push(ratio); + }); + }); + ratios.sort(function (a, b) { + return Math.abs(a) < Math.abs(b); + }); + return ratios[0]; + } + /** + * Get a pointer from an event object. + * @param {Object} event - The target event object. + * @param {boolean} endOnly - Indicates if only returns the end point coordinate or not. + * @returns {Object} The result pointer contains start and/or end point coordinates. + */ + + function getPointer(_ref2, endOnly) { + var pageX = _ref2.pageX, + pageY = _ref2.pageY; + var end = { + endX: pageX, + endY: pageY + }; + return endOnly ? end : _objectSpread2({ + startX: pageX, + startY: pageY + }, end); + } + /** + * Get the center point coordinate of a group of pointers. + * @param {Object} pointers - The target pointers. + * @returns {Object} The center point coordinate. + */ + + function getPointersCenter(pointers) { + var pageX = 0; + var pageY = 0; + var count = 0; + forEach(pointers, function (_ref3) { + var startX = _ref3.startX, + startY = _ref3.startY; + pageX += startX; + pageY += startY; + count += 1; + }); + pageX /= count; + pageY /= count; + return { + pageX: pageX, + pageY: pageY + }; + } + /** + * Get the max sizes in a rectangle under the given aspect ratio. + * @param {Object} data - The original sizes. + * @param {string} [type='contain'] - The adjust type. + * @returns {Object} The result sizes. + */ + + function getAdjustedSizes(_ref4) // or 'cover' + { + var aspectRatio = _ref4.aspectRatio, + height = _ref4.height, + width = _ref4.width; + var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'contain'; + var isValidWidth = isPositiveNumber(width); + var isValidHeight = isPositiveNumber(height); + + if (isValidWidth && isValidHeight) { + var adjustedWidth = height * aspectRatio; + + if (type === 'contain' && adjustedWidth > width || type === 'cover' && adjustedWidth < width) { + height = width / aspectRatio; + } else { + width = height * aspectRatio; + } + } else if (isValidWidth) { + height = width / aspectRatio; + } else if (isValidHeight) { + width = height * aspectRatio; + } + + return { + width: width, + height: height + }; + } + /** + * Get the new sizes of a rectangle after rotated. + * @param {Object} data - The original sizes. + * @returns {Object} The result sizes. + */ + + function getRotatedSizes(_ref5) { + var width = _ref5.width, + height = _ref5.height, + degree = _ref5.degree; + degree = Math.abs(degree) % 180; + + if (degree === 90) { + return { + width: height, + height: width + }; + } + + var arc = degree % 90 * Math.PI / 180; + var sinArc = Math.sin(arc); + var cosArc = Math.cos(arc); + var newWidth = width * cosArc + height * sinArc; + var newHeight = width * sinArc + height * cosArc; + return degree > 90 ? { + width: newHeight, + height: newWidth + } : { + width: newWidth, + height: newHeight + }; + } + /** + * Get a canvas which drew the given image. + * @param {HTMLImageElement} image - The image for drawing. + * @param {Object} imageData - The image data. + * @param {Object} canvasData - The canvas data. + * @param {Object} options - The options. + * @returns {HTMLCanvasElement} The result canvas. + */ + + function getSourceCanvas(image, _ref6, _ref7, _ref8) { + var imageAspectRatio = _ref6.aspectRatio, + imageNaturalWidth = _ref6.naturalWidth, + imageNaturalHeight = _ref6.naturalHeight, + _ref6$rotate = _ref6.rotate, + rotate = _ref6$rotate === void 0 ? 0 : _ref6$rotate, + _ref6$scaleX = _ref6.scaleX, + scaleX = _ref6$scaleX === void 0 ? 1 : _ref6$scaleX, + _ref6$scaleY = _ref6.scaleY, + scaleY = _ref6$scaleY === void 0 ? 1 : _ref6$scaleY; + var aspectRatio = _ref7.aspectRatio, + naturalWidth = _ref7.naturalWidth, + naturalHeight = _ref7.naturalHeight; + var _ref8$fillColor = _ref8.fillColor, + fillColor = _ref8$fillColor === void 0 ? 'transparent' : _ref8$fillColor, + _ref8$imageSmoothingE = _ref8.imageSmoothingEnabled, + imageSmoothingEnabled = _ref8$imageSmoothingE === void 0 ? true : _ref8$imageSmoothingE, + _ref8$imageSmoothingQ = _ref8.imageSmoothingQuality, + imageSmoothingQuality = _ref8$imageSmoothingQ === void 0 ? 'low' : _ref8$imageSmoothingQ, + _ref8$maxWidth = _ref8.maxWidth, + maxWidth = _ref8$maxWidth === void 0 ? Infinity : _ref8$maxWidth, + _ref8$maxHeight = _ref8.maxHeight, + maxHeight = _ref8$maxHeight === void 0 ? Infinity : _ref8$maxHeight, + _ref8$minWidth = _ref8.minWidth, + minWidth = _ref8$minWidth === void 0 ? 0 : _ref8$minWidth, + _ref8$minHeight = _ref8.minHeight, + minHeight = _ref8$minHeight === void 0 ? 0 : _ref8$minHeight; + var canvas = document.createElement('canvas'); + var context = canvas.getContext('2d'); + var maxSizes = getAdjustedSizes({ + aspectRatio: aspectRatio, + width: maxWidth, + height: maxHeight + }); + var minSizes = getAdjustedSizes({ + aspectRatio: aspectRatio, + width: minWidth, + height: minHeight + }, 'cover'); + var width = Math.min(maxSizes.width, Math.max(minSizes.width, naturalWidth)); + var height = Math.min(maxSizes.height, Math.max(minSizes.height, naturalHeight)); // Note: should always use image's natural sizes for drawing as + // imageData.naturalWidth === canvasData.naturalHeight when rotate % 180 === 90 + + var destMaxSizes = getAdjustedSizes({ + aspectRatio: imageAspectRatio, + width: maxWidth, + height: maxHeight + }); + var destMinSizes = getAdjustedSizes({ + aspectRatio: imageAspectRatio, + width: minWidth, + height: minHeight + }, 'cover'); + var destWidth = Math.min(destMaxSizes.width, Math.max(destMinSizes.width, imageNaturalWidth)); + var destHeight = Math.min(destMaxSizes.height, Math.max(destMinSizes.height, imageNaturalHeight)); + var params = [-destWidth / 2, -destHeight / 2, destWidth, destHeight]; + canvas.width = normalizeDecimalNumber(width); + canvas.height = normalizeDecimalNumber(height); + context.fillStyle = fillColor; + context.fillRect(0, 0, width, height); + context.save(); + context.translate(width / 2, height / 2); + context.rotate(rotate * Math.PI / 180); + context.scale(scaleX, scaleY); + context.imageSmoothingEnabled = imageSmoothingEnabled; + context.imageSmoothingQuality = imageSmoothingQuality; + context.drawImage.apply(context, [image].concat(_toConsumableArray(params.map(function (param) { + return Math.floor(normalizeDecimalNumber(param)); + })))); + context.restore(); + return canvas; + } + var fromCharCode = String.fromCharCode; + /** + * Get string from char code in data view. + * @param {DataView} dataView - The data view for read. + * @param {number} start - The start index. + * @param {number} length - The read length. + * @returns {string} The read result. + */ + + function getStringFromCharCode(dataView, start, length) { + var str = ''; + length += start; + + for (var i = start; i < length; i += 1) { + str += fromCharCode(dataView.getUint8(i)); + } + + return str; + } + var REGEXP_DATA_URL_HEAD = /^data:.*,/; + /** + * Transform Data URL to array buffer. + * @param {string} dataURL - The Data URL to transform. + * @returns {ArrayBuffer} The result array buffer. + */ + + function dataURLToArrayBuffer(dataURL) { + var base64 = dataURL.replace(REGEXP_DATA_URL_HEAD, ''); + var binary = atob(base64); + var arrayBuffer = new ArrayBuffer(binary.length); + var uint8 = new Uint8Array(arrayBuffer); + forEach(uint8, function (value, i) { + uint8[i] = binary.charCodeAt(i); + }); + return arrayBuffer; + } + /** + * Transform array buffer to Data URL. + * @param {ArrayBuffer} arrayBuffer - The array buffer to transform. + * @param {string} mimeType - The mime type of the Data URL. + * @returns {string} The result Data URL. + */ + + function arrayBufferToDataURL(arrayBuffer, mimeType) { + var chunks = []; // Chunk Typed Array for better performance (#435) + + var chunkSize = 8192; + var uint8 = new Uint8Array(arrayBuffer); + + while (uint8.length > 0) { + // XXX: Babel's `toConsumableArray` helper will throw error in IE or Safari 9 + // eslint-disable-next-line prefer-spread + chunks.push(fromCharCode.apply(null, toArray(uint8.subarray(0, chunkSize)))); + uint8 = uint8.subarray(chunkSize); + } + + return "data:".concat(mimeType, ";base64,").concat(btoa(chunks.join(''))); + } + /** + * Get orientation value from given array buffer. + * @param {ArrayBuffer} arrayBuffer - The array buffer to read. + * @returns {number} The read orientation value. + */ + + function resetAndGetOrientation(arrayBuffer) { + var dataView = new DataView(arrayBuffer); + var orientation; // Ignores range error when the image does not have correct Exif information + + try { + var littleEndian; + var app1Start; + var ifdStart; // Only handle JPEG image (start by 0xFFD8) + + if (dataView.getUint8(0) === 0xFF && dataView.getUint8(1) === 0xD8) { + var length = dataView.byteLength; + var offset = 2; + + while (offset + 1 < length) { + if (dataView.getUint8(offset) === 0xFF && dataView.getUint8(offset + 1) === 0xE1) { + app1Start = offset; + break; + } + + offset += 1; + } + } + + if (app1Start) { + var exifIDCode = app1Start + 4; + var tiffOffset = app1Start + 10; + + if (getStringFromCharCode(dataView, exifIDCode, 4) === 'Exif') { + var endianness = dataView.getUint16(tiffOffset); + littleEndian = endianness === 0x4949; + + if (littleEndian || endianness === 0x4D4D + /* bigEndian */ + ) { + if (dataView.getUint16(tiffOffset + 2, littleEndian) === 0x002A) { + var firstIFDOffset = dataView.getUint32(tiffOffset + 4, littleEndian); + + if (firstIFDOffset >= 0x00000008) { + ifdStart = tiffOffset + firstIFDOffset; + } + } + } + } + } + + if (ifdStart) { + var _length = dataView.getUint16(ifdStart, littleEndian); + + var _offset; + + var i; + + for (i = 0; i < _length; i += 1) { + _offset = ifdStart + i * 12 + 2; + + if (dataView.getUint16(_offset, littleEndian) === 0x0112 + /* Orientation */ + ) { + // 8 is the offset of the current tag's value + _offset += 8; // Get the original orientation value + + orientation = dataView.getUint16(_offset, littleEndian); // Override the orientation with its default value + + dataView.setUint16(_offset, 1, littleEndian); + break; + } + } + } + } catch (error) { + orientation = 1; + } + + return orientation; + } + /** + * Parse Exif Orientation value. + * @param {number} orientation - The orientation to parse. + * @returns {Object} The parsed result. + */ + + function parseOrientation(orientation) { + var rotate = 0; + var scaleX = 1; + var scaleY = 1; + + switch (orientation) { + // Flip horizontal + case 2: + scaleX = -1; + break; + // Rotate left 180° + + case 3: + rotate = -180; + break; + // Flip vertical + + case 4: + scaleY = -1; + break; + // Flip vertical and rotate right 90° + + case 5: + rotate = 90; + scaleY = -1; + break; + // Rotate right 90° + + case 6: + rotate = 90; + break; + // Flip horizontal and rotate right 90° + + case 7: + rotate = 90; + scaleX = -1; + break; + // Rotate left 90° + + case 8: + rotate = -90; + break; + } + + return { + rotate: rotate, + scaleX: scaleX, + scaleY: scaleY + }; + } + + var render = { + render: function render() { + this.initContainer(); + this.initCanvas(); + this.initCropBox(); + this.renderCanvas(); + + if (this.cropped) { + this.renderCropBox(); + } + }, + initContainer: function initContainer() { + var element = this.element, + options = this.options, + container = this.container, + cropper = this.cropper; + addClass(cropper, CLASS_HIDDEN); + removeClass(element, CLASS_HIDDEN); + var containerData = { + width: Math.max(container.offsetWidth, Number(options.minContainerWidth) || 200), + height: Math.max(container.offsetHeight, Number(options.minContainerHeight) || 100) + }; + this.containerData = containerData; + setStyle(cropper, { + width: containerData.width, + height: containerData.height + }); + addClass(element, CLASS_HIDDEN); + removeClass(cropper, CLASS_HIDDEN); + }, + // Canvas (image wrapper) + initCanvas: function initCanvas() { + var containerData = this.containerData, + imageData = this.imageData; + var viewMode = this.options.viewMode; + var rotated = Math.abs(imageData.rotate) % 180 === 90; + var naturalWidth = rotated ? imageData.naturalHeight : imageData.naturalWidth; + var naturalHeight = rotated ? imageData.naturalWidth : imageData.naturalHeight; + var aspectRatio = naturalWidth / naturalHeight; + var canvasWidth = containerData.width; + var canvasHeight = containerData.height; + + if (containerData.height * aspectRatio > containerData.width) { + if (viewMode === 3) { + canvasWidth = containerData.height * aspectRatio; + } else { + canvasHeight = containerData.width / aspectRatio; + } + } else if (viewMode === 3) { + canvasHeight = containerData.width / aspectRatio; + } else { + canvasWidth = containerData.height * aspectRatio; + } + + var canvasData = { + aspectRatio: aspectRatio, + naturalWidth: naturalWidth, + naturalHeight: naturalHeight, + width: canvasWidth, + height: canvasHeight + }; + canvasData.left = (containerData.width - canvasWidth) / 2; + canvasData.top = (containerData.height - canvasHeight) / 2; + canvasData.oldLeft = canvasData.left; + canvasData.oldTop = canvasData.top; + this.canvasData = canvasData; + this.limited = viewMode === 1 || viewMode === 2; + this.limitCanvas(true, true); + this.initialImageData = assign({}, imageData); + this.initialCanvasData = assign({}, canvasData); + }, + limitCanvas: function limitCanvas(sizeLimited, positionLimited) { + var options = this.options, + containerData = this.containerData, + canvasData = this.canvasData, + cropBoxData = this.cropBoxData; + var viewMode = options.viewMode; + var aspectRatio = canvasData.aspectRatio; + var cropped = this.cropped && cropBoxData; + + if (sizeLimited) { + var minCanvasWidth = Number(options.minCanvasWidth) || 0; + var minCanvasHeight = Number(options.minCanvasHeight) || 0; + + if (viewMode > 1) { + minCanvasWidth = Math.max(minCanvasWidth, containerData.width); + minCanvasHeight = Math.max(minCanvasHeight, containerData.height); + + if (viewMode === 3) { + if (minCanvasHeight * aspectRatio > minCanvasWidth) { + minCanvasWidth = minCanvasHeight * aspectRatio; + } else { + minCanvasHeight = minCanvasWidth / aspectRatio; + } + } + } else if (viewMode > 0) { + if (minCanvasWidth) { + minCanvasWidth = Math.max(minCanvasWidth, cropped ? cropBoxData.width : 0); + } else if (minCanvasHeight) { + minCanvasHeight = Math.max(minCanvasHeight, cropped ? cropBoxData.height : 0); + } else if (cropped) { + minCanvasWidth = cropBoxData.width; + minCanvasHeight = cropBoxData.height; + + if (minCanvasHeight * aspectRatio > minCanvasWidth) { + minCanvasWidth = minCanvasHeight * aspectRatio; + } else { + minCanvasHeight = minCanvasWidth / aspectRatio; + } + } + } + + var _getAdjustedSizes = getAdjustedSizes({ + aspectRatio: aspectRatio, + width: minCanvasWidth, + height: minCanvasHeight + }); + + minCanvasWidth = _getAdjustedSizes.width; + minCanvasHeight = _getAdjustedSizes.height; + canvasData.minWidth = minCanvasWidth; + canvasData.minHeight = minCanvasHeight; + canvasData.maxWidth = Infinity; + canvasData.maxHeight = Infinity; + } + + if (positionLimited) { + if (viewMode > (cropped ? 0 : 1)) { + var newCanvasLeft = containerData.width - canvasData.width; + var newCanvasTop = containerData.height - canvasData.height; + canvasData.minLeft = Math.min(0, newCanvasLeft); + canvasData.minTop = Math.min(0, newCanvasTop); + canvasData.maxLeft = Math.max(0, newCanvasLeft); + canvasData.maxTop = Math.max(0, newCanvasTop); + + if (cropped && this.limited) { + canvasData.minLeft = Math.min(cropBoxData.left, cropBoxData.left + (cropBoxData.width - canvasData.width)); + canvasData.minTop = Math.min(cropBoxData.top, cropBoxData.top + (cropBoxData.height - canvasData.height)); + canvasData.maxLeft = cropBoxData.left; + canvasData.maxTop = cropBoxData.top; + + if (viewMode === 2) { + if (canvasData.width >= containerData.width) { + canvasData.minLeft = Math.min(0, newCanvasLeft); + canvasData.maxLeft = Math.max(0, newCanvasLeft); + } + + if (canvasData.height >= containerData.height) { + canvasData.minTop = Math.min(0, newCanvasTop); + canvasData.maxTop = Math.max(0, newCanvasTop); + } + } + } + } else { + canvasData.minLeft = -canvasData.width; + canvasData.minTop = -canvasData.height; + canvasData.maxLeft = containerData.width; + canvasData.maxTop = containerData.height; + } + } + }, + renderCanvas: function renderCanvas(changed, transformed) { + var canvasData = this.canvasData, + imageData = this.imageData; + + if (transformed) { + var _getRotatedSizes = getRotatedSizes({ + width: imageData.naturalWidth * Math.abs(imageData.scaleX || 1), + height: imageData.naturalHeight * Math.abs(imageData.scaleY || 1), + degree: imageData.rotate || 0 + }), + naturalWidth = _getRotatedSizes.width, + naturalHeight = _getRotatedSizes.height; + + var width = canvasData.width * (naturalWidth / canvasData.naturalWidth); + var height = canvasData.height * (naturalHeight / canvasData.naturalHeight); + canvasData.left -= (width - canvasData.width) / 2; + canvasData.top -= (height - canvasData.height) / 2; + canvasData.width = width; + canvasData.height = height; + canvasData.aspectRatio = naturalWidth / naturalHeight; + canvasData.naturalWidth = naturalWidth; + canvasData.naturalHeight = naturalHeight; + this.limitCanvas(true, false); + } + + if (canvasData.width > canvasData.maxWidth || canvasData.width < canvasData.minWidth) { + canvasData.left = canvasData.oldLeft; + } + + if (canvasData.height > canvasData.maxHeight || canvasData.height < canvasData.minHeight) { + canvasData.top = canvasData.oldTop; + } + + canvasData.width = Math.min(Math.max(canvasData.width, canvasData.minWidth), canvasData.maxWidth); + canvasData.height = Math.min(Math.max(canvasData.height, canvasData.minHeight), canvasData.maxHeight); + this.limitCanvas(false, true); + canvasData.left = Math.min(Math.max(canvasData.left, canvasData.minLeft), canvasData.maxLeft); + canvasData.top = Math.min(Math.max(canvasData.top, canvasData.minTop), canvasData.maxTop); + canvasData.oldLeft = canvasData.left; + canvasData.oldTop = canvasData.top; + setStyle(this.canvas, assign({ + width: canvasData.width, + height: canvasData.height + }, getTransforms({ + translateX: canvasData.left, + translateY: canvasData.top + }))); + this.renderImage(changed); + + if (this.cropped && this.limited) { + this.limitCropBox(true, true); + } + }, + renderImage: function renderImage(changed) { + var canvasData = this.canvasData, + imageData = this.imageData; + var width = imageData.naturalWidth * (canvasData.width / canvasData.naturalWidth); + var height = imageData.naturalHeight * (canvasData.height / canvasData.naturalHeight); + assign(imageData, { + width: width, + height: height, + left: (canvasData.width - width) / 2, + top: (canvasData.height - height) / 2 + }); + setStyle(this.image, assign({ + width: imageData.width, + height: imageData.height + }, getTransforms(assign({ + translateX: imageData.left, + translateY: imageData.top + }, imageData)))); + + if (changed) { + this.output(); + } + }, + initCropBox: function initCropBox() { + var options = this.options, + canvasData = this.canvasData; + var aspectRatio = options.aspectRatio || options.initialAspectRatio; + var autoCropArea = Number(options.autoCropArea) || 0.8; + var cropBoxData = { + width: canvasData.width, + height: canvasData.height + }; + + if (aspectRatio) { + if (canvasData.height * aspectRatio > canvasData.width) { + cropBoxData.height = cropBoxData.width / aspectRatio; + } else { + cropBoxData.width = cropBoxData.height * aspectRatio; + } + } + + this.cropBoxData = cropBoxData; + this.limitCropBox(true, true); // Initialize auto crop area + + cropBoxData.width = Math.min(Math.max(cropBoxData.width, cropBoxData.minWidth), cropBoxData.maxWidth); + cropBoxData.height = Math.min(Math.max(cropBoxData.height, cropBoxData.minHeight), cropBoxData.maxHeight); // The width/height of auto crop area must large than "minWidth/Height" + + cropBoxData.width = Math.max(cropBoxData.minWidth, cropBoxData.width * autoCropArea); + cropBoxData.height = Math.max(cropBoxData.minHeight, cropBoxData.height * autoCropArea); + cropBoxData.left = canvasData.left + (canvasData.width - cropBoxData.width) / 2; + cropBoxData.top = canvasData.top + (canvasData.height - cropBoxData.height) / 2; + cropBoxData.oldLeft = cropBoxData.left; + cropBoxData.oldTop = cropBoxData.top; + this.initialCropBoxData = assign({}, cropBoxData); + }, + limitCropBox: function limitCropBox(sizeLimited, positionLimited) { + var options = this.options, + containerData = this.containerData, + canvasData = this.canvasData, + cropBoxData = this.cropBoxData, + limited = this.limited; + var aspectRatio = options.aspectRatio; + + if (sizeLimited) { + var minCropBoxWidth = Number(options.minCropBoxWidth) || 0; + var minCropBoxHeight = Number(options.minCropBoxHeight) || 0; + var maxCropBoxWidth = limited ? Math.min(containerData.width, canvasData.width, canvasData.width + canvasData.left, containerData.width - canvasData.left) : containerData.width; + var maxCropBoxHeight = limited ? Math.min(containerData.height, canvasData.height, canvasData.height + canvasData.top, containerData.height - canvasData.top) : containerData.height; // The min/maxCropBoxWidth/Height must be less than container's width/height + + minCropBoxWidth = Math.min(minCropBoxWidth, containerData.width); + minCropBoxHeight = Math.min(minCropBoxHeight, containerData.height); + + if (aspectRatio) { + if (minCropBoxWidth && minCropBoxHeight) { + if (minCropBoxHeight * aspectRatio > minCropBoxWidth) { + minCropBoxHeight = minCropBoxWidth / aspectRatio; + } else { + minCropBoxWidth = minCropBoxHeight * aspectRatio; + } + } else if (minCropBoxWidth) { + minCropBoxHeight = minCropBoxWidth / aspectRatio; + } else if (minCropBoxHeight) { + minCropBoxWidth = minCropBoxHeight * aspectRatio; + } + + if (maxCropBoxHeight * aspectRatio > maxCropBoxWidth) { + maxCropBoxHeight = maxCropBoxWidth / aspectRatio; + } else { + maxCropBoxWidth = maxCropBoxHeight * aspectRatio; + } + } // The minWidth/Height must be less than maxWidth/Height + + + cropBoxData.minWidth = Math.min(minCropBoxWidth, maxCropBoxWidth); + cropBoxData.minHeight = Math.min(minCropBoxHeight, maxCropBoxHeight); + cropBoxData.maxWidth = maxCropBoxWidth; + cropBoxData.maxHeight = maxCropBoxHeight; + } + + if (positionLimited) { + if (limited) { + cropBoxData.minLeft = Math.max(0, canvasData.left); + cropBoxData.minTop = Math.max(0, canvasData.top); + cropBoxData.maxLeft = Math.min(containerData.width, canvasData.left + canvasData.width) - cropBoxData.width; + cropBoxData.maxTop = Math.min(containerData.height, canvasData.top + canvasData.height) - cropBoxData.height; + } else { + cropBoxData.minLeft = 0; + cropBoxData.minTop = 0; + cropBoxData.maxLeft = containerData.width - cropBoxData.width; + cropBoxData.maxTop = containerData.height - cropBoxData.height; + } + } + }, + renderCropBox: function renderCropBox() { + var options = this.options, + containerData = this.containerData, + cropBoxData = this.cropBoxData; + + if (cropBoxData.width > cropBoxData.maxWidth || cropBoxData.width < cropBoxData.minWidth) { + cropBoxData.left = cropBoxData.oldLeft; + } + + if (cropBoxData.height > cropBoxData.maxHeight || cropBoxData.height < cropBoxData.minHeight) { + cropBoxData.top = cropBoxData.oldTop; + } + + cropBoxData.width = Math.min(Math.max(cropBoxData.width, cropBoxData.minWidth), cropBoxData.maxWidth); + cropBoxData.height = Math.min(Math.max(cropBoxData.height, cropBoxData.minHeight), cropBoxData.maxHeight); + this.limitCropBox(false, true); + cropBoxData.left = Math.min(Math.max(cropBoxData.left, cropBoxData.minLeft), cropBoxData.maxLeft); + cropBoxData.top = Math.min(Math.max(cropBoxData.top, cropBoxData.minTop), cropBoxData.maxTop); + cropBoxData.oldLeft = cropBoxData.left; + cropBoxData.oldTop = cropBoxData.top; + + if (options.movable && options.cropBoxMovable) { + // Turn to move the canvas when the crop box is equal to the container + setData(this.face, DATA_ACTION, cropBoxData.width >= containerData.width && cropBoxData.height >= containerData.height ? ACTION_MOVE : ACTION_ALL); + } + + setStyle(this.cropBox, assign({ + width: cropBoxData.width, + height: cropBoxData.height + }, getTransforms({ + translateX: cropBoxData.left, + translateY: cropBoxData.top + }))); + + if (this.cropped && this.limited) { + this.limitCanvas(true, true); + } + + if (!this.disabled) { + this.output(); + } + }, + output: function output() { + this.preview(); + dispatchEvent(this.element, EVENT_CROP, this.getData()); + } + }; + + var preview = { + initPreview: function initPreview() { + var element = this.element, + crossOrigin = this.crossOrigin; + var preview = this.options.preview; + var url = crossOrigin ? this.crossOriginUrl : this.url; + var alt = element.alt || 'The image to preview'; + var image = document.createElement('img'); + + if (crossOrigin) { + image.crossOrigin = crossOrigin; + } + + image.src = url; + image.alt = alt; + this.viewBox.appendChild(image); + this.viewBoxImage = image; + + if (!preview) { + return; + } + + var previews = preview; + + if (typeof preview === 'string') { + previews = element.ownerDocument.querySelectorAll(preview); + } else if (preview.querySelector) { + previews = [preview]; + } + + this.previews = previews; + forEach(previews, function (el) { + var img = document.createElement('img'); // Save the original size for recover + + setData(el, DATA_PREVIEW, { + width: el.offsetWidth, + height: el.offsetHeight, + html: el.innerHTML + }); + + if (crossOrigin) { + img.crossOrigin = crossOrigin; + } + + img.src = url; + img.alt = alt; + /** + * Override img element styles + * Add `display:block` to avoid margin top issue + * Add `height:auto` to override `height` attribute on IE8 + * (Occur only when margin-top <= -height) + */ + + img.style.cssText = 'display:block;' + 'width:100%;' + 'height:auto;' + 'min-width:0!important;' + 'min-height:0!important;' + 'max-width:none!important;' + 'max-height:none!important;' + 'image-orientation:0deg!important;"'; + el.innerHTML = ''; + el.appendChild(img); + }); + }, + resetPreview: function resetPreview() { + forEach(this.previews, function (element) { + var data = getData(element, DATA_PREVIEW); + setStyle(element, { + width: data.width, + height: data.height + }); + element.innerHTML = data.html; + removeData(element, DATA_PREVIEW); + }); + }, + preview: function preview() { + var imageData = this.imageData, + canvasData = this.canvasData, + cropBoxData = this.cropBoxData; + var cropBoxWidth = cropBoxData.width, + cropBoxHeight = cropBoxData.height; + var width = imageData.width, + height = imageData.height; + var left = cropBoxData.left - canvasData.left - imageData.left; + var top = cropBoxData.top - canvasData.top - imageData.top; + + if (!this.cropped || this.disabled) { + return; + } + + setStyle(this.viewBoxImage, assign({ + width: width, + height: height + }, getTransforms(assign({ + translateX: -left, + translateY: -top + }, imageData)))); + forEach(this.previews, function (element) { + var data = getData(element, DATA_PREVIEW); + var originalWidth = data.width; + var originalHeight = data.height; + var newWidth = originalWidth; + var newHeight = originalHeight; + var ratio = 1; + + if (cropBoxWidth) { + ratio = originalWidth / cropBoxWidth; + newHeight = cropBoxHeight * ratio; + } + + if (cropBoxHeight && newHeight > originalHeight) { + ratio = originalHeight / cropBoxHeight; + newWidth = cropBoxWidth * ratio; + newHeight = originalHeight; + } + + setStyle(element, { + width: newWidth, + height: newHeight + }); + setStyle(element.getElementsByTagName('img')[0], assign({ + width: width * ratio, + height: height * ratio + }, getTransforms(assign({ + translateX: -left * ratio, + translateY: -top * ratio + }, imageData)))); + }); + } + }; + + var events = { + bind: function bind() { + var element = this.element, + options = this.options, + cropper = this.cropper; + + if (isFunction(options.cropstart)) { + addListener(element, EVENT_CROP_START, options.cropstart); + } + + if (isFunction(options.cropmove)) { + addListener(element, EVENT_CROP_MOVE, options.cropmove); + } + + if (isFunction(options.cropend)) { + addListener(element, EVENT_CROP_END, options.cropend); + } + + if (isFunction(options.crop)) { + addListener(element, EVENT_CROP, options.crop); + } + + if (isFunction(options.zoom)) { + addListener(element, EVENT_ZOOM, options.zoom); + } + + addListener(cropper, EVENT_POINTER_DOWN, this.onCropStart = this.cropStart.bind(this)); + + if (options.zoomable && options.zoomOnWheel) { + addListener(cropper, EVENT_WHEEL, this.onWheel = this.wheel.bind(this), { + passive: false, + capture: true + }); + } + + if (options.toggleDragModeOnDblclick) { + addListener(cropper, EVENT_DBLCLICK, this.onDblclick = this.dblclick.bind(this)); + } + + addListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onCropMove = this.cropMove.bind(this)); + addListener(element.ownerDocument, EVENT_POINTER_UP, this.onCropEnd = this.cropEnd.bind(this)); + + if (options.responsive) { + addListener(window, EVENT_RESIZE, this.onResize = this.resize.bind(this)); + } + }, + unbind: function unbind() { + var element = this.element, + options = this.options, + cropper = this.cropper; + + if (isFunction(options.cropstart)) { + removeListener(element, EVENT_CROP_START, options.cropstart); + } + + if (isFunction(options.cropmove)) { + removeListener(element, EVENT_CROP_MOVE, options.cropmove); + } + + if (isFunction(options.cropend)) { + removeListener(element, EVENT_CROP_END, options.cropend); + } + + if (isFunction(options.crop)) { + removeListener(element, EVENT_CROP, options.crop); + } + + if (isFunction(options.zoom)) { + removeListener(element, EVENT_ZOOM, options.zoom); + } + + removeListener(cropper, EVENT_POINTER_DOWN, this.onCropStart); + + if (options.zoomable && options.zoomOnWheel) { + removeListener(cropper, EVENT_WHEEL, this.onWheel, { + passive: false, + capture: true + }); + } + + if (options.toggleDragModeOnDblclick) { + removeListener(cropper, EVENT_DBLCLICK, this.onDblclick); + } + + removeListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onCropMove); + removeListener(element.ownerDocument, EVENT_POINTER_UP, this.onCropEnd); + + if (options.responsive) { + removeListener(window, EVENT_RESIZE, this.onResize); + } + } + }; + + var handlers = { + resize: function resize() { + if (this.disabled) { + return; + } + + var options = this.options, + container = this.container, + containerData = this.containerData; + var ratio = container.offsetWidth / containerData.width; // Resize when width changed or height changed + + if (ratio !== 1 || container.offsetHeight !== containerData.height) { + var canvasData; + var cropBoxData; + + if (options.restore) { + canvasData = this.getCanvasData(); + cropBoxData = this.getCropBoxData(); + } + + this.render(); + + if (options.restore) { + this.setCanvasData(forEach(canvasData, function (n, i) { + canvasData[i] = n * ratio; + })); + this.setCropBoxData(forEach(cropBoxData, function (n, i) { + cropBoxData[i] = n * ratio; + })); + } + } + }, + dblclick: function dblclick() { + if (this.disabled || this.options.dragMode === DRAG_MODE_NONE) { + return; + } + + this.setDragMode(hasClass(this.dragBox, CLASS_CROP) ? DRAG_MODE_MOVE : DRAG_MODE_CROP); + }, + wheel: function wheel(event) { + var _this = this; + + var ratio = Number(this.options.wheelZoomRatio) || 0.1; + var delta = 1; + + if (this.disabled) { + return; + } + + event.preventDefault(); // Limit wheel speed to prevent zoom too fast (#21) + + if (this.wheeling) { + return; + } + + this.wheeling = true; + setTimeout(function () { + _this.wheeling = false; + }, 50); + + if (event.deltaY) { + delta = event.deltaY > 0 ? 1 : -1; + } else if (event.wheelDelta) { + delta = -event.wheelDelta / 120; + } else if (event.detail) { + delta = event.detail > 0 ? 1 : -1; + } + + this.zoom(-delta * ratio, event); + }, + cropStart: function cropStart(event) { + var buttons = event.buttons, + button = event.button; + + if (this.disabled // Handle mouse event and pointer event and ignore touch event + || (event.type === 'mousedown' || event.type === 'pointerdown' && event.pointerType === 'mouse') && ( // No primary button (Usually the left button) + isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0 // Open context menu + || event.ctrlKey)) { + return; + } + + var options = this.options, + pointers = this.pointers; + var action; + + if (event.changedTouches) { + // Handle touch event + forEach(event.changedTouches, function (touch) { + pointers[touch.identifier] = getPointer(touch); + }); + } else { + // Handle mouse event and pointer event + pointers[event.pointerId || 0] = getPointer(event); + } + + if (Object.keys(pointers).length > 1 && options.zoomable && options.zoomOnTouch) { + action = ACTION_ZOOM; + } else { + action = getData(event.target, DATA_ACTION); + } + + if (!REGEXP_ACTIONS.test(action)) { + return; + } + + if (dispatchEvent(this.element, EVENT_CROP_START, { + originalEvent: event, + action: action + }) === false) { + return; + } // This line is required for preventing page zooming in iOS browsers + + + event.preventDefault(); + this.action = action; + this.cropping = false; + + if (action === ACTION_CROP) { + this.cropping = true; + addClass(this.dragBox, CLASS_MODAL); + } + }, + cropMove: function cropMove(event) { + var action = this.action; + + if (this.disabled || !action) { + return; + } + + var pointers = this.pointers; + event.preventDefault(); + + if (dispatchEvent(this.element, EVENT_CROP_MOVE, { + originalEvent: event, + action: action + }) === false) { + return; + } + + if (event.changedTouches) { + forEach(event.changedTouches, function (touch) { + // The first parameter should not be undefined (#432) + assign(pointers[touch.identifier] || {}, getPointer(touch, true)); + }); + } else { + assign(pointers[event.pointerId || 0] || {}, getPointer(event, true)); + } + + this.change(event); + }, + cropEnd: function cropEnd(event) { + if (this.disabled) { + return; + } + + var action = this.action, + pointers = this.pointers; + + if (event.changedTouches) { + forEach(event.changedTouches, function (touch) { + delete pointers[touch.identifier]; + }); + } else { + delete pointers[event.pointerId || 0]; + } + + if (!action) { + return; + } + + event.preventDefault(); + + if (!Object.keys(pointers).length) { + this.action = ''; + } + + if (this.cropping) { + this.cropping = false; + toggleClass(this.dragBox, CLASS_MODAL, this.cropped && this.options.modal); + } + + dispatchEvent(this.element, EVENT_CROP_END, { + originalEvent: event, + action: action + }); + } + }; + + var change = { + change: function change(event) { + var options = this.options, + canvasData = this.canvasData, + containerData = this.containerData, + cropBoxData = this.cropBoxData, + pointers = this.pointers; + var action = this.action; + var aspectRatio = options.aspectRatio; + var left = cropBoxData.left, + top = cropBoxData.top, + width = cropBoxData.width, + height = cropBoxData.height; + var right = left + width; + var bottom = top + height; + var minLeft = 0; + var minTop = 0; + var maxWidth = containerData.width; + var maxHeight = containerData.height; + var renderable = true; + var offset; // Locking aspect ratio in "free mode" by holding shift key + + if (!aspectRatio && event.shiftKey) { + aspectRatio = width && height ? width / height : 1; + } + + if (this.limited) { + minLeft = cropBoxData.minLeft; + minTop = cropBoxData.minTop; + maxWidth = minLeft + Math.min(containerData.width, canvasData.width, canvasData.left + canvasData.width); + maxHeight = minTop + Math.min(containerData.height, canvasData.height, canvasData.top + canvasData.height); + } + + var pointer = pointers[Object.keys(pointers)[0]]; + var range = { + x: pointer.endX - pointer.startX, + y: pointer.endY - pointer.startY + }; + + var check = function check(side) { + switch (side) { + case ACTION_EAST: + if (right + range.x > maxWidth) { + range.x = maxWidth - right; + } + + break; + + case ACTION_WEST: + if (left + range.x < minLeft) { + range.x = minLeft - left; + } + + break; + + case ACTION_NORTH: + if (top + range.y < minTop) { + range.y = minTop - top; + } + + break; + + case ACTION_SOUTH: + if (bottom + range.y > maxHeight) { + range.y = maxHeight - bottom; + } + + break; + } + }; + + switch (action) { + // Move crop box + case ACTION_ALL: + left += range.x; + top += range.y; + break; + // Resize crop box + + case ACTION_EAST: + if (range.x >= 0 && (right >= maxWidth || aspectRatio && (top <= minTop || bottom >= maxHeight))) { + renderable = false; + break; + } + + check(ACTION_EAST); + width += range.x; + + if (width < 0) { + action = ACTION_WEST; + width = -width; + left -= width; + } + + if (aspectRatio) { + height = width / aspectRatio; + top += (cropBoxData.height - height) / 2; + } + + break; + + case ACTION_NORTH: + if (range.y <= 0 && (top <= minTop || aspectRatio && (left <= minLeft || right >= maxWidth))) { + renderable = false; + break; + } + + check(ACTION_NORTH); + height -= range.y; + top += range.y; + + if (height < 0) { + action = ACTION_SOUTH; + height = -height; + top -= height; + } + + if (aspectRatio) { + width = height * aspectRatio; + left += (cropBoxData.width - width) / 2; + } + + break; + + case ACTION_WEST: + if (range.x <= 0 && (left <= minLeft || aspectRatio && (top <= minTop || bottom >= maxHeight))) { + renderable = false; + break; + } + + check(ACTION_WEST); + width -= range.x; + left += range.x; + + if (width < 0) { + action = ACTION_EAST; + width = -width; + left -= width; + } + + if (aspectRatio) { + height = width / aspectRatio; + top += (cropBoxData.height - height) / 2; + } + + break; + + case ACTION_SOUTH: + if (range.y >= 0 && (bottom >= maxHeight || aspectRatio && (left <= minLeft || right >= maxWidth))) { + renderable = false; + break; + } + + check(ACTION_SOUTH); + height += range.y; + + if (height < 0) { + action = ACTION_NORTH; + height = -height; + top -= height; + } + + if (aspectRatio) { + width = height * aspectRatio; + left += (cropBoxData.width - width) / 2; + } + + break; + + case ACTION_NORTH_EAST: + if (aspectRatio) { + if (range.y <= 0 && (top <= minTop || right >= maxWidth)) { + renderable = false; + break; + } + + check(ACTION_NORTH); + height -= range.y; + top += range.y; + width = height * aspectRatio; + } else { + check(ACTION_NORTH); + check(ACTION_EAST); + + if (range.x >= 0) { + if (right < maxWidth) { + width += range.x; + } else if (range.y <= 0 && top <= minTop) { + renderable = false; + } + } else { + width += range.x; + } + + if (range.y <= 0) { + if (top > minTop) { + height -= range.y; + top += range.y; + } + } else { + height -= range.y; + top += range.y; + } + } + + if (width < 0 && height < 0) { + action = ACTION_SOUTH_WEST; + height = -height; + width = -width; + top -= height; + left -= width; + } else if (width < 0) { + action = ACTION_NORTH_WEST; + width = -width; + left -= width; + } else if (height < 0) { + action = ACTION_SOUTH_EAST; + height = -height; + top -= height; + } + + break; + + case ACTION_NORTH_WEST: + if (aspectRatio) { + if (range.y <= 0 && (top <= minTop || left <= minLeft)) { + renderable = false; + break; + } + + check(ACTION_NORTH); + height -= range.y; + top += range.y; + width = height * aspectRatio; + left += cropBoxData.width - width; + } else { + check(ACTION_NORTH); + check(ACTION_WEST); + + if (range.x <= 0) { + if (left > minLeft) { + width -= range.x; + left += range.x; + } else if (range.y <= 0 && top <= minTop) { + renderable = false; + } + } else { + width -= range.x; + left += range.x; + } + + if (range.y <= 0) { + if (top > minTop) { + height -= range.y; + top += range.y; + } + } else { + height -= range.y; + top += range.y; + } + } + + if (width < 0 && height < 0) { + action = ACTION_SOUTH_EAST; + height = -height; + width = -width; + top -= height; + left -= width; + } else if (width < 0) { + action = ACTION_NORTH_EAST; + width = -width; + left -= width; + } else if (height < 0) { + action = ACTION_SOUTH_WEST; + height = -height; + top -= height; + } + + break; + + case ACTION_SOUTH_WEST: + if (aspectRatio) { + if (range.x <= 0 && (left <= minLeft || bottom >= maxHeight)) { + renderable = false; + break; + } + + check(ACTION_WEST); + width -= range.x; + left += range.x; + height = width / aspectRatio; + } else { + check(ACTION_SOUTH); + check(ACTION_WEST); + + if (range.x <= 0) { + if (left > minLeft) { + width -= range.x; + left += range.x; + } else if (range.y >= 0 && bottom >= maxHeight) { + renderable = false; + } + } else { + width -= range.x; + left += range.x; + } + + if (range.y >= 0) { + if (bottom < maxHeight) { + height += range.y; + } + } else { + height += range.y; + } + } + + if (width < 0 && height < 0) { + action = ACTION_NORTH_EAST; + height = -height; + width = -width; + top -= height; + left -= width; + } else if (width < 0) { + action = ACTION_SOUTH_EAST; + width = -width; + left -= width; + } else if (height < 0) { + action = ACTION_NORTH_WEST; + height = -height; + top -= height; + } + + break; + + case ACTION_SOUTH_EAST: + if (aspectRatio) { + if (range.x >= 0 && (right >= maxWidth || bottom >= maxHeight)) { + renderable = false; + break; + } + + check(ACTION_EAST); + width += range.x; + height = width / aspectRatio; + } else { + check(ACTION_SOUTH); + check(ACTION_EAST); + + if (range.x >= 0) { + if (right < maxWidth) { + width += range.x; + } else if (range.y >= 0 && bottom >= maxHeight) { + renderable = false; + } + } else { + width += range.x; + } + + if (range.y >= 0) { + if (bottom < maxHeight) { + height += range.y; + } + } else { + height += range.y; + } + } + + if (width < 0 && height < 0) { + action = ACTION_NORTH_WEST; + height = -height; + width = -width; + top -= height; + left -= width; + } else if (width < 0) { + action = ACTION_SOUTH_WEST; + width = -width; + left -= width; + } else if (height < 0) { + action = ACTION_NORTH_EAST; + height = -height; + top -= height; + } + + break; + // Move canvas + + case ACTION_MOVE: + this.move(range.x, range.y); + renderable = false; + break; + // Zoom canvas + + case ACTION_ZOOM: + this.zoom(getMaxZoomRatio(pointers), event); + renderable = false; + break; + // Create crop box + + case ACTION_CROP: + if (!range.x || !range.y) { + renderable = false; + break; + } + + offset = getOffset(this.cropper); + left = pointer.startX - offset.left; + top = pointer.startY - offset.top; + width = cropBoxData.minWidth; + height = cropBoxData.minHeight; + + if (range.x > 0) { + action = range.y > 0 ? ACTION_SOUTH_EAST : ACTION_NORTH_EAST; + } else if (range.x < 0) { + left -= width; + action = range.y > 0 ? ACTION_SOUTH_WEST : ACTION_NORTH_WEST; + } + + if (range.y < 0) { + top -= height; + } // Show the crop box if is hidden + + + if (!this.cropped) { + removeClass(this.cropBox, CLASS_HIDDEN); + this.cropped = true; + + if (this.limited) { + this.limitCropBox(true, true); + } + } + + break; + } + + if (renderable) { + cropBoxData.width = width; + cropBoxData.height = height; + cropBoxData.left = left; + cropBoxData.top = top; + this.action = action; + this.renderCropBox(); + } // Override + + + forEach(pointers, function (p) { + p.startX = p.endX; + p.startY = p.endY; + }); + } + }; + + var methods = { + // Show the crop box manually + crop: function crop() { + if (this.ready && !this.cropped && !this.disabled) { + this.cropped = true; + this.limitCropBox(true, true); + + if (this.options.modal) { + addClass(this.dragBox, CLASS_MODAL); + } + + removeClass(this.cropBox, CLASS_HIDDEN); + this.setCropBoxData(this.initialCropBoxData); + } + + return this; + }, + // Reset the image and crop box to their initial states + reset: function reset() { + if (this.ready && !this.disabled) { + this.imageData = assign({}, this.initialImageData); + this.canvasData = assign({}, this.initialCanvasData); + this.cropBoxData = assign({}, this.initialCropBoxData); + this.renderCanvas(); + + if (this.cropped) { + this.renderCropBox(); + } + } + + return this; + }, + // Clear the crop box + clear: function clear() { + if (this.cropped && !this.disabled) { + assign(this.cropBoxData, { + left: 0, + top: 0, + width: 0, + height: 0 + }); + this.cropped = false; + this.renderCropBox(); + this.limitCanvas(true, true); // Render canvas after crop box rendered + + this.renderCanvas(); + removeClass(this.dragBox, CLASS_MODAL); + addClass(this.cropBox, CLASS_HIDDEN); + } + + return this; + }, + + /** + * Replace the image's src and rebuild the cropper + * @param {string} url - The new URL. + * @param {boolean} [hasSameSize] - Indicate if the new image has the same size as the old one. + * @returns {Cropper} this + */ + replace: function replace(url) { + var hasSameSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (!this.disabled && url) { + if (this.isImg) { + this.element.src = url; + } + + if (hasSameSize) { + this.url = url; + this.image.src = url; + + if (this.ready) { + this.viewBoxImage.src = url; + forEach(this.previews, function (element) { + element.getElementsByTagName('img')[0].src = url; + }); + } + } else { + if (this.isImg) { + this.replaced = true; + } + + this.options.data = null; + this.uncreate(); + this.load(url); + } + } + + return this; + }, + // Enable (unfreeze) the cropper + enable: function enable() { + if (this.ready && this.disabled) { + this.disabled = false; + removeClass(this.cropper, CLASS_DISABLED); + } + + return this; + }, + // Disable (freeze) the cropper + disable: function disable() { + if (this.ready && !this.disabled) { + this.disabled = true; + addClass(this.cropper, CLASS_DISABLED); + } + + return this; + }, + + /** + * Destroy the cropper and remove the instance from the image + * @returns {Cropper} this + */ + destroy: function destroy() { + var element = this.element; + + if (!element[NAMESPACE]) { + return this; + } + + element[NAMESPACE] = undefined; + + if (this.isImg && this.replaced) { + element.src = this.originalUrl; + } + + this.uncreate(); + return this; + }, + + /** + * Move the canvas with relative offsets + * @param {number} offsetX - The relative offset distance on the x-axis. + * @param {number} [offsetY=offsetX] - The relative offset distance on the y-axis. + * @returns {Cropper} this + */ + move: function move(offsetX) { + var offsetY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : offsetX; + var _this$canvasData = this.canvasData, + left = _this$canvasData.left, + top = _this$canvasData.top; + return this.moveTo(isUndefined(offsetX) ? offsetX : left + Number(offsetX), isUndefined(offsetY) ? offsetY : top + Number(offsetY)); + }, + + /** + * Move the canvas to an absolute point + * @param {number} x - The x-axis coordinate. + * @param {number} [y=x] - The y-axis coordinate. + * @returns {Cropper} this + */ + moveTo: function moveTo(x) { + var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : x; + var canvasData = this.canvasData; + var changed = false; + x = Number(x); + y = Number(y); + + if (this.ready && !this.disabled && this.options.movable) { + if (isNumber(x)) { + canvasData.left = x; + changed = true; + } + + if (isNumber(y)) { + canvasData.top = y; + changed = true; + } + + if (changed) { + this.renderCanvas(true); + } + } + + return this; + }, + + /** + * Zoom the canvas with a relative ratio + * @param {number} ratio - The target ratio. + * @param {Event} _originalEvent - The original event if any. + * @returns {Cropper} this + */ + zoom: function zoom(ratio, _originalEvent) { + var canvasData = this.canvasData; + ratio = Number(ratio); + + if (ratio < 0) { + ratio = 1 / (1 - ratio); + } else { + ratio = 1 + ratio; + } + + return this.zoomTo(canvasData.width * ratio / canvasData.naturalWidth, null, _originalEvent); + }, + + /** + * Zoom the canvas to an absolute ratio + * @param {number} ratio - The target ratio. + * @param {Object} pivot - The zoom pivot point coordinate. + * @param {Event} _originalEvent - The original event if any. + * @returns {Cropper} this + */ + zoomTo: function zoomTo(ratio, pivot, _originalEvent) { + var options = this.options, + canvasData = this.canvasData; + var width = canvasData.width, + height = canvasData.height, + naturalWidth = canvasData.naturalWidth, + naturalHeight = canvasData.naturalHeight; + ratio = Number(ratio); + + if (ratio >= 0 && this.ready && !this.disabled && options.zoomable) { + var newWidth = naturalWidth * ratio; + var newHeight = naturalHeight * ratio; + + if (dispatchEvent(this.element, EVENT_ZOOM, { + ratio: ratio, + oldRatio: width / naturalWidth, + originalEvent: _originalEvent + }) === false) { + return this; + } + + if (_originalEvent) { + var pointers = this.pointers; + var offset = getOffset(this.cropper); + var center = pointers && Object.keys(pointers).length ? getPointersCenter(pointers) : { + pageX: _originalEvent.pageX, + pageY: _originalEvent.pageY + }; // Zoom from the triggering point of the event + + canvasData.left -= (newWidth - width) * ((center.pageX - offset.left - canvasData.left) / width); + canvasData.top -= (newHeight - height) * ((center.pageY - offset.top - canvasData.top) / height); + } else if (isPlainObject(pivot) && isNumber(pivot.x) && isNumber(pivot.y)) { + canvasData.left -= (newWidth - width) * ((pivot.x - canvasData.left) / width); + canvasData.top -= (newHeight - height) * ((pivot.y - canvasData.top) / height); + } else { + // Zoom from the center of the canvas + canvasData.left -= (newWidth - width) / 2; + canvasData.top -= (newHeight - height) / 2; + } + + canvasData.width = newWidth; + canvasData.height = newHeight; + this.renderCanvas(true); + } + + return this; + }, + + /** + * Rotate the canvas with a relative degree + * @param {number} degree - The rotate degree. + * @returns {Cropper} this + */ + rotate: function rotate(degree) { + return this.rotateTo((this.imageData.rotate || 0) + Number(degree)); + }, + + /** + * Rotate the canvas to an absolute degree + * @param {number} degree - The rotate degree. + * @returns {Cropper} this + */ + rotateTo: function rotateTo(degree) { + degree = Number(degree); + + if (isNumber(degree) && this.ready && !this.disabled && this.options.rotatable) { + this.imageData.rotate = degree % 360; + this.renderCanvas(true, true); + } + + return this; + }, + + /** + * Scale the image on the x-axis. + * @param {number} scaleX - The scale ratio on the x-axis. + * @returns {Cropper} this + */ + scaleX: function scaleX(_scaleX) { + var scaleY = this.imageData.scaleY; + return this.scale(_scaleX, isNumber(scaleY) ? scaleY : 1); + }, + + /** + * Scale the image on the y-axis. + * @param {number} scaleY - The scale ratio on the y-axis. + * @returns {Cropper} this + */ + scaleY: function scaleY(_scaleY) { + var scaleX = this.imageData.scaleX; + return this.scale(isNumber(scaleX) ? scaleX : 1, _scaleY); + }, + + /** + * Scale the image + * @param {number} scaleX - The scale ratio on the x-axis. + * @param {number} [scaleY=scaleX] - The scale ratio on the y-axis. + * @returns {Cropper} this + */ + scale: function scale(scaleX) { + var scaleY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : scaleX; + var imageData = this.imageData; + var transformed = false; + scaleX = Number(scaleX); + scaleY = Number(scaleY); + + if (this.ready && !this.disabled && this.options.scalable) { + if (isNumber(scaleX)) { + imageData.scaleX = scaleX; + transformed = true; + } + + if (isNumber(scaleY)) { + imageData.scaleY = scaleY; + transformed = true; + } + + if (transformed) { + this.renderCanvas(true, true); + } + } + + return this; + }, + + /** + * Get the cropped area position and size data (base on the original image) + * @param {boolean} [rounded=false] - Indicate if round the data values or not. + * @returns {Object} The result cropped data. + */ + getData: function getData() { + var rounded = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var options = this.options, + imageData = this.imageData, + canvasData = this.canvasData, + cropBoxData = this.cropBoxData; + var data; + + if (this.ready && this.cropped) { + data = { + x: cropBoxData.left - canvasData.left, + y: cropBoxData.top - canvasData.top, + width: cropBoxData.width, + height: cropBoxData.height + }; + var ratio = imageData.width / imageData.naturalWidth; + forEach(data, function (n, i) { + data[i] = n / ratio; + }); + + if (rounded) { + // In case rounding off leads to extra 1px in right or bottom border + // we should round the top-left corner and the dimension (#343). + var bottom = Math.round(data.y + data.height); + var right = Math.round(data.x + data.width); + data.x = Math.round(data.x); + data.y = Math.round(data.y); + data.width = right - data.x; + data.height = bottom - data.y; + } + } else { + data = { + x: 0, + y: 0, + width: 0, + height: 0 + }; + } + + if (options.rotatable) { + data.rotate = imageData.rotate || 0; + } + + if (options.scalable) { + data.scaleX = imageData.scaleX || 1; + data.scaleY = imageData.scaleY || 1; + } + + return data; + }, + + /** + * Set the cropped area position and size with new data + * @param {Object} data - The new data. + * @returns {Cropper} this + */ + setData: function setData(data) { + var options = this.options, + imageData = this.imageData, + canvasData = this.canvasData; + var cropBoxData = {}; + + if (this.ready && !this.disabled && isPlainObject(data)) { + var transformed = false; + + if (options.rotatable) { + if (isNumber(data.rotate) && data.rotate !== imageData.rotate) { + imageData.rotate = data.rotate; + transformed = true; + } + } + + if (options.scalable) { + if (isNumber(data.scaleX) && data.scaleX !== imageData.scaleX) { + imageData.scaleX = data.scaleX; + transformed = true; + } + + if (isNumber(data.scaleY) && data.scaleY !== imageData.scaleY) { + imageData.scaleY = data.scaleY; + transformed = true; + } + } + + if (transformed) { + this.renderCanvas(true, true); + } + + var ratio = imageData.width / imageData.naturalWidth; + + if (isNumber(data.x)) { + cropBoxData.left = data.x * ratio + canvasData.left; + } + + if (isNumber(data.y)) { + cropBoxData.top = data.y * ratio + canvasData.top; + } + + if (isNumber(data.width)) { + cropBoxData.width = data.width * ratio; + } + + if (isNumber(data.height)) { + cropBoxData.height = data.height * ratio; + } + + this.setCropBoxData(cropBoxData); + } + + return this; + }, + + /** + * Get the container size data. + * @returns {Object} The result container data. + */ + getContainerData: function getContainerData() { + return this.ready ? assign({}, this.containerData) : {}; + }, + + /** + * Get the image position and size data. + * @returns {Object} The result image data. + */ + getImageData: function getImageData() { + return this.sized ? assign({}, this.imageData) : {}; + }, + + /** + * Get the canvas position and size data. + * @returns {Object} The result canvas data. + */ + getCanvasData: function getCanvasData() { + var canvasData = this.canvasData; + var data = {}; + + if (this.ready) { + forEach(['left', 'top', 'width', 'height', 'naturalWidth', 'naturalHeight'], function (n) { + data[n] = canvasData[n]; + }); + } + + return data; + }, + + /** + * Set the canvas position and size with new data. + * @param {Object} data - The new canvas data. + * @returns {Cropper} this + */ + setCanvasData: function setCanvasData(data) { + var canvasData = this.canvasData; + var aspectRatio = canvasData.aspectRatio; + + if (this.ready && !this.disabled && isPlainObject(data)) { + if (isNumber(data.left)) { + canvasData.left = data.left; + } + + if (isNumber(data.top)) { + canvasData.top = data.top; + } + + if (isNumber(data.width)) { + canvasData.width = data.width; + canvasData.height = data.width / aspectRatio; + } else if (isNumber(data.height)) { + canvasData.height = data.height; + canvasData.width = data.height * aspectRatio; + } + + this.renderCanvas(true); + } + + return this; + }, + + /** + * Get the crop box position and size data. + * @returns {Object} The result crop box data. + */ + getCropBoxData: function getCropBoxData() { + var cropBoxData = this.cropBoxData; + var data; + + if (this.ready && this.cropped) { + data = { + left: cropBoxData.left, + top: cropBoxData.top, + width: cropBoxData.width, + height: cropBoxData.height + }; + } + + return data || {}; + }, + + /** + * Set the crop box position and size with new data. + * @param {Object} data - The new crop box data. + * @returns {Cropper} this + */ + setCropBoxData: function setCropBoxData(data) { + var cropBoxData = this.cropBoxData; + var aspectRatio = this.options.aspectRatio; + var widthChanged; + var heightChanged; + + if (this.ready && this.cropped && !this.disabled && isPlainObject(data)) { + if (isNumber(data.left)) { + cropBoxData.left = data.left; + } + + if (isNumber(data.top)) { + cropBoxData.top = data.top; + } + + if (isNumber(data.width) && data.width !== cropBoxData.width) { + widthChanged = true; + cropBoxData.width = data.width; + } + + if (isNumber(data.height) && data.height !== cropBoxData.height) { + heightChanged = true; + cropBoxData.height = data.height; + } + + if (aspectRatio) { + if (widthChanged) { + cropBoxData.height = cropBoxData.width / aspectRatio; + } else if (heightChanged) { + cropBoxData.width = cropBoxData.height * aspectRatio; + } + } + + this.renderCropBox(); + } + + return this; + }, + + /** + * Get a canvas drawn the cropped image. + * @param {Object} [options={}] - The config options. + * @returns {HTMLCanvasElement} - The result canvas. + */ + getCroppedCanvas: function getCroppedCanvas() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + if (!this.ready || !window.HTMLCanvasElement) { + return null; + } + + var canvasData = this.canvasData; + var source = getSourceCanvas(this.image, this.imageData, canvasData, options); // Returns the source canvas if it is not cropped. + + if (!this.cropped) { + return source; + } + + var _this$getData = this.getData(), + initialX = _this$getData.x, + initialY = _this$getData.y, + initialWidth = _this$getData.width, + initialHeight = _this$getData.height; + + var ratio = source.width / Math.floor(canvasData.naturalWidth); + + if (ratio !== 1) { + initialX *= ratio; + initialY *= ratio; + initialWidth *= ratio; + initialHeight *= ratio; + } + + var aspectRatio = initialWidth / initialHeight; + var maxSizes = getAdjustedSizes({ + aspectRatio: aspectRatio, + width: options.maxWidth || Infinity, + height: options.maxHeight || Infinity + }); + var minSizes = getAdjustedSizes({ + aspectRatio: aspectRatio, + width: options.minWidth || 0, + height: options.minHeight || 0 + }, 'cover'); + + var _getAdjustedSizes = getAdjustedSizes({ + aspectRatio: aspectRatio, + width: options.width || (ratio !== 1 ? source.width : initialWidth), + height: options.height || (ratio !== 1 ? source.height : initialHeight) + }), + width = _getAdjustedSizes.width, + height = _getAdjustedSizes.height; + + width = Math.min(maxSizes.width, Math.max(minSizes.width, width)); + height = Math.min(maxSizes.height, Math.max(minSizes.height, height)); + var canvas = document.createElement('canvas'); + var context = canvas.getContext('2d'); + canvas.width = normalizeDecimalNumber(width); + canvas.height = normalizeDecimalNumber(height); + context.fillStyle = options.fillColor || 'transparent'; + context.fillRect(0, 0, width, height); + var _options$imageSmoothi = options.imageSmoothingEnabled, + imageSmoothingEnabled = _options$imageSmoothi === void 0 ? true : _options$imageSmoothi, + imageSmoothingQuality = options.imageSmoothingQuality; + context.imageSmoothingEnabled = imageSmoothingEnabled; + + if (imageSmoothingQuality) { + context.imageSmoothingQuality = imageSmoothingQuality; + } // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.drawImage + + + var sourceWidth = source.width; + var sourceHeight = source.height; // Source canvas parameters + + var srcX = initialX; + var srcY = initialY; + var srcWidth; + var srcHeight; // Destination canvas parameters + + var dstX; + var dstY; + var dstWidth; + var dstHeight; + + if (srcX <= -initialWidth || srcX > sourceWidth) { + srcX = 0; + srcWidth = 0; + dstX = 0; + dstWidth = 0; + } else if (srcX <= 0) { + dstX = -srcX; + srcX = 0; + srcWidth = Math.min(sourceWidth, initialWidth + srcX); + dstWidth = srcWidth; + } else if (srcX <= sourceWidth) { + dstX = 0; + srcWidth = Math.min(initialWidth, sourceWidth - srcX); + dstWidth = srcWidth; + } + + if (srcWidth <= 0 || srcY <= -initialHeight || srcY > sourceHeight) { + srcY = 0; + srcHeight = 0; + dstY = 0; + dstHeight = 0; + } else if (srcY <= 0) { + dstY = -srcY; + srcY = 0; + srcHeight = Math.min(sourceHeight, initialHeight + srcY); + dstHeight = srcHeight; + } else if (srcY <= sourceHeight) { + dstY = 0; + srcHeight = Math.min(initialHeight, sourceHeight - srcY); + dstHeight = srcHeight; + } + + var params = [srcX, srcY, srcWidth, srcHeight]; // Avoid "IndexSizeError" + + if (dstWidth > 0 && dstHeight > 0) { + var scale = width / initialWidth; + params.push(dstX * scale, dstY * scale, dstWidth * scale, dstHeight * scale); + } // All the numerical parameters should be integer for `drawImage` + // https://github.com/fengyuanchen/cropper/issues/476 + + + context.drawImage.apply(context, [source].concat(_toConsumableArray(params.map(function (param) { + return Math.floor(normalizeDecimalNumber(param)); + })))); + return canvas; + }, + + /** + * Change the aspect ratio of the crop box. + * @param {number} aspectRatio - The new aspect ratio. + * @returns {Cropper} this + */ + setAspectRatio: function setAspectRatio(aspectRatio) { + var options = this.options; + + if (!this.disabled && !isUndefined(aspectRatio)) { + // 0 -> NaN + options.aspectRatio = Math.max(0, aspectRatio) || NaN; + + if (this.ready) { + this.initCropBox(); + + if (this.cropped) { + this.renderCropBox(); + } + } + } + + return this; + }, + + /** + * Change the drag mode. + * @param {string} mode - The new drag mode. + * @returns {Cropper} this + */ + setDragMode: function setDragMode(mode) { + var options = this.options, + dragBox = this.dragBox, + face = this.face; + + if (this.ready && !this.disabled) { + var croppable = mode === DRAG_MODE_CROP; + var movable = options.movable && mode === DRAG_MODE_MOVE; + mode = croppable || movable ? mode : DRAG_MODE_NONE; + options.dragMode = mode; + setData(dragBox, DATA_ACTION, mode); + toggleClass(dragBox, CLASS_CROP, croppable); + toggleClass(dragBox, CLASS_MOVE, movable); + + if (!options.cropBoxMovable) { + // Sync drag mode to crop box when it is not movable + setData(face, DATA_ACTION, mode); + toggleClass(face, CLASS_CROP, croppable); + toggleClass(face, CLASS_MOVE, movable); + } + } + + return this; + } + }; + + var AnotherCropper = WINDOW.Cropper; + + var Cropper = /*#__PURE__*/function () { + /** + * Create a new Cropper. + * @param {Element} element - The target element for cropping. + * @param {Object} [options={}] - The configuration options. + */ + function Cropper(element) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, Cropper); + + if (!element || !REGEXP_TAG_NAME.test(element.tagName)) { + throw new Error('The first argument is required and must be an or element.'); + } + + this.element = element; + this.options = assign({}, DEFAULTS, isPlainObject(options) && options); + this.cropped = false; + this.disabled = false; + this.pointers = {}; + this.ready = false; + this.reloading = false; + this.replaced = false; + this.sized = false; + this.sizing = false; + this.init(); + } + + _createClass(Cropper, [{ + key: "init", + value: function init() { + var element = this.element; + var tagName = element.tagName.toLowerCase(); + var url; + + if (element[NAMESPACE]) { + return; + } + + element[NAMESPACE] = this; + + if (tagName === 'img') { + this.isImg = true; // e.g.: "img/picture.jpg" + + url = element.getAttribute('src') || ''; + this.originalUrl = url; // Stop when it's a blank image + + if (!url) { + return; + } // e.g.: "https://example.com/img/picture.jpg" + + + url = element.src; + } else if (tagName === 'canvas' && window.HTMLCanvasElement) { + url = element.toDataURL(); + } + + this.load(url); + } + }, { + key: "load", + value: function load(url) { + var _this = this; + + if (!url) { + return; + } + + this.url = url; + this.imageData = {}; + var element = this.element, + options = this.options; + + if (!options.rotatable && !options.scalable) { + options.checkOrientation = false; + } // Only IE10+ supports Typed Arrays + + + if (!options.checkOrientation || !window.ArrayBuffer) { + this.clone(); + return; + } // Detect the mime type of the image directly if it is a Data URL + + + if (REGEXP_DATA_URL.test(url)) { + // Read ArrayBuffer from Data URL of JPEG images directly for better performance + if (REGEXP_DATA_URL_JPEG.test(url)) { + this.read(dataURLToArrayBuffer(url)); + } else { + // Only a JPEG image may contains Exif Orientation information, + // the rest types of Data URLs are not necessary to check orientation at all. + this.clone(); + } + + return; + } // 1. Detect the mime type of the image by a XMLHttpRequest. + // 2. Load the image as ArrayBuffer for reading orientation if its a JPEG image. + + + var xhr = new XMLHttpRequest(); + var clone = this.clone.bind(this); + this.reloading = true; + this.xhr = xhr; // 1. Cross origin requests are only supported for protocol schemes: + // http, https, data, chrome, chrome-extension. + // 2. Access to XMLHttpRequest from a Data URL will be blocked by CORS policy + // in some browsers as IE11 and Safari. + + xhr.onabort = clone; + xhr.onerror = clone; + xhr.ontimeout = clone; + + xhr.onprogress = function () { + // Abort the request directly if it not a JPEG image for better performance + if (xhr.getResponseHeader('content-type') !== MIME_TYPE_JPEG) { + xhr.abort(); + } + }; + + xhr.onload = function () { + _this.read(xhr.response); + }; + + xhr.onloadend = function () { + _this.reloading = false; + _this.xhr = null; + }; // Bust cache when there is a "crossOrigin" property to avoid browser cache error + + + if (options.checkCrossOrigin && isCrossOriginURL(url) && element.crossOrigin) { + url = addTimestamp(url); + } + + xhr.open('GET', url); + xhr.responseType = 'arraybuffer'; + xhr.withCredentials = element.crossOrigin === 'use-credentials'; + xhr.send(); + } + }, { + key: "read", + value: function read(arrayBuffer) { + var options = this.options, + imageData = this.imageData; // Reset the orientation value to its default value 1 + // as some iOS browsers will render image with its orientation + + var orientation = resetAndGetOrientation(arrayBuffer); + var rotate = 0; + var scaleX = 1; + var scaleY = 1; + + if (orientation > 1) { + // Generate a new URL which has the default orientation value + this.url = arrayBufferToDataURL(arrayBuffer, MIME_TYPE_JPEG); + + var _parseOrientation = parseOrientation(orientation); + + rotate = _parseOrientation.rotate; + scaleX = _parseOrientation.scaleX; + scaleY = _parseOrientation.scaleY; + } + + if (options.rotatable) { + imageData.rotate = rotate; + } + + if (options.scalable) { + imageData.scaleX = scaleX; + imageData.scaleY = scaleY; + } + + this.clone(); + } + }, { + key: "clone", + value: function clone() { + var element = this.element, + url = this.url; + var crossOrigin = element.crossOrigin; + var crossOriginUrl = url; + + if (this.options.checkCrossOrigin && isCrossOriginURL(url)) { + if (!crossOrigin) { + crossOrigin = 'anonymous'; + } // Bust cache when there is not a "crossOrigin" property (#519) + + + crossOriginUrl = addTimestamp(url); + } + + this.crossOrigin = crossOrigin; + this.crossOriginUrl = crossOriginUrl; + var image = document.createElement('img'); + + if (crossOrigin) { + image.crossOrigin = crossOrigin; + } + + image.src = crossOriginUrl || url; + image.alt = element.alt || 'The image to crop'; + this.image = image; + image.onload = this.start.bind(this); + image.onerror = this.stop.bind(this); + addClass(image, CLASS_HIDE); + element.parentNode.insertBefore(image, element.nextSibling); + } + }, { + key: "start", + value: function start() { + var _this2 = this; + + var image = this.image; + image.onload = null; + image.onerror = null; + this.sizing = true; // Match all browsers that use WebKit as the layout engine in iOS devices, + // such as Safari for iOS, Chrome for iOS, and in-app browsers. + + var isIOSWebKit = WINDOW.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(WINDOW.navigator.userAgent); + + var done = function done(naturalWidth, naturalHeight) { + assign(_this2.imageData, { + naturalWidth: naturalWidth, + naturalHeight: naturalHeight, + aspectRatio: naturalWidth / naturalHeight + }); + _this2.sizing = false; + _this2.sized = true; + + _this2.build(); + }; // Most modern browsers (excepts iOS WebKit) + + + if (image.naturalWidth && !isIOSWebKit) { + done(image.naturalWidth, image.naturalHeight); + return; + } + + var sizingImage = document.createElement('img'); + var body = document.body || document.documentElement; + this.sizingImage = sizingImage; + + sizingImage.onload = function () { + done(sizingImage.width, sizingImage.height); + + if (!isIOSWebKit) { + body.removeChild(sizingImage); + } + }; + + sizingImage.src = image.src; // iOS WebKit will convert the image automatically + // with its orientation once append it into DOM (#279) + + if (!isIOSWebKit) { + sizingImage.style.cssText = 'left:0;' + 'max-height:none!important;' + 'max-width:none!important;' + 'min-height:0!important;' + 'min-width:0!important;' + 'opacity:0;' + 'position:absolute;' + 'top:0;' + 'z-index:-1;'; + body.appendChild(sizingImage); + } + } + }, { + key: "stop", + value: function stop() { + var image = this.image; + image.onload = null; + image.onerror = null; + image.parentNode.removeChild(image); + this.image = null; + } + }, { + key: "build", + value: function build() { + if (!this.sized || this.ready) { + return; + } + + var element = this.element, + options = this.options, + image = this.image; // Create cropper elements + + var container = element.parentNode; + var template = document.createElement('div'); + template.innerHTML = TEMPLATE; + var cropper = template.querySelector(".".concat(NAMESPACE, "-container")); + var canvas = cropper.querySelector(".".concat(NAMESPACE, "-canvas")); + var dragBox = cropper.querySelector(".".concat(NAMESPACE, "-drag-box")); + var cropBox = cropper.querySelector(".".concat(NAMESPACE, "-crop-box")); + var face = cropBox.querySelector(".".concat(NAMESPACE, "-face")); + this.container = container; + this.cropper = cropper; + this.canvas = canvas; + this.dragBox = dragBox; + this.cropBox = cropBox; + this.viewBox = cropper.querySelector(".".concat(NAMESPACE, "-view-box")); + this.face = face; + canvas.appendChild(image); // Hide the original image + + addClass(element, CLASS_HIDDEN); // Inserts the cropper after to the current image + + container.insertBefore(cropper, element.nextSibling); // Show the image if is hidden + + if (!this.isImg) { + removeClass(image, CLASS_HIDE); + } + + this.initPreview(); + this.bind(); + options.initialAspectRatio = Math.max(0, options.initialAspectRatio) || NaN; + options.aspectRatio = Math.max(0, options.aspectRatio) || NaN; + options.viewMode = Math.max(0, Math.min(3, Math.round(options.viewMode))) || 0; + addClass(cropBox, CLASS_HIDDEN); + + if (!options.guides) { + addClass(cropBox.getElementsByClassName("".concat(NAMESPACE, "-dashed")), CLASS_HIDDEN); + } + + if (!options.center) { + addClass(cropBox.getElementsByClassName("".concat(NAMESPACE, "-center")), CLASS_HIDDEN); + } + + if (options.background) { + addClass(cropper, "".concat(NAMESPACE, "-bg")); + } + + if (!options.highlight) { + addClass(face, CLASS_INVISIBLE); + } + + if (options.cropBoxMovable) { + addClass(face, CLASS_MOVE); + setData(face, DATA_ACTION, ACTION_ALL); + } + + if (!options.cropBoxResizable) { + addClass(cropBox.getElementsByClassName("".concat(NAMESPACE, "-line")), CLASS_HIDDEN); + addClass(cropBox.getElementsByClassName("".concat(NAMESPACE, "-point")), CLASS_HIDDEN); + } + + this.render(); + this.ready = true; + this.setDragMode(options.dragMode); + + if (options.autoCrop) { + this.crop(); + } + + this.setData(options.data); + + if (isFunction(options.ready)) { + addListener(element, EVENT_READY, options.ready, { + once: true + }); + } + + dispatchEvent(element, EVENT_READY); + } + }, { + key: "unbuild", + value: function unbuild() { + if (!this.ready) { + return; + } + + this.ready = false; + this.unbind(); + this.resetPreview(); + this.cropper.parentNode.removeChild(this.cropper); + removeClass(this.element, CLASS_HIDDEN); + } + }, { + key: "uncreate", + value: function uncreate() { + if (this.ready) { + this.unbuild(); + this.ready = false; + this.cropped = false; + } else if (this.sizing) { + this.sizingImage.onload = null; + this.sizing = false; + this.sized = false; + } else if (this.reloading) { + this.xhr.onabort = null; + this.xhr.abort(); + } else if (this.image) { + this.stop(); + } + } + /** + * Get the no conflict cropper class. + * @returns {Cropper} The cropper class. + */ + + }], [{ + key: "noConflict", + value: function noConflict() { + window.Cropper = AnotherCropper; + return Cropper; + } + /** + * Change the default options. + * @param {Object} options - The new default options. + */ + + }, { + key: "setDefaults", + value: function setDefaults(options) { + assign(DEFAULTS, isPlainObject(options) && options); + } + }]); + + return Cropper; + }(); + + assign(Cropper.prototype, render, preview, events, handlers, change, methods); + + return Cropper; + +}))); + +},{}],15:[function(require,module,exports){ +/** + * cuid.js + * Collision-resistant UID generator for browsers and node. + * Sequential for fast db lookups and recency sorting. + * Safe for element IDs and server-side lookups. + * + * Extracted from CLCTR + * + * Copyright (c) Eric Elliott 2012 + * MIT License + */ + +var fingerprint = require('./lib/fingerprint.js'); +var pad = require('./lib/pad.js'); +var getRandomValue = require('./lib/getRandomValue.js'); + +var c = 0, + blockSize = 4, + base = 36, + discreteValues = Math.pow(base, blockSize); + +function randomBlock () { + return pad((getRandomValue() * + discreteValues << 0) + .toString(base), blockSize); +} + +function safeCounter () { + c = c < discreteValues ? c : 0; + c++; // this is not subliminal + return c - 1; +} + +function cuid () { + // Starting with a lowercase letter makes + // it HTML element ID friendly. + var letter = 'c', // hard-coded allows for sequential access + + // timestamp + // warning: this exposes the exact date and time + // that the uid was created. + timestamp = (new Date().getTime()).toString(base), + + // Prevent same-machine collisions. + counter = pad(safeCounter().toString(base), blockSize), + + // A few chars to generate distinct ids for different + // clients (so different computers are far less + // likely to generate the same id) + print = fingerprint(), + + // Grab some more chars from Math.random() + random = randomBlock() + randomBlock(); + + return letter + timestamp + counter + print + random; +} + +cuid.slug = function slug () { + var date = new Date().getTime().toString(36), + counter = safeCounter().toString(36).slice(-4), + print = fingerprint().slice(0, 1) + + fingerprint().slice(-1), + random = randomBlock().slice(-2); + + return date.slice(-2) + + counter + print + random; +}; + +cuid.isCuid = function isCuid (stringToCheck) { + if (typeof stringToCheck !== 'string') return false; + if (stringToCheck.startsWith('c')) return true; + return false; +}; + +cuid.isSlug = function isSlug (stringToCheck) { + if (typeof stringToCheck !== 'string') return false; + var stringLength = stringToCheck.length; + if (stringLength >= 7 && stringLength <= 10) return true; + return false; +}; + +cuid.fingerprint = fingerprint; + +module.exports = cuid; + +},{"./lib/fingerprint.js":16,"./lib/getRandomValue.js":17,"./lib/pad.js":18}],16:[function(require,module,exports){ +var pad = require('./pad.js'); + +var env = typeof window === 'object' ? window : self; +var globalCount = Object.keys(env).length; +var mimeTypesLength = navigator.mimeTypes ? navigator.mimeTypes.length : 0; +var clientId = pad((mimeTypesLength + + navigator.userAgent.length).toString(36) + + globalCount.toString(36), 4); + +module.exports = function fingerprint () { + return clientId; +}; + +},{"./pad.js":18}],17:[function(require,module,exports){ + +var getRandomValue; + +var crypto = typeof window !== 'undefined' && + (window.crypto || window.msCrypto) || + typeof self !== 'undefined' && + self.crypto; + +if (crypto) { + var lim = Math.pow(2, 32) - 1; + getRandomValue = function () { + return Math.abs(crypto.getRandomValues(new Uint32Array(1))[0] / lim); + }; +} else { + getRandomValue = Math.random; +} + +module.exports = getRandomValue; + +},{}],18:[function(require,module,exports){ +module.exports = function pad (num, size) { + var s = '000000000' + num; + return s.substr(s.length - size); +}; + +},{}],19:[function(require,module,exports){ +/** + * Module dependencies. + */ + +var keys = require('./keys'); +var hasBinary = require('has-binary2'); +var sliceBuffer = require('arraybuffer.slice'); +var after = require('after'); +var utf8 = require('./utf8'); + +var base64encoder; +if (typeof ArrayBuffer !== 'undefined') { + base64encoder = require('base64-arraybuffer'); +} + +/** + * Check if we are running an android browser. That requires us to use + * ArrayBuffer with polling transports... + * + * http://ghinda.net/jpeg-blob-ajax-android/ + */ + +var isAndroid = typeof navigator !== 'undefined' && /Android/i.test(navigator.userAgent); + +/** + * Check if we are running in PhantomJS. + * Uploading a Blob with PhantomJS does not work correctly, as reported here: + * https://github.com/ariya/phantomjs/issues/11395 + * @type boolean + */ +var isPhantomJS = typeof navigator !== 'undefined' && /PhantomJS/i.test(navigator.userAgent); + +/** + * When true, avoids using Blobs to encode payloads. + * @type boolean + */ +var dontSendBlobs = isAndroid || isPhantomJS; + +/** + * Current protocol version. + */ + +exports.protocol = 3; + +/** + * Packet types. + */ + +var packets = exports.packets = { + open: 0 // non-ws + , close: 1 // non-ws + , ping: 2 + , pong: 3 + , message: 4 + , upgrade: 5 + , noop: 6 +}; + +var packetslist = keys(packets); + +/** + * Premade error packet. + */ + +var err = { type: 'error', data: 'parser error' }; + +/** + * Create a blob api even for blob builder when vendor prefixes exist + */ + +var Blob = require('blob'); + +/** + * Encodes a packet. + * + * [ ] + * + * Example: + * + * 5hello world + * 3 + * 4 + * + * Binary is encoded in an identical principle + * + * @api private + */ + +exports.encodePacket = function (packet, supportsBinary, utf8encode, callback) { + if (typeof supportsBinary === 'function') { + callback = supportsBinary; + supportsBinary = false; + } + + if (typeof utf8encode === 'function') { + callback = utf8encode; + utf8encode = null; + } + + var data = (packet.data === undefined) + ? undefined + : packet.data.buffer || packet.data; + + if (typeof ArrayBuffer !== 'undefined' && data instanceof ArrayBuffer) { + return encodeArrayBuffer(packet, supportsBinary, callback); + } else if (typeof Blob !== 'undefined' && data instanceof Blob) { + return encodeBlob(packet, supportsBinary, callback); + } + + // might be an object with { base64: true, data: dataAsBase64String } + if (data && data.base64) { + return encodeBase64Object(packet, callback); + } + + // Sending data as a utf-8 string + var encoded = packets[packet.type]; + + // data fragment is optional + if (undefined !== packet.data) { + encoded += utf8encode ? utf8.encode(String(packet.data), { strict: false }) : String(packet.data); + } + + return callback('' + encoded); + +}; + +function encodeBase64Object(packet, callback) { + // packet data is an object { base64: true, data: dataAsBase64String } + var message = 'b' + exports.packets[packet.type] + packet.data.data; + return callback(message); +} + +/** + * Encode packet helpers for binary types + */ + +function encodeArrayBuffer(packet, supportsBinary, callback) { + if (!supportsBinary) { + return exports.encodeBase64Packet(packet, callback); + } + + var data = packet.data; + var contentArray = new Uint8Array(data); + var resultBuffer = new Uint8Array(1 + data.byteLength); + + resultBuffer[0] = packets[packet.type]; + for (var i = 0; i < contentArray.length; i++) { + resultBuffer[i+1] = contentArray[i]; + } + + return callback(resultBuffer.buffer); +} + +function encodeBlobAsArrayBuffer(packet, supportsBinary, callback) { + if (!supportsBinary) { + return exports.encodeBase64Packet(packet, callback); + } + + var fr = new FileReader(); + fr.onload = function() { + exports.encodePacket({ type: packet.type, data: fr.result }, supportsBinary, true, callback); + }; + return fr.readAsArrayBuffer(packet.data); +} + +function encodeBlob(packet, supportsBinary, callback) { + if (!supportsBinary) { + return exports.encodeBase64Packet(packet, callback); + } + + if (dontSendBlobs) { + return encodeBlobAsArrayBuffer(packet, supportsBinary, callback); + } + + var length = new Uint8Array(1); + length[0] = packets[packet.type]; + var blob = new Blob([length.buffer, packet.data]); + + return callback(blob); +} + +/** + * Encodes a packet with binary data in a base64 string + * + * @param {Object} packet, has `type` and `data` + * @return {String} base64 encoded message + */ + +exports.encodeBase64Packet = function(packet, callback) { + var message = 'b' + exports.packets[packet.type]; + if (typeof Blob !== 'undefined' && packet.data instanceof Blob) { + var fr = new FileReader(); + fr.onload = function() { + var b64 = fr.result.split(',')[1]; + callback(message + b64); + }; + return fr.readAsDataURL(packet.data); + } + + var b64data; + try { + b64data = String.fromCharCode.apply(null, new Uint8Array(packet.data)); + } catch (e) { + // iPhone Safari doesn't let you apply with typed arrays + var typed = new Uint8Array(packet.data); + var basic = new Array(typed.length); + for (var i = 0; i < typed.length; i++) { + basic[i] = typed[i]; + } + b64data = String.fromCharCode.apply(null, basic); + } + message += btoa(b64data); + return callback(message); +}; + +/** + * Decodes a packet. Changes format to Blob if requested. + * + * @return {Object} with `type` and `data` (if any) + * @api private + */ + +exports.decodePacket = function (data, binaryType, utf8decode) { + if (data === undefined) { + return err; + } + // String data + if (typeof data === 'string') { + if (data.charAt(0) === 'b') { + return exports.decodeBase64Packet(data.substr(1), binaryType); + } + + if (utf8decode) { + data = tryDecode(data); + if (data === false) { + return err; + } + } + var type = data.charAt(0); + + if (Number(type) != type || !packetslist[type]) { + return err; + } + + if (data.length > 1) { + return { type: packetslist[type], data: data.substring(1) }; + } else { + return { type: packetslist[type] }; + } + } + + var asArray = new Uint8Array(data); + var type = asArray[0]; + var rest = sliceBuffer(data, 1); + if (Blob && binaryType === 'blob') { + rest = new Blob([rest]); + } + return { type: packetslist[type], data: rest }; +}; + +function tryDecode(data) { + try { + data = utf8.decode(data, { strict: false }); + } catch (e) { + return false; + } + return data; +} + +/** + * Decodes a packet encoded in a base64 string + * + * @param {String} base64 encoded message + * @return {Object} with `type` and `data` (if any) + */ + +exports.decodeBase64Packet = function(msg, binaryType) { + var type = packetslist[msg.charAt(0)]; + if (!base64encoder) { + return { type: type, data: { base64: true, data: msg.substr(1) } }; + } + + var data = base64encoder.decode(msg.substr(1)); + + if (binaryType === 'blob' && Blob) { + data = new Blob([data]); + } + + return { type: type, data: data }; +}; + +/** + * Encodes multiple messages (payload). + * + * :data + * + * Example: + * + * 11:hello world2:hi + * + * If any contents are binary, they will be encoded as base64 strings. Base64 + * encoded strings are marked with a b before the length specifier + * + * @param {Array} packets + * @api private + */ + +exports.encodePayload = function (packets, supportsBinary, callback) { + if (typeof supportsBinary === 'function') { + callback = supportsBinary; + supportsBinary = null; + } + + var isBinary = hasBinary(packets); + + if (supportsBinary && isBinary) { + if (Blob && !dontSendBlobs) { + return exports.encodePayloadAsBlob(packets, callback); + } + + return exports.encodePayloadAsArrayBuffer(packets, callback); + } + + if (!packets.length) { + return callback('0:'); + } + + function setLengthHeader(message) { + return message.length + ':' + message; + } + + function encodeOne(packet, doneCallback) { + exports.encodePacket(packet, !isBinary ? false : supportsBinary, false, function(message) { + doneCallback(null, setLengthHeader(message)); + }); + } + + map(packets, encodeOne, function(err, results) { + return callback(results.join('')); + }); +}; + +/** + * Async array map using after + */ + +function map(ary, each, done) { + var result = new Array(ary.length); + var next = after(ary.length, done); + + var eachWithIndex = function(i, el, cb) { + each(el, function(error, msg) { + result[i] = msg; + cb(error, result); + }); + }; + + for (var i = 0; i < ary.length; i++) { + eachWithIndex(i, ary[i], next); + } +} + +/* + * Decodes data when a payload is maybe expected. Possible binary contents are + * decoded from their base64 representation + * + * @param {String} data, callback method + * @api public + */ + +exports.decodePayload = function (data, binaryType, callback) { + if (typeof data !== 'string') { + return exports.decodePayloadAsBinary(data, binaryType, callback); + } + + if (typeof binaryType === 'function') { + callback = binaryType; + binaryType = null; + } + + var packet; + if (data === '') { + // parser error - ignoring payload + return callback(err, 0, 1); + } + + var length = '', n, msg; + + for (var i = 0, l = data.length; i < l; i++) { + var chr = data.charAt(i); + + if (chr !== ':') { + length += chr; + continue; + } + + if (length === '' || (length != (n = Number(length)))) { + // parser error - ignoring payload + return callback(err, 0, 1); + } + + msg = data.substr(i + 1, n); + + if (length != msg.length) { + // parser error - ignoring payload + return callback(err, 0, 1); + } + + if (msg.length) { + packet = exports.decodePacket(msg, binaryType, false); + + if (err.type === packet.type && err.data === packet.data) { + // parser error in individual packet - ignoring payload + return callback(err, 0, 1); + } + + var ret = callback(packet, i + n, l); + if (false === ret) return; + } + + // advance cursor + i += n; + length = ''; + } + + if (length !== '') { + // parser error - ignoring payload + return callback(err, 0, 1); + } + +}; + +/** + * Encodes multiple messages (payload) as binary. + * + * <1 = binary, 0 = string>[...] + * + * Example: + * 1 3 255 1 2 3, if the binary contents are interpreted as 8 bit integers + * + * @param {Array} packets + * @return {ArrayBuffer} encoded payload + * @api private + */ + +exports.encodePayloadAsArrayBuffer = function(packets, callback) { + if (!packets.length) { + return callback(new ArrayBuffer(0)); + } + + function encodeOne(packet, doneCallback) { + exports.encodePacket(packet, true, true, function(data) { + return doneCallback(null, data); + }); + } + + map(packets, encodeOne, function(err, encodedPackets) { + var totalLength = encodedPackets.reduce(function(acc, p) { + var len; + if (typeof p === 'string'){ + len = p.length; + } else { + len = p.byteLength; + } + return acc + len.toString().length + len + 2; // string/binary identifier + separator = 2 + }, 0); + + var resultArray = new Uint8Array(totalLength); + + var bufferIndex = 0; + encodedPackets.forEach(function(p) { + var isString = typeof p === 'string'; + var ab = p; + if (isString) { + var view = new Uint8Array(p.length); + for (var i = 0; i < p.length; i++) { + view[i] = p.charCodeAt(i); + } + ab = view.buffer; + } + + if (isString) { // not true binary + resultArray[bufferIndex++] = 0; + } else { // true binary + resultArray[bufferIndex++] = 1; + } + + var lenStr = ab.byteLength.toString(); + for (var i = 0; i < lenStr.length; i++) { + resultArray[bufferIndex++] = parseInt(lenStr[i]); + } + resultArray[bufferIndex++] = 255; + + var view = new Uint8Array(ab); + for (var i = 0; i < view.length; i++) { + resultArray[bufferIndex++] = view[i]; + } + }); + + return callback(resultArray.buffer); + }); +}; + +/** + * Encode as Blob + */ + +exports.encodePayloadAsBlob = function(packets, callback) { + function encodeOne(packet, doneCallback) { + exports.encodePacket(packet, true, true, function(encoded) { + var binaryIdentifier = new Uint8Array(1); + binaryIdentifier[0] = 1; + if (typeof encoded === 'string') { + var view = new Uint8Array(encoded.length); + for (var i = 0; i < encoded.length; i++) { + view[i] = encoded.charCodeAt(i); + } + encoded = view.buffer; + binaryIdentifier[0] = 0; + } + + var len = (encoded instanceof ArrayBuffer) + ? encoded.byteLength + : encoded.size; + + var lenStr = len.toString(); + var lengthAry = new Uint8Array(lenStr.length + 1); + for (var i = 0; i < lenStr.length; i++) { + lengthAry[i] = parseInt(lenStr[i]); + } + lengthAry[lenStr.length] = 255; + + if (Blob) { + var blob = new Blob([binaryIdentifier.buffer, lengthAry.buffer, encoded]); + doneCallback(null, blob); + } + }); + } + + map(packets, encodeOne, function(err, results) { + return callback(new Blob(results)); + }); +}; + +/* + * Decodes data when a payload is maybe expected. Strings are decoded by + * interpreting each byte as a key code for entries marked to start with 0. See + * description of encodePayloadAsBinary + * + * @param {ArrayBuffer} data, callback method + * @api public + */ + +exports.decodePayloadAsBinary = function (data, binaryType, callback) { + if (typeof binaryType === 'function') { + callback = binaryType; + binaryType = null; + } + + var bufferTail = data; + var buffers = []; + + while (bufferTail.byteLength > 0) { + var tailArray = new Uint8Array(bufferTail); + var isString = tailArray[0] === 0; + var msgLength = ''; + + for (var i = 1; ; i++) { + if (tailArray[i] === 255) break; + + // 310 = char length of Number.MAX_VALUE + if (msgLength.length > 310) { + return callback(err, 0, 1); + } + + msgLength += tailArray[i]; + } + + bufferTail = sliceBuffer(bufferTail, 2 + msgLength.length); + msgLength = parseInt(msgLength); + + var msg = sliceBuffer(bufferTail, 0, msgLength); + if (isString) { + try { + msg = String.fromCharCode.apply(null, new Uint8Array(msg)); + } catch (e) { + // iPhone Safari doesn't let you apply to typed arrays + var typed = new Uint8Array(msg); + msg = ''; + for (var i = 0; i < typed.length; i++) { + msg += String.fromCharCode(typed[i]); + } + } + } + + buffers.push(msg); + bufferTail = sliceBuffer(bufferTail, msgLength); + } + + var total = buffers.length; + buffers.forEach(function(buffer, i) { + callback(exports.decodePacket(buffer, binaryType, true), i, total); + }); +}; + +},{"./keys":20,"./utf8":21,"after":3,"arraybuffer.slice":4,"base64-arraybuffer":6,"blob":8,"has-binary2":26}],20:[function(require,module,exports){ + +/** + * Gets the keys for an object. + * + * @return {Array} keys + * @api private + */ + +module.exports = Object.keys || function keys (obj){ + var arr = []; + var has = Object.prototype.hasOwnProperty; + + for (var i in obj) { + if (has.call(obj, i)) { + arr.push(i); + } + } + return arr; +}; + +},{}],21:[function(require,module,exports){ +/*! https://mths.be/utf8js v2.1.2 by @mathias */ + +var stringFromCharCode = String.fromCharCode; + +// Taken from https://mths.be/punycode +function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + var value; + var extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +// Taken from https://mths.be/punycode +function ucs2encode(array) { + var length = array.length; + var index = -1; + var value; + var output = ''; + while (++index < length) { + value = array[index]; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + } + return output; +} + +function checkScalarValue(codePoint, strict) { + if (codePoint >= 0xD800 && codePoint <= 0xDFFF) { + if (strict) { + throw Error( + 'Lone surrogate U+' + codePoint.toString(16).toUpperCase() + + ' is not a scalar value' + ); + } + return false; + } + return true; +} +/*--------------------------------------------------------------------------*/ + +function createByte(codePoint, shift) { + return stringFromCharCode(((codePoint >> shift) & 0x3F) | 0x80); +} + +function encodeCodePoint(codePoint, strict) { + if ((codePoint & 0xFFFFFF80) == 0) { // 1-byte sequence + return stringFromCharCode(codePoint); + } + var symbol = ''; + if ((codePoint & 0xFFFFF800) == 0) { // 2-byte sequence + symbol = stringFromCharCode(((codePoint >> 6) & 0x1F) | 0xC0); + } + else if ((codePoint & 0xFFFF0000) == 0) { // 3-byte sequence + if (!checkScalarValue(codePoint, strict)) { + codePoint = 0xFFFD; + } + symbol = stringFromCharCode(((codePoint >> 12) & 0x0F) | 0xE0); + symbol += createByte(codePoint, 6); + } + else if ((codePoint & 0xFFE00000) == 0) { // 4-byte sequence + symbol = stringFromCharCode(((codePoint >> 18) & 0x07) | 0xF0); + symbol += createByte(codePoint, 12); + symbol += createByte(codePoint, 6); + } + symbol += stringFromCharCode((codePoint & 0x3F) | 0x80); + return symbol; +} + +function utf8encode(string, opts) { + opts = opts || {}; + var strict = false !== opts.strict; + + var codePoints = ucs2decode(string); + var length = codePoints.length; + var index = -1; + var codePoint; + var byteString = ''; + while (++index < length) { + codePoint = codePoints[index]; + byteString += encodeCodePoint(codePoint, strict); + } + return byteString; +} + +/*--------------------------------------------------------------------------*/ + +function readContinuationByte() { + if (byteIndex >= byteCount) { + throw Error('Invalid byte index'); + } + + var continuationByte = byteArray[byteIndex] & 0xFF; + byteIndex++; + + if ((continuationByte & 0xC0) == 0x80) { + return continuationByte & 0x3F; + } + + // If we end up here, it’s not a continuation byte + throw Error('Invalid continuation byte'); +} + +function decodeSymbol(strict) { + var byte1; + var byte2; + var byte3; + var byte4; + var codePoint; + + if (byteIndex > byteCount) { + throw Error('Invalid byte index'); + } + + if (byteIndex == byteCount) { + return false; + } + + // Read first byte + byte1 = byteArray[byteIndex] & 0xFF; + byteIndex++; + + // 1-byte sequence (no continuation bytes) + if ((byte1 & 0x80) == 0) { + return byte1; + } + + // 2-byte sequence + if ((byte1 & 0xE0) == 0xC0) { + byte2 = readContinuationByte(); + codePoint = ((byte1 & 0x1F) << 6) | byte2; + if (codePoint >= 0x80) { + return codePoint; + } else { + throw Error('Invalid continuation byte'); + } + } + + // 3-byte sequence (may include unpaired surrogates) + if ((byte1 & 0xF0) == 0xE0) { + byte2 = readContinuationByte(); + byte3 = readContinuationByte(); + codePoint = ((byte1 & 0x0F) << 12) | (byte2 << 6) | byte3; + if (codePoint >= 0x0800) { + return checkScalarValue(codePoint, strict) ? codePoint : 0xFFFD; + } else { + throw Error('Invalid continuation byte'); + } + } + + // 4-byte sequence + if ((byte1 & 0xF8) == 0xF0) { + byte2 = readContinuationByte(); + byte3 = readContinuationByte(); + byte4 = readContinuationByte(); + codePoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0C) | + (byte3 << 0x06) | byte4; + if (codePoint >= 0x010000 && codePoint <= 0x10FFFF) { + return codePoint; + } + } + + throw Error('Invalid UTF-8 detected'); +} + +var byteArray; +var byteCount; +var byteIndex; +function utf8decode(byteString, opts) { + opts = opts || {}; + var strict = false !== opts.strict; + + byteArray = ucs2decode(byteString); + byteCount = byteArray.length; + byteIndex = 0; + var codePoints = []; + var tmp; + while ((tmp = decodeSymbol(strict)) !== false) { + codePoints.push(tmp); + } + return ucs2encode(codePoints); +} + +module.exports = { + version: '2.1.2', + encode: utf8encode, + decode: utf8decode +}; + +},{}],22:[function(require,module,exports){ +// This file can be required in Browserify and Node.js for automatic polyfill +// To use it: require('es6-promise/auto'); +'use strict'; +module.exports = require('./').polyfill(); + +},{"./":23}],23:[function(require,module,exports){ +(function (process,global){(function (){ +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.8+1e68dce6 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.ES6Promise = factory()); +}(this, (function () { 'use strict'; + +function objectOrFunction(x) { + var type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +} + +function isFunction(x) { + return typeof x === 'function'; +} + + + +var _isArray = void 0; +if (Array.isArray) { + _isArray = Array.isArray; +} else { + _isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; +} + +var isArray = _isArray; + +var len = 0; +var vertxNext = void 0; +var customSchedulerFn = void 0; + +var asap = function asap(callback, arg) { + queue[len] = callback; + queue[len + 1] = arg; + len += 2; + if (len === 2) { + // If len is 2, that means that we need to schedule an async flush. + // If additional callbacks are queued before the queue is flushed, they + // will be processed by this flush that we are scheduling. + if (customSchedulerFn) { + customSchedulerFn(flush); + } else { + scheduleFlush(); + } + } +}; + +function setScheduler(scheduleFn) { + customSchedulerFn = scheduleFn; +} + +function setAsap(asapFn) { + asap = asapFn; +} + +var browserWindow = typeof window !== 'undefined' ? window : undefined; +var browserGlobal = browserWindow || {}; +var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; +var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + +// test for web worker but not in IE10 +var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined'; + +// node +function useNextTick() { + // node version 0.10.x displays a deprecation warning when nextTick is used recursively + // see https://github.com/cujojs/when/issues/410 for details + return function () { + return process.nextTick(flush); + }; +} + +// vertx +function useVertxTimer() { + if (typeof vertxNext !== 'undefined') { + return function () { + vertxNext(flush); + }; + } + + return useSetTimeout(); +} + +function useMutationObserver() { + var iterations = 0; + var observer = new BrowserMutationObserver(flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + + return function () { + node.data = iterations = ++iterations % 2; + }; +} + +// web worker +function useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = flush; + return function () { + return channel.port2.postMessage(0); + }; +} + +function useSetTimeout() { + // Store setTimeout reference so es6-promise will be unaffected by + // other code modifying setTimeout (like sinon.useFakeTimers()) + var globalSetTimeout = setTimeout; + return function () { + return globalSetTimeout(flush, 1); + }; +} + +var queue = new Array(1000); +function flush() { + for (var i = 0; i < len; i += 2) { + var callback = queue[i]; + var arg = queue[i + 1]; + + callback(arg); + + queue[i] = undefined; + queue[i + 1] = undefined; + } + + len = 0; +} + +function attemptVertx() { + try { + var vertx = Function('return this')().require('vertx'); + vertxNext = vertx.runOnLoop || vertx.runOnContext; + return useVertxTimer(); + } catch (e) { + return useSetTimeout(); + } +} + +var scheduleFlush = void 0; +// Decide what async method to use to triggering processing of queued callbacks: +if (isNode) { + scheduleFlush = useNextTick(); +} else if (BrowserMutationObserver) { + scheduleFlush = useMutationObserver(); +} else if (isWorker) { + scheduleFlush = useMessageChannel(); +} else if (browserWindow === undefined && typeof require === 'function') { + scheduleFlush = attemptVertx(); +} else { + scheduleFlush = useSetTimeout(); +} + +function then(onFulfillment, onRejection) { + var parent = this; + + var child = new this.constructor(noop); + + if (child[PROMISE_ID] === undefined) { + makePromise(child); + } + + var _state = parent._state; + + + if (_state) { + var callback = arguments[_state - 1]; + asap(function () { + return invokeCallback(_state, child, callback, parent._result); + }); + } else { + subscribe(parent, child, onFulfillment, onRejection); + } + + return child; +} + +/** + `Promise.resolve` returns a promise that will become resolved with the + passed `value`. It is shorthand for the following: + + ```javascript + let promise = new Promise(function(resolve, reject){ + resolve(1); + }); + + promise.then(function(value){ + // value === 1 + }); + ``` + + Instead of writing the above, your code now simply becomes the following: + + ```javascript + let promise = Promise.resolve(1); + + promise.then(function(value){ + // value === 1 + }); + ``` + + @method resolve + @static + @param {Any} value value that the returned promise will be resolved with + Useful for tooling. + @return {Promise} a promise that will become fulfilled with the given + `value` +*/ +function resolve$1(object) { + /*jshint validthis:true */ + var Constructor = this; + + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + + var promise = new Constructor(noop); + resolve(promise, object); + return promise; +} + +var PROMISE_ID = Math.random().toString(36).substring(2); + +function noop() {} + +var PENDING = void 0; +var FULFILLED = 1; +var REJECTED = 2; + +function selfFulfillment() { + return new TypeError("You cannot resolve a promise with itself"); +} + +function cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); +} + +function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) { + try { + then$$1.call(value, fulfillmentHandler, rejectionHandler); + } catch (e) { + return e; + } +} + +function handleForeignThenable(promise, thenable, then$$1) { + asap(function (promise) { + var sealed = false; + var error = tryThen(then$$1, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + resolve(promise, value); + } else { + fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + + reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + + if (!sealed && error) { + sealed = true; + reject(promise, error); + } + }, promise); +} + +function handleOwnThenable(promise, thenable) { + if (thenable._state === FULFILLED) { + fulfill(promise, thenable._result); + } else if (thenable._state === REJECTED) { + reject(promise, thenable._result); + } else { + subscribe(thenable, undefined, function (value) { + return resolve(promise, value); + }, function (reason) { + return reject(promise, reason); + }); + } +} + +function handleMaybeThenable(promise, maybeThenable, then$$1) { + if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) { + handleOwnThenable(promise, maybeThenable); + } else { + if (then$$1 === undefined) { + fulfill(promise, maybeThenable); + } else if (isFunction(then$$1)) { + handleForeignThenable(promise, maybeThenable, then$$1); + } else { + fulfill(promise, maybeThenable); + } + } +} + +function resolve(promise, value) { + if (promise === value) { + reject(promise, selfFulfillment()); + } else if (objectOrFunction(value)) { + var then$$1 = void 0; + try { + then$$1 = value.then; + } catch (error) { + reject(promise, error); + return; + } + handleMaybeThenable(promise, value, then$$1); + } else { + fulfill(promise, value); + } +} + +function publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + + publish(promise); +} + +function fulfill(promise, value) { + if (promise._state !== PENDING) { + return; + } + + promise._result = value; + promise._state = FULFILLED; + + if (promise._subscribers.length !== 0) { + asap(publish, promise); + } +} + +function reject(promise, reason) { + if (promise._state !== PENDING) { + return; + } + promise._state = REJECTED; + promise._result = reason; + + asap(publishRejection, promise); +} + +function subscribe(parent, child, onFulfillment, onRejection) { + var _subscribers = parent._subscribers; + var length = _subscribers.length; + + + parent._onerror = null; + + _subscribers[length] = child; + _subscribers[length + FULFILLED] = onFulfillment; + _subscribers[length + REJECTED] = onRejection; + + if (length === 0 && parent._state) { + asap(publish, parent); + } +} + +function publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + + if (subscribers.length === 0) { + return; + } + + var child = void 0, + callback = void 0, + detail = promise._result; + + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + + if (child) { + invokeCallback(settled, child, callback, detail); + } else { + callback(detail); + } + } + + promise._subscribers.length = 0; +} + +function invokeCallback(settled, promise, callback, detail) { + var hasCallback = isFunction(callback), + value = void 0, + error = void 0, + succeeded = true; + + if (hasCallback) { + try { + value = callback(detail); + } catch (e) { + succeeded = false; + error = e; + } + + if (promise === value) { + reject(promise, cannotReturnOwn()); + return; + } + } else { + value = detail; + } + + if (promise._state !== PENDING) { + // noop + } else if (hasCallback && succeeded) { + resolve(promise, value); + } else if (succeeded === false) { + reject(promise, error); + } else if (settled === FULFILLED) { + fulfill(promise, value); + } else if (settled === REJECTED) { + reject(promise, value); + } +} + +function initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + resolve(promise, value); + }, function rejectPromise(reason) { + reject(promise, reason); + }); + } catch (e) { + reject(promise, e); + } +} + +var id = 0; +function nextId() { + return id++; +} + +function makePromise(promise) { + promise[PROMISE_ID] = id++; + promise._state = undefined; + promise._result = undefined; + promise._subscribers = []; +} + +function validationError() { + return new Error('Array Methods must be provided an Array'); +} + +var Enumerator = function () { + function Enumerator(Constructor, input) { + this._instanceConstructor = Constructor; + this.promise = new Constructor(noop); + + if (!this.promise[PROMISE_ID]) { + makePromise(this.promise); + } + + if (isArray(input)) { + this.length = input.length; + this._remaining = input.length; + + this._result = new Array(this.length); + + if (this.length === 0) { + fulfill(this.promise, this._result); + } else { + this.length = this.length || 0; + this._enumerate(input); + if (this._remaining === 0) { + fulfill(this.promise, this._result); + } + } + } else { + reject(this.promise, validationError()); + } + } + + Enumerator.prototype._enumerate = function _enumerate(input) { + for (var i = 0; this._state === PENDING && i < input.length; i++) { + this._eachEntry(input[i], i); + } + }; + + Enumerator.prototype._eachEntry = function _eachEntry(entry, i) { + var c = this._instanceConstructor; + var resolve$$1 = c.resolve; + + + if (resolve$$1 === resolve$1) { + var _then = void 0; + var error = void 0; + var didError = false; + try { + _then = entry.then; + } catch (e) { + didError = true; + error = e; + } + + if (_then === then && entry._state !== PENDING) { + this._settledAt(entry._state, i, entry._result); + } else if (typeof _then !== 'function') { + this._remaining--; + this._result[i] = entry; + } else if (c === Promise$1) { + var promise = new c(noop); + if (didError) { + reject(promise, error); + } else { + handleMaybeThenable(promise, entry, _then); + } + this._willSettleAt(promise, i); + } else { + this._willSettleAt(new c(function (resolve$$1) { + return resolve$$1(entry); + }), i); + } + } else { + this._willSettleAt(resolve$$1(entry), i); + } + }; + + Enumerator.prototype._settledAt = function _settledAt(state, i, value) { + var promise = this.promise; + + + if (promise._state === PENDING) { + this._remaining--; + + if (state === REJECTED) { + reject(promise, value); + } else { + this._result[i] = value; + } + } + + if (this._remaining === 0) { + fulfill(promise, this._result); + } + }; + + Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) { + var enumerator = this; + + subscribe(promise, undefined, function (value) { + return enumerator._settledAt(FULFILLED, i, value); + }, function (reason) { + return enumerator._settledAt(REJECTED, i, reason); + }); + }; + + return Enumerator; +}(); + +/** + `Promise.all` accepts an array of promises, and returns a new promise which + is fulfilled with an array of fulfillment values for the passed promises, or + rejected with the reason of the first passed promise to be rejected. It casts all + elements of the passed iterable to promises as it runs this algorithm. + + Example: + + ```javascript + let promise1 = resolve(1); + let promise2 = resolve(2); + let promise3 = resolve(3); + let promises = [ promise1, promise2, promise3 ]; + + Promise.all(promises).then(function(array){ + // The array here would be [ 1, 2, 3 ]; + }); + ``` + + If any of the `promises` given to `all` are rejected, the first promise + that is rejected will be given as an argument to the returned promises's + rejection handler. For example: + + Example: + + ```javascript + let promise1 = resolve(1); + let promise2 = reject(new Error("2")); + let promise3 = reject(new Error("3")); + let promises = [ promise1, promise2, promise3 ]; + + Promise.all(promises).then(function(array){ + // Code here never runs because there are rejected promises! + }, function(error) { + // error.message === "2" + }); + ``` + + @method all + @static + @param {Array} entries array of promises + @param {String} label optional string for labeling the promise. + Useful for tooling. + @return {Promise} promise that is fulfilled when all `promises` have been + fulfilled, or rejected if any of them become rejected. + @static +*/ +function all(entries) { + return new Enumerator(this, entries).promise; +} + +/** + `Promise.race` returns a new promise which is settled in the same way as the + first passed promise to settle. + + Example: + + ```javascript + let promise1 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 1'); + }, 200); + }); + + let promise2 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 2'); + }, 100); + }); + + Promise.race([promise1, promise2]).then(function(result){ + // result === 'promise 2' because it was resolved before promise1 + // was resolved. + }); + ``` + + `Promise.race` is deterministic in that only the state of the first + settled promise matters. For example, even if other promises given to the + `promises` array argument are resolved, but the first settled promise has + become rejected before the other promises became fulfilled, the returned + promise will become rejected: + + ```javascript + let promise1 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 1'); + }, 200); + }); + + let promise2 = new Promise(function(resolve, reject){ + setTimeout(function(){ + reject(new Error('promise 2')); + }, 100); + }); + + Promise.race([promise1, promise2]).then(function(result){ + // Code here never runs + }, function(reason){ + // reason.message === 'promise 2' because promise 2 became rejected before + // promise 1 became fulfilled + }); + ``` + + An example real-world use case is implementing timeouts: + + ```javascript + Promise.race([ajax('foo.json'), timeout(5000)]) + ``` + + @method race + @static + @param {Array} promises array of promises to observe + Useful for tooling. + @return {Promise} a promise which settles in the same way as the first passed + promise to settle. +*/ +function race(entries) { + /*jshint validthis:true */ + var Constructor = this; + + if (!isArray(entries)) { + return new Constructor(function (_, reject) { + return reject(new TypeError('You must pass an array to race.')); + }); + } else { + return new Constructor(function (resolve, reject) { + var length = entries.length; + for (var i = 0; i < length; i++) { + Constructor.resolve(entries[i]).then(resolve, reject); + } + }); + } +} + +/** + `Promise.reject` returns a promise rejected with the passed `reason`. + It is shorthand for the following: + + ```javascript + let promise = new Promise(function(resolve, reject){ + reject(new Error('WHOOPS')); + }); + + promise.then(function(value){ + // Code here doesn't run because the promise is rejected! + }, function(reason){ + // reason.message === 'WHOOPS' + }); + ``` + + Instead of writing the above, your code now simply becomes the following: + + ```javascript + let promise = Promise.reject(new Error('WHOOPS')); + + promise.then(function(value){ + // Code here doesn't run because the promise is rejected! + }, function(reason){ + // reason.message === 'WHOOPS' + }); + ``` + + @method reject + @static + @param {Any} reason value that the returned promise will be rejected with. + Useful for tooling. + @return {Promise} a promise rejected with the given `reason`. +*/ +function reject$1(reason) { + /*jshint validthis:true */ + var Constructor = this; + var promise = new Constructor(noop); + reject(promise, reason); + return promise; +} + +function needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); +} + +function needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); +} + +/** + Promise objects represent the eventual result of an asynchronous operation. The + primary way of interacting with a promise is through its `then` method, which + registers callbacks to receive either a promise's eventual value or the reason + why the promise cannot be fulfilled. + + Terminology + ----------- + + - `promise` is an object or function with a `then` method whose behavior conforms to this specification. + - `thenable` is an object or function that defines a `then` method. + - `value` is any legal JavaScript value (including undefined, a thenable, or a promise). + - `exception` is a value that is thrown using the throw statement. + - `reason` is a value that indicates why a promise was rejected. + - `settled` the final resting state of a promise, fulfilled or rejected. + + A promise can be in one of three states: pending, fulfilled, or rejected. + + Promises that are fulfilled have a fulfillment value and are in the fulfilled + state. Promises that are rejected have a rejection reason and are in the + rejected state. A fulfillment value is never a thenable. + + Promises can also be said to *resolve* a value. If this value is also a + promise, then the original promise's settled state will match the value's + settled state. So a promise that *resolves* a promise that rejects will + itself reject, and a promise that *resolves* a promise that fulfills will + itself fulfill. + + + Basic Usage: + ------------ + + ```js + let promise = new Promise(function(resolve, reject) { + // on success + resolve(value); + + // on failure + reject(reason); + }); + + promise.then(function(value) { + // on fulfillment + }, function(reason) { + // on rejection + }); + ``` + + Advanced Usage: + --------------- + + Promises shine when abstracting away asynchronous interactions such as + `XMLHttpRequest`s. + + ```js + function getJSON(url) { + return new Promise(function(resolve, reject){ + let xhr = new XMLHttpRequest(); + + xhr.open('GET', url); + xhr.onreadystatechange = handler; + xhr.responseType = 'json'; + xhr.setRequestHeader('Accept', 'application/json'); + xhr.send(); + + function handler() { + if (this.readyState === this.DONE) { + if (this.status === 200) { + resolve(this.response); + } else { + reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']')); + } + } + }; + }); + } + + getJSON('/posts.json').then(function(json) { + // on fulfillment + }, function(reason) { + // on rejection + }); + ``` + + Unlike callbacks, promises are great composable primitives. + + ```js + Promise.all([ + getJSON('/posts'), + getJSON('/comments') + ]).then(function(values){ + values[0] // => postsJSON + values[1] // => commentsJSON + + return values; + }); + ``` + + @class Promise + @param {Function} resolver + Useful for tooling. + @constructor +*/ + +var Promise$1 = function () { + function Promise(resolver) { + this[PROMISE_ID] = nextId(); + this._result = this._state = undefined; + this._subscribers = []; + + if (noop !== resolver) { + typeof resolver !== 'function' && needsResolver(); + this instanceof Promise ? initializePromise(this, resolver) : needsNew(); + } + } + + /** + The primary way of interacting with a promise is through its `then` method, + which registers callbacks to receive either a promise's eventual value or the + reason why the promise cannot be fulfilled. + ```js + findUser().then(function(user){ + // user is available + }, function(reason){ + // user is unavailable, and you are given the reason why + }); + ``` + Chaining + -------- + The return value of `then` is itself a promise. This second, 'downstream' + promise is resolved with the return value of the first promise's fulfillment + or rejection handler, or rejected if the handler throws an exception. + ```js + findUser().then(function (user) { + return user.name; + }, function (reason) { + return 'default name'; + }).then(function (userName) { + // If `findUser` fulfilled, `userName` will be the user's name, otherwise it + // will be `'default name'` + }); + findUser().then(function (user) { + throw new Error('Found user, but still unhappy'); + }, function (reason) { + throw new Error('`findUser` rejected and we're unhappy'); + }).then(function (value) { + // never reached + }, function (reason) { + // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'. + // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'. + }); + ``` + If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. + ```js + findUser().then(function (user) { + throw new PedagogicalException('Upstream error'); + }).then(function (value) { + // never reached + }).then(function (value) { + // never reached + }, function (reason) { + // The `PedgagocialException` is propagated all the way down to here + }); + ``` + Assimilation + ------------ + Sometimes the value you want to propagate to a downstream promise can only be + retrieved asynchronously. This can be achieved by returning a promise in the + fulfillment or rejection handler. The downstream promise will then be pending + until the returned promise is settled. This is called *assimilation*. + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // The user's comments are now available + }); + ``` + If the assimliated promise rejects, then the downstream promise will also reject. + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // If `findCommentsByAuthor` fulfills, we'll have the value here + }, function (reason) { + // If `findCommentsByAuthor` rejects, we'll have the reason here + }); + ``` + Simple Example + -------------- + Synchronous Example + ```javascript + let result; + try { + result = findResult(); + // success + } catch(reason) { + // failure + } + ``` + Errback Example + ```js + findResult(function(result, err){ + if (err) { + // failure + } else { + // success + } + }); + ``` + Promise Example; + ```javascript + findResult().then(function(result){ + // success + }, function(reason){ + // failure + }); + ``` + Advanced Example + -------------- + Synchronous Example + ```javascript + let author, books; + try { + author = findAuthor(); + books = findBooksByAuthor(author); + // success + } catch(reason) { + // failure + } + ``` + Errback Example + ```js + function foundBooks(books) { + } + function failure(reason) { + } + findAuthor(function(author, err){ + if (err) { + failure(err); + // failure + } else { + try { + findBoooksByAuthor(author, function(books, err) { + if (err) { + failure(err); + } else { + try { + foundBooks(books); + } catch(reason) { + failure(reason); + } + } + }); + } catch(error) { + failure(err); + } + // success + } + }); + ``` + Promise Example; + ```javascript + findAuthor(). + then(findBooksByAuthor). + then(function(books){ + // found books + }).catch(function(reason){ + // something went wrong + }); + ``` + @method then + @param {Function} onFulfilled + @param {Function} onRejected + Useful for tooling. + @return {Promise} + */ + + /** + `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same + as the catch block of a try/catch statement. + ```js + function findAuthor(){ + throw new Error('couldn't find that author'); + } + // synchronous + try { + findAuthor(); + } catch(reason) { + // something went wrong + } + // async with promises + findAuthor().catch(function(reason){ + // something went wrong + }); + ``` + @method catch + @param {Function} onRejection + Useful for tooling. + @return {Promise} + */ + + + Promise.prototype.catch = function _catch(onRejection) { + return this.then(null, onRejection); + }; + + /** + `finally` will be invoked regardless of the promise's fate just as native + try/catch/finally behaves + + Synchronous example: + + ```js + findAuthor() { + if (Math.random() > 0.5) { + throw new Error(); + } + return new Author(); + } + + try { + return findAuthor(); // succeed or fail + } catch(error) { + return findOtherAuther(); + } finally { + // always runs + // doesn't affect the return value + } + ``` + + Asynchronous example: + + ```js + findAuthor().catch(function(reason){ + return findOtherAuther(); + }).finally(function(){ + // author was either found, or not + }); + ``` + + @method finally + @param {Function} callback + @return {Promise} + */ + + + Promise.prototype.finally = function _finally(callback) { + var promise = this; + var constructor = promise.constructor; + + if (isFunction(callback)) { + return promise.then(function (value) { + return constructor.resolve(callback()).then(function () { + return value; + }); + }, function (reason) { + return constructor.resolve(callback()).then(function () { + throw reason; + }); + }); + } + + return promise.then(callback, callback); + }; + + return Promise; +}(); + +Promise$1.prototype.then = then; +Promise$1.all = all; +Promise$1.race = race; +Promise$1.resolve = resolve$1; +Promise$1.reject = reject$1; +Promise$1._setScheduler = setScheduler; +Promise$1._setAsap = setAsap; +Promise$1._asap = asap; + +/*global self*/ +function polyfill() { + var local = void 0; + + if (typeof global !== 'undefined') { + local = global; + } else if (typeof self !== 'undefined') { + local = self; + } else { + try { + local = Function('return this')(); + } catch (e) { + throw new Error('polyfill failed because global object is unavailable in this environment'); + } + } + + var P = local.Promise; + + if (P) { + var promiseToString = null; + try { + promiseToString = Object.prototype.toString.call(P.resolve()); + } catch (e) { + // silently ignored + } + + if (promiseToString === '[object Promise]' && !P.cast) { + return; + } + } + + local.Promise = Promise$1; +} + +// Strange compat.. +Promise$1.polyfill = polyfill; +Promise$1.Promise = Promise$1; + +return Promise$1; + +}))); + + + + + +}).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"_process":39}],24:[function(require,module,exports){ +(function (process,global,Buffer){(function (){ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("exifr",["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).exifr={})}(this,(function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:0;return this.substring(t,t+e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length;return this.substring(t-e.length,t)===e});var A="undefined"!=typeof self?self:global,w=A.fetch||function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var i=new XMLHttpRequest;if(i.open("get",e,!0),i.responseType="arraybuffer",i.onerror=r,t.headers)for(var a in t.headers)i.setRequestHeader(a,t.headers[a]);i.onload=function(){n({ok:i.status>=200&&i.status<300,status:i.status,arrayBuffer:function(){return Promise.resolve(i.response)}})},i.send(null)}))},O=function(e){var t=[];if(Object.defineProperties(t,{size:{get:function(){return this.length}},has:{value:function(e){return-1!==this.indexOf(e)}},add:{value:function(e){this.has(e)||this.push(e)}},delete:{value:function(e){if(this.has(e)){var t=this.indexOf(e);this.splice(t,1)}}}}),Array.isArray(e))for(var n=0;n=0}},{key:"delete",value:function(e){var t=this._keys.indexOf(e);return!(t<0)&&(delete this._map["map_"+e],this._keys.splice(t,1),!0)}},{key:"keys",value:function(){return this._keys.slice(0)}},{key:"values",value:function(){var e=this;return this._keys.map((function(t){return e.get(t)}))}},{key:"entries",value:function(){var e=this;return this._keys.map((function(t){return[t,e.get(t)]}))}},{key:"forEach",value:function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;if(t(this,e),"boolean"==typeof a&&(this.le=a),Array.isArray(n)&&(n=new Uint8Array(n)),0===n)this.byteOffset=0,this.byteLength=0;else if(n instanceof ArrayBuffer){void 0===i&&(i=n.byteLength-r);var s=new DataView(n,r,i);this._swapDataView(s)}else if(n instanceof Uint8Array||n instanceof DataView||n instanceof e){void 0===i&&(i=n.byteLength-r),(r+=n.byteOffset)+i>n.byteOffset+n.byteLength&&L("Creating view outside of available memory in ArrayBuffer");var u=new DataView(n.buffer,r,i);this._swapDataView(u)}else if("number"==typeof n){var o=new DataView(new ArrayBuffer(n));this._swapDataView(o)}else L("Invalid input argument for BufferView: "+n)}return r(e,[{key:"_swapArrayBuffer",value:function(e){this._swapDataView(new DataView(e))}},{key:"_swapBuffer",value:function(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e.byteLength))}},{key:"_swapDataView",value:function(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=e.byteOffset,this.byteLength=e.byteLength}},{key:"_lengthToEnd",value:function(e){return this.byteLength-e}},{key:"set",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;t instanceof DataView||t instanceof e?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t instanceof ArrayBuffer&&(t=new Uint8Array(t)),t instanceof Uint8Array||L("BufferView.set(): Invalid data argument.");var i=this.toUint8();return i.set(t,n),new r(this,n,t.byteLength)}},{key:"subarray",value:function(t,n){return new e(this,t,n=n||this._lengthToEnd(t))}},{key:"toUint8",value:function(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}},{key:"getUint8Array",value:function(e,t){return new Uint8Array(this.buffer,this.byteOffset+e,t)}},{key:"getString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.byteLength,n=this.getUint8Array(e,t);return E(n)}},{key:"getLatin1String",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.byteLength,n=this.getUint8Array(e,t);return z(n)}},{key:"getUnicodeString",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.byteLength,n=[],r=0;r1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getInt16(e,t)}},{key:"getInt32",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getInt32(e,t)}},{key:"getUint16",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getUint16(e,t)}},{key:"getUint32",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getUint32(e,t)}},{key:"getFloat32",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat32(e,t)}},{key:"getFloat64",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat64(e,t)}},{key:"getFloat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat32(e,t)}},{key:"getDouble",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat64(e,t)}},{key:"getUintBytes",value:function(e,t,n){switch(t){case 1:return this.getUint8(e,n);case 2:return this.getUint16(e,n);case 4:return this.getUint32(e,n);case 8:return this.getUint64&&this.getUint64(e,n)}}},{key:"getUint",value:function(e,t,n){switch(t){case 8:return this.getUint8(e,n);case 16:return this.getUint16(e,n);case 32:return this.getUint32(e,n);case 64:return this.getUint64&&this.getUint64(e,n)}}},{key:"toString",value:function(e){return this.dataView.toString(e,this.constructor.name)}},{key:"ensureChunk",value:function(){}}],[{key:"from",value:function(t,n){return t instanceof this&&t.le===n?t:new e(t,void 0,void 0,n)}}]),e}();function R(e,t){L("".concat(e," '").concat(t,"' was not loaded, try using full build of exifr."))}var N=function(e){a(i,e);var n=d(i);function i(e){var r;return t(this,i),(r=n.call(this)).kind=e,r}return r(i,[{key:"get",value:function(e,t){return this.has(e)||R(this.kind,e),t&&(e in t||function(e,t){L("Unknown ".concat(e," '").concat(t,"'."))}(this.kind,e),t[e].enabled||R(this.kind,e)),v(s(i.prototype),"get",this).call(this,e)}},{key:"keyList",value:function(){return m(this.keys())}}]),i}(c(P)),M=new N("file parser"),W=new N("segment parser"),K=new N("file reader");function H(e){return function(){for(var t=[],n=0;n1e4?q(e,t,"base64"):x?Q(e,t,"url",G):B?q(e,t,"fs"):void L(Z);var n}var ee=function(e){a(i,e);var n=d(i);function i(){return t(this,i),n.apply(this,arguments)}return r(i,[{key:"tagKeys",get:function(){return this.allKeys||(this.allKeys=m(this.keys())),this.allKeys}},{key:"tagValues",get:function(){return this.allValues||(this.allValues=m(this.values())),this.allValues}}]),i}(c(P));function te(e,t,n){var r=new ee,i=n;Array.isArray(i)||("function"==typeof i.entries&&(i=i.entries()),i=m(i));for(var a=0;a0&&o.translateTagSet(a,o.pick);else if("object"==typeof a){if(o.enabled=!0,o.parse=!1!==a.parse,o.canBeFiltered){var f=a.pick,c=a.skip;f&&f.length>0&&o.translateTagSet(f,o.pick),c&&c.length>0&&o.translateTagSet(c,o.skip)}o.applyInheritables(a)}else!0===a||!1===a?o.parse=o.enabled=a:L("Invalid options argument: ".concat(a));return o}return r(s,[{key:"needed",get:function(){return this.enabled||this.deps.size>0}},{key:"applyInheritables",value:function(e){var t,n,r=me;Array.isArray(r)||("function"==typeof r.entries&&(r=r.entries()),r=m(r));for(var i=0;i0?(this.enabled=!0,Ce(this.pick,this.deps)):this.enabled&&this.pick.size>0&&Ce(this.pick,this.deps)}}]),s}(Ae),Oe={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},Se=S(),Pe=function(e){a(i,e);var n=d(i);function i(e){var r;return t(this,i),r=n.call(this),!0===e?r.setupFromTrue():void 0===e?r.setupFromUndefined():Array.isArray(e)?r.setupFromArray(e):"object"==typeof e?r.setupFromObject(e):L("Invalid options argument ".concat(e)),void 0===r.firstChunkSize&&(r.firstChunkSize=x?r.firstChunkSizeBrowser:r.firstChunkSizeNode),r.mergeOutput&&(r.ifd1.enabled=!1),r.filterNestedSegmentTags(),r.traverseTiffDependencyTree(),r.checkLoadedPlugins(),r}return r(i,[{key:"setupFromUndefined",value:function(){var e,t=de;Array.isArray(t)||("function"==typeof t.entries&&(t=t.entries()),t=m(t));for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:n;if(e&&e.length){var i=r;Array.isArray(i)||("function"==typeof i.entries&&(i=i.entries()),i=m(i));for(var a=0;a0&&(t.errors=n),I(r=t)?void 0:r;var r}))}catch(e){return Promise.reject(e)}}},{key:"doParse",value:function(e,t){try{var n=this;return Be(n.fileParser.parse(),(function(){var r,i=p(n.parsers).map((r=function(t){return Be(t.parse(),(function(n){t.assignToOutput(e,n)}))},function(){for(var e=[],t=0;ti+a?e.chunk=s.file.subarray(i,a):void 0===e.size?e.chunk=s.file.subarray(i):L("Segment unreachable: "+JSON.stringify(e))},n=function(){return e.chunk},(r=t())&&r.then?r.then(n):n(r)}))),this.extendOptions&&this.extendOptions(n),this.options=n,this.file=r,this.parsers=a}return r(e,[{key:"injectSegment",value:function(e,t){this.options[e].enabled&&this.createParser(e,t)}},{key:"createParser",value:function(e,t){var n=new(W.get(e))(t,this.options,this.file);return this.parsers[e]=n}},{key:"createParsers",value:function(e){var t=e;Array.isArray(t)||("function"==typeof t.entries&&(t=t.entries()),t=m(t));for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0;t(this,e),i(this,"errors",[]),i(this,"raw",S()),i(this,"handleError",(function(e){if(!r.options.silentErrors)throw e;r.errors.push(e.message)})),this.chunk=this.normalizeInput(n),this.file=s,this.type=this.constructor.type,this.globalOptions=this.options=a,this.localOptions=a[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}return r(e,[{key:"normalizeInput",value:function(e){return e instanceof D?e:new D(e)}},{key:"translate",value:function(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}},{key:"output",get:function(){return this.translated?this.translated:this.raw?k(this.raw):void 0}},{key:"translateBlock",value:function(e,t){var n=ae.get(t),r=ie.get(t),i=re.get(t),a=this.options[t],s=a.reviveValues&&!!n,u=a.translateValues&&!!r,o=a.translateKeys&&!!i,f={},c=e;Array.isArray(c)||("function"==typeof c.entries&&(c=c.entries()),c=m(c));for(var h=0;h1&&void 0!==arguments[1]?arguments[1]:{},n=new Pe(i({},this.type,t)),r=new this(e,n);return r.parse()}}]),e}();function Re(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}i(De,"headerLength",4),i(De,"type",void 0),i(De,"multiSegment",!1),i(De,"canHandle",(function(){return!1}));function Ne(){}function Me(e,t){if(!t)return e&&e.then?e.then(Ne):Promise.resolve()}function We(e){var t=e();if(t&&t.then)return t.then(Ne)}function Ke(e,t){var n=e();return n&&n.then?n.then(t):t(n)}function He(e,t,n){if(!e.s){if(n instanceof Xe){if(!n.s)return void(n.o=He.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(He.bind(null,e,t),He.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}var Xe=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,i=this.s;if(i){var a=1&i?t:n;if(a){try{He(r,1,a(this.v))}catch(e){He(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?He(r,1,t?t(i):i):n?He(r,1,n(i)):He(r,2,i)}catch(e){He(r,2,e)}},r},e}();function Ye(e){return e instanceof Xe&&1&e.s}function Ge(e,t,n){for(var r;;){var i=e();if(Ye(i)&&(i=i.v),!i)return a;if(i.then){r=0;break}var a=n();if(a&&a.then){if(!Ye(a)){r=1;break}a=a.s}if(t){var s=t();if(s&&s.then&&!Ye(s)){r=2;break}}}var u=new Xe,o=He.bind(null,u,2);return(0===r?i.then(c):1===r?a.then(f):s.then(h)).then(void 0,o),u;function f(r){a=r;do{if(t&&(s=t())&&s.then&&!Ye(s))return void s.then(h).then(void 0,o);if(!(i=e())||Ye(i)&&!i.v)return void He(u,1,a);if(i.then)return void i.then(c).then(void 0,o);Ye(a=n())&&(a=a.v)}while(!a||!a.then);a.then(f).then(void 0,o)}function c(e){e?(a=n())&&a.then?a.then(f).then(void 0,o):f(a):He(u,1,a)}function h(){(i=e())?i.then?i.then(c).then(void 0,o):c(i):He(u,1,a)}}function Je(e){return 192===e||194===e||196===e||219===e||221===e||218===e||254===e}function qe(e){return e>=224&&e<=239}function Qe(e,t,n){var r=W;Array.isArray(r)||("function"==typeof r.entries&&(r=r.entries()),r=m(r));for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;try{var n=this;n.setupSegmentFinderArgs(t);var r=n.file,i=n.findAll,a=n.wanted,s=n.remaining;return Ke((function(){if(!i&&n.file.chunked)return i=m(a).some((function(e){var t=W.get(e),r=n.options[e];return t.multiSegment&&r.multiSegment})),We((function(){if(i)return Me(n.file.readWhole())}))}),(function(){var t=!1;if(e=n.findAppSegmentsInRange(e,r.byteLength),!n.options.onlyTiff)return function(){if(r.chunked){var i=!1;return Ge((function(){return!t&&s.size>0&&!i&&(!!r.canReadNextChunk||!!n.unfinishedMultiSegment)}),void 0,(function(){var a=r.nextChunkOffset,s=n.appSegments.some((function(e){return!n.file.available(e.offset||e.start,e.length||e.size)}));return Ke((function(){return e>a&&!s?Re(r.readNextChunk(e),(function(e){i=!e})):Re(r.readNextChunk(a),(function(e){i=!e}))}),(function(){void 0===(e=n.findAppSegmentsInRange(e,r.byteLength))&&(t=!0)}))}))}}()}))}catch(e){return Promise.reject(e)}}},{key:"findAppSegmentsInRange",value:function(e,t){t-=2;for(var n,r,i,a,s,u,o=this.file,f=this.findAll,c=this.wanted,h=this.remaining,l=this.options;et.byteLength&&L("IFD0 offset points to outside of file.\nthis.ifd0Offset: ".concat(e.ifd0Offset,", file.byteLength: ").concat(t.byteLength)),tt((function(){if(t.tiff)return et(t.ensureChunk(e.ifd0Offset,T(e.options)))}),(function(){var t=e.parseBlock(e.ifd0Offset,"ifd0");if(0!==t.size)return e.exifOffset=t.get(ce),e.interopOffset=t.get(le),e.gpsOffset=t.get(he),e.xmp=t.get(700),e.iptc=t.get(oe),e.icc=t.get(fe),e.options.sanitize&&(t.delete(ce),t.delete(le),t.delete(he),t.delete(700),t.delete(oe),t.delete(fe)),t}))}catch(e){return Promise.reject(e)}}},{key:"parseExifBlock",value:function(){try{var e=this;if(e.exif)return;return tt((function(){if(!e.ifd0)return et(e.parseIfd0Block())}),(function(){if(void 0!==e.exifOffset)return tt((function(){if(e.file.tiff)return et(e.file.ensureChunk(e.exifOffset,T(e.options)))}),(function(){var t=e.parseBlock(e.exifOffset,"exif");return e.interopOffset||(e.interopOffset=t.get(le)),e.makerNote=t.get(se),e.userComment=t.get(ue),e.options.sanitize&&(t.delete(le),t.delete(se),t.delete(ue)),e.unpack(t,41728),e.unpack(t,41729),t}))}))}catch(e){return Promise.reject(e)}}},{key:"unpack",value:function(e,t){var n=e.get(t);n&&1===n.length&&e.set(t,n[0])}},{key:"parseGpsBlock",value:function(){try{var e=this;if(e.gps)return;return tt((function(){if(!e.ifd0)return et(e.parseIfd0Block())}),(function(){if(void 0!==e.gpsOffset){var t=e.parseBlock(e.gpsOffset,"gps");return t&&t.has(2)&&t.has(4)&&(t.set("latitude",it.apply(void 0,t.get(2).concat([t.get(1)]))),t.set("longitude",it.apply(void 0,t.get(4).concat([t.get(3)])))),t}}))}catch(e){return Promise.reject(e)}}},{key:"parseInteropBlock",value:function(){try{var e=this;if(e.interop)return;return tt((function(){if(!e.ifd0)return et(e.parseIfd0Block())}),(function(){return tt((function(){if(void 0===e.interopOffset&&!e.exif)return et(e.parseExifBlock())}),(function(){if(void 0!==e.interopOffset)return e.parseBlock(e.interopOffset,"interop")}))}))}catch(e){return Promise.reject(e)}}},{key:"parseThumbnailBlock",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var t=this;if(t.ifd1||t.ifd1Parsed)return;if(t.options.mergeOutput&&!e)return;return t.findIfd1Offset(),t.ifd1Offset>0&&(t.parseBlock(t.ifd1Offset,"ifd1"),t.ifd1Parsed=!0),t.ifd1}catch(e){return Promise.reject(e)}}},{key:"extractThumbnail",value:function(){try{var e=this;return e.headerParsed||e.parseHeader(),tt((function(){if(!e.ifd1Parsed)return et(e.parseThumbnailBlock(!0))}),(function(){if(void 0!==e.ifd1){var t=e.ifd1.get(513),n=e.ifd1.get(514);return e.chunk.getUint8Array(t,n)}}))}catch(e){return Promise.reject(e)}}},{key:"image",get:function(){return this.ifd0}},{key:"thumbnail",get:function(){return this.ifd1}},{key:"createOutput",value:function(){var e,t,n,r={},i=ye;Array.isArray(i)||("function"==typeof i.entries&&(i=i.entries()),i=m(i));for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:S(),r=this.options[t],i=r.pick,a=r.skip,s=(i=O(i)).size>0,u=0===a.size,o=this.chunk.getUint16(e);e+=2;for(var f=0;f13)&&L("Invalid TIFF value type. block: ".concat(n.toUpperCase(),", tag: ").concat(t.toString(16),", type: ").concat(a,", offset ").concat(e)),e>i.byteLength&&L("Invalid TIFF value offset. block: ".concat(n.toUpperCase(),", tag: ").concat(t.toString(16),", type: ").concat(a,", offset ").concat(e," is outside of chunk size ").concat(i.byteLength)),1===a)return i.getUint8Array(e,s);if(2===a)return""===(r=function(e){for(;e.endsWith("\0");)e=e.slice(0,-1);return e}(r=i.getString(e,s)).trim())?void 0:r;if(7===a)return i.getUint8Array(e,s);if(1===s)return this.parseTagValue(a,e);for(var o=new(function(e){switch(e){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 10:return Array;case 11:return Float32Array;case 12:return Float64Array;default:return Array}}(a))(s),f=u,c=0;cthis.byteLength){var a=this._extend(i).dataView;this._swapDataView(a)}}}},{key:"_extend",value:function(e){var t;t=_?j.allocUnsafe(e):new Uint8Array(e);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:n}}},{key:"subarray",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t=t||this._lengthToEnd(e),n&&this._tryExtend(e,t),this.ranges.add(e,t),v(s(u.prototype),"subarray",this).call(this,e,t)}},{key:"set",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n&&this._tryExtend(t,e.byteLength,e);var r=v(s(u.prototype),"set",this).call(this,e,t);return this.ranges.add(t,r.byteLength),r}},{key:"ensureChunk",value:function(e,t){try{var n=this;if(!n.chunked)return;if(n.ranges.available(e,t))return;return function(e,t){if(!t)return e&&e.then?e.then(Pt):Promise.resolve()}(n.readChunk(e,t))}catch(e){return Promise.reject(e)}}},{key:"available",value:function(e,t){return this.ranges.available(e,t)}}]),u}(D),xt=function(){function e(){t(this,e),i(this,"list",[])}return r(e,[{key:"length",get:function(){return this.list.length}},{key:"add",value:function(e,t){var n=e+t,r=this.list.filter((function(t){return Ct(e,t.offset,n)||Ct(e,t.end,n)}));if(r.length>0){e=Math.min.apply(Math,[e].concat(r.map((function(e){return e.offset})))),t=(n=Math.max.apply(Math,[n].concat(r.map((function(e){return e.end})))))-e;var i=r.shift();i.offset=e,i.length=t,i.end=n,this.list=this.list.filter((function(e){return!r.includes(e)}))}else this.list.push({offset:e,length:t,end:n})}},{key:"available",value:function(e,t){var n=e+t;return this.list.some((function(t){return t.offset<=e&&n<=t.end}))}}]),e}();function Ct(e,t,n){return e<=t&&t<=n}function Bt(){}function jt(e,t){if(!t)return e&&e.then?e.then(Bt):Promise.resolve()}function _t(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var Vt=function(e){a(i,e);var n=d(i);function i(){return t(this,i),n.apply(this,arguments)}return r(i,[{key:"readWhole",value:function(){try{var e=this;return e.chunked=!1,_t(Y(e.input),(function(t){e._swapArrayBuffer(t)}))}catch(e){return Promise.reject(e)}}},{key:"readChunked",value:function(){return this.chunked=!0,this.size=this.input.size,v(s(i.prototype),"readChunked",this).call(this)}},{key:"_readChunk",value:function(e,t){try{var n=this,r=t?e+t:void 0,i=n.input.slice(e,r);return _t(Y(i),(function(t){return n.set(t,e,!0)}))}catch(e){return Promise.reject(e)}}}]),i}(function(e){a(s,e);var n=d(s);function s(e,r){var a;return t(this,s),i(h(a=n.call(this,0)),"chunksRead",0),a.input=e,a.options=r,a}return r(s,[{key:"readWhole",value:function(){try{var e=this;return e.chunked=!1,jt(e.readChunk(e.nextChunkOffset))}catch(e){return Promise.reject(e)}}},{key:"readChunked",value:function(){try{var e=this;return e.chunked=!0,jt(e.readChunk(0,e.options.firstChunkSize))}catch(e){return Promise.reject(e)}}},{key:"readNextChunk",value:function(e){try{var t=this;if(void 0===e&&(e=t.nextChunkOffset),t.fullyRead)return t.chunksRead++,!1;var n=t.options.chunkSize;return r=t.readChunk(e,n),i=function(e){return!!e&&e.byteLength===n},a?i?i(r):r:(r&&r.then||(r=Promise.resolve(r)),i?r.then(i):r)}catch(e){return Promise.reject(e)}var r,i,a}},{key:"readChunk",value:function(e,t){try{var n=this;if(n.chunksRead++,0===(t=n.safeWrapAddress(e,t)))return;return n._readChunk(e,t)}catch(e){return Promise.reject(e)}}},{key:"safeWrapAddress",value:function(e,t){return void 0!==this.size&&e+t>this.size?Math.max(0,this.size-e):t}},{key:"nextChunkOffset",get:function(){if(0!==this.ranges.list.length)return this.ranges.list[0].length}},{key:"canReadNextChunk",get:function(){return this.chunksRead)>} an object containing + * submittable value(s) held in the form's .elements collection, with + * properties named as per element names or ids. + */ + +function getFormData(form) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { trim: false }; + + if (!form) { + throw new Error('A form is required by getFormData, was given form=' + form); + } + + var data = {}; + var elementName = void 0; + var elementNames = []; + var elementNameLookup = {}; + + // Get unique submittable element names for the form + for (var i = 0, l = form.elements.length; i < l; i++) { + var element = form.elements[i]; + if (IGNORED_ELEMENT_TYPES[element.type] || element.disabled) { + continue; + } + elementName = element.name || element.id; + if (elementName && !elementNameLookup[elementName]) { + elementNames.push(elementName); + elementNameLookup[elementName] = true; + } + } + + // Extract element data name-by-name for consistent handling of special cases + // around elements which contain multiple inputs. + for (var _i = 0, _l = elementNames.length; _i < _l; _i++) { + elementName = elementNames[_i]; + var value = getFieldData(form, elementName, options); + if (value != null) { + data[elementName] = value; + } + } + + return data; +} + +/** + * @param {HTMLFormElement} form + * @param {string} fieldName + * @param {Object} options + * @return {(string|Array.)} submittable value(s) in the form for a + * named element from its .elements collection, or null if there was no + * element with that name or the element had no submittable value(s). + */ +function getFieldData(form, fieldName) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { trim: false }; + + if (!form) { + throw new Error('A form is required by getFieldData, was given form=' + form); + } + if (!fieldName && toString.call(fieldName) !== '[object String]') { + throw new Error('A field name is required by getFieldData, was given fieldName=' + fieldName); + } + + var element = form.elements[fieldName]; + if (!element || element.disabled) { + return null; + } + + if (!NODE_LIST_CLASSES[toString.call(element)]) { + return getFormElementValue(element, options.trim); + } + + // Deal with multiple form controls which have the same name + var data = []; + var allRadios = true; + for (var i = 0, l = element.length; i < l; i++) { + if (element[i].disabled) { + continue; + } + if (allRadios && element[i].type !== 'radio') { + allRadios = false; + } + var value = getFormElementValue(element[i], options.trim); + if (value != null) { + data = data.concat(value); + } + } + + // Special case for an element with multiple same-named inputs which were all + // radio buttons: if there was a selected value, only return the value. + if (allRadios && data.length === 1) { + return data[0]; + } + + return data.length > 0 ? data : null; +} + +/** + * @param {HTMLElement} element a form element. + * @param {booleam} trim should values for text entry inputs be trimmed? + * @return {(string|Array.|File|Array.)} the element's submittable + * value(s), or null if it had none. + */ +function getFormElementValue(element, trim) { + var value = null; + var type = element.type; + + + if (type === 'select-one') { + if (element.options.length) { + value = element.options[element.selectedIndex].value; + } + return value; + } + + if (type === 'select-multiple') { + value = []; + for (var i = 0, l = element.options.length; i < l; i++) { + if (element.options[i].selected) { + value.push(element.options[i].value); + } + } + if (value.length === 0) { + value = null; + } + return value; + } + + // If a file input doesn't have a files attribute, fall through to using its + // value attribute. + if (type === 'file' && 'files' in element) { + if (element.multiple) { + value = slice.call(element.files); + if (value.length === 0) { + value = null; + } + } else { + // Should be null if not present, according to the spec + value = element.files[0]; + } + return value; + } + + if (!CHECKED_INPUT_TYPES[type]) { + value = trim ? element.value.replace(TRIM_RE, '') : element.value; + } else if (element.checked) { + value = element.value; + } + + return value; +} + +// For UMD build access to getFieldData +getFormData.getFieldData = getFieldData; +},{}],26:[function(require,module,exports){ +(function (Buffer){(function (){ +/* global Blob File */ + +/* + * Module requirements. + */ + +var isArray = require('isarray'); + +var toString = Object.prototype.toString; +var withNativeBlob = typeof Blob === 'function' || + typeof Blob !== 'undefined' && toString.call(Blob) === '[object BlobConstructor]'; +var withNativeFile = typeof File === 'function' || + typeof File !== 'undefined' && toString.call(File) === '[object FileConstructor]'; + +/** + * Module exports. + */ + +module.exports = hasBinary; + +/** + * Checks for binary data. + * + * Supports Buffer, ArrayBuffer, Blob and File. + * + * @param {Object} anything + * @api public + */ + +function hasBinary (obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + + if (isArray(obj)) { + for (var i = 0, l = obj.length; i < l; i++) { + if (hasBinary(obj[i])) { + return true; + } + } + return false; + } + + if ((typeof Buffer === 'function' && Buffer.isBuffer && Buffer.isBuffer(obj)) || + (typeof ArrayBuffer === 'function' && obj instanceof ArrayBuffer) || + (withNativeBlob && obj instanceof Blob) || + (withNativeFile && obj instanceof File) + ) { + return true; + } + + // see: https://github.com/Automattic/has-binary/pull/4 + if (obj.toJSON && typeof obj.toJSON === 'function' && arguments.length === 1) { + return hasBinary(obj.toJSON(), true); + } + + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) { + return true; + } + } + + return false; +} + +}).call(this)}).call(this,require("buffer").Buffer) + +},{"buffer":10,"isarray":27}],27:[function(require,module,exports){ +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + +},{}],28:[function(require,module,exports){ + +/** + * Module exports. + * + * Logic borrowed from Modernizr: + * + * - https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cors.js + */ + +try { + module.exports = typeof XMLHttpRequest !== 'undefined' && + 'withCredentials' in new XMLHttpRequest(); +} catch (err) { + // if XMLHttp support is disabled in IE then it will throw + // when trying to create + module.exports = false; +} + +},{}],29:[function(require,module,exports){ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],30:[function(require,module,exports){ + +var indexOf = [].indexOf; + +module.exports = function(arr, obj){ + if (indexOf) return arr.indexOf(obj); + for (var i = 0; i < arr.length; ++i) { + if (arr[i] === obj) return i; + } + return -1; +}; +},{}],31:[function(require,module,exports){ +module.exports = function isShallowEqual (a, b) { + if (a === b) return true + for (var i in a) if (!(i in b)) return false + for (var i in b) if (a[i] !== b[i]) return false + return true +} + +},{}],32:[function(require,module,exports){ +(function (global){(function (){ +/* + * base64.js + * + * Licensed under the BSD 3-Clause License. + * http://opensource.org/licenses/BSD-3-Clause + * + * References: + * http://en.wikipedia.org/wiki/Base64 + */ +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + ? module.exports = factory(global) + : typeof define === 'function' && define.amd + ? define(factory) : factory(global) +}(( + typeof self !== 'undefined' ? self + : typeof window !== 'undefined' ? window + : typeof global !== 'undefined' ? global +: this +), function(global) { + 'use strict'; + // existing version for noConflict() + global = global || {}; + var _Base64 = global.Base64; + var version = "2.6.4"; + // constants + var b64chars + = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + var b64tab = function(bin) { + var t = {}; + for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i; + return t; + }(b64chars); + var fromCharCode = String.fromCharCode; + // encoder stuff + var cb_utob = function(c) { + if (c.length < 2) { + var cc = c.charCodeAt(0); + return cc < 0x80 ? c + : cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6)) + + fromCharCode(0x80 | (cc & 0x3f))) + : (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f)) + + fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) + + fromCharCode(0x80 | ( cc & 0x3f))); + } else { + var cc = 0x10000 + + (c.charCodeAt(0) - 0xD800) * 0x400 + + (c.charCodeAt(1) - 0xDC00); + return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07)) + + fromCharCode(0x80 | ((cc >>> 12) & 0x3f)) + + fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) + + fromCharCode(0x80 | ( cc & 0x3f))); + } + }; + var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; + var utob = function(u) { + return u.replace(re_utob, cb_utob); + }; + var cb_encode = function(ccc) { + var padlen = [0, 2, 1][ccc.length % 3], + ord = ccc.charCodeAt(0) << 16 + | ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8) + | ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)), + chars = [ + b64chars.charAt( ord >>> 18), + b64chars.charAt((ord >>> 12) & 63), + padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63), + padlen >= 1 ? '=' : b64chars.charAt(ord & 63) + ]; + return chars.join(''); + }; + var btoa = global.btoa && typeof global.btoa == 'function' + ? function(b){ return global.btoa(b) } : function(b) { + if (b.match(/[^\x00-\xFF]/)) throw new RangeError( + 'The string contains invalid characters.' + ); + return b.replace(/[\s\S]{1,3}/g, cb_encode); + }; + var _encode = function(u) { + return btoa(utob(String(u))); + }; + var mkUriSafe = function (b64) { + return b64.replace(/[+\/]/g, function(m0) { + return m0 == '+' ? '-' : '_'; + }).replace(/=/g, ''); + }; + var encode = function(u, urisafe) { + return urisafe ? mkUriSafe(_encode(u)) : _encode(u); + }; + var encodeURI = function(u) { return encode(u, true) }; + var fromUint8Array; + if (global.Uint8Array) fromUint8Array = function(a, urisafe) { + // return btoa(fromCharCode.apply(null, a)); + var b64 = ''; + for (var i = 0, l = a.length; i < l; i += 3) { + var a0 = a[i], a1 = a[i+1], a2 = a[i+2]; + var ord = a0 << 16 | a1 << 8 | a2; + b64 += b64chars.charAt( ord >>> 18) + + b64chars.charAt((ord >>> 12) & 63) + + ( typeof a1 != 'undefined' + ? b64chars.charAt((ord >>> 6) & 63) : '=') + + ( typeof a2 != 'undefined' + ? b64chars.charAt( ord & 63) : '='); + } + return urisafe ? mkUriSafe(b64) : b64; + }; + // decoder stuff + var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g; + var cb_btou = function(cccc) { + switch(cccc.length) { + case 4: + var cp = ((0x07 & cccc.charCodeAt(0)) << 18) + | ((0x3f & cccc.charCodeAt(1)) << 12) + | ((0x3f & cccc.charCodeAt(2)) << 6) + | (0x3f & cccc.charCodeAt(3)), + offset = cp - 0x10000; + return (fromCharCode((offset >>> 10) + 0xD800) + + fromCharCode((offset & 0x3FF) + 0xDC00)); + case 3: + return fromCharCode( + ((0x0f & cccc.charCodeAt(0)) << 12) + | ((0x3f & cccc.charCodeAt(1)) << 6) + | (0x3f & cccc.charCodeAt(2)) + ); + default: + return fromCharCode( + ((0x1f & cccc.charCodeAt(0)) << 6) + | (0x3f & cccc.charCodeAt(1)) + ); + } + }; + var btou = function(b) { + return b.replace(re_btou, cb_btou); + }; + var cb_decode = function(cccc) { + var len = cccc.length, + padlen = len % 4, + n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0) + | (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0) + | (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0) + | (len > 3 ? b64tab[cccc.charAt(3)] : 0), + chars = [ + fromCharCode( n >>> 16), + fromCharCode((n >>> 8) & 0xff), + fromCharCode( n & 0xff) + ]; + chars.length -= [0, 0, 2, 1][padlen]; + return chars.join(''); + }; + var _atob = global.atob && typeof global.atob == 'function' + ? function(a){ return global.atob(a) } : function(a){ + return a.replace(/\S{1,4}/g, cb_decode); + }; + var atob = function(a) { + return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, '')); + }; + var _decode = function(a) { return btou(_atob(a)) }; + var _fromURI = function(a) { + return String(a).replace(/[-_]/g, function(m0) { + return m0 == '-' ? '+' : '/' + }).replace(/[^A-Za-z0-9\+\/]/g, ''); + }; + var decode = function(a){ + return _decode(_fromURI(a)); + }; + var toUint8Array; + if (global.Uint8Array) toUint8Array = function(a) { + return Uint8Array.from(atob(_fromURI(a)), function(c) { + return c.charCodeAt(0); + }); + }; + var noConflict = function() { + var Base64 = global.Base64; + global.Base64 = _Base64; + return Base64; + }; + // export Base64 + global.Base64 = { + VERSION: version, + atob: atob, + btoa: btoa, + fromBase64: decode, + toBase64: encode, + utob: utob, + encode: encode, + encodeURI: encodeURI, + btou: btou, + decode: decode, + noConflict: noConflict, + fromUint8Array: fromUint8Array, + toUint8Array: toUint8Array + }; + // if ES5 is available, make Base64.extendString() available + if (typeof Object.defineProperty === 'function') { + var noEnum = function(v){ + return {value:v,enumerable:false,writable:true,configurable:true}; + }; + global.Base64.extendString = function () { + Object.defineProperty( + String.prototype, 'fromBase64', noEnum(function () { + return decode(this) + })); + Object.defineProperty( + String.prototype, 'toBase64', noEnum(function (urisafe) { + return encode(this, urisafe) + })); + Object.defineProperty( + String.prototype, 'toBase64URI', noEnum(function () { + return encode(this, true) + })); + }; + } + // + // export Base64 to the namespace + // + if (global['Meteor']) { // Meteor.js + Base64 = global.Base64; + } + // module.exports and AMD are mutually exclusive. + // module.exports has precedence. + if (typeof module !== 'undefined' && module.exports) { + module.exports.Base64 = global.Base64; + } + else if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define([], function(){ return global.Base64 }); + } + // that's it! + return {Base64: global.Base64} +})); + +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{}],33:[function(require,module,exports){ +(function (global){(function (){ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return root.Date.now(); +}; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; + + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +module.exports = debounce; + +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{}],34:[function(require,module,exports){ +(function (global){(function (){ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return root.Date.now(); +}; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; + + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +/** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ +function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +module.exports = throttle; + +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{}],35:[function(require,module,exports){ +'use strict'; +module.exports = Math.log2 || function (x) { + return Math.log(x) * Math.LOG2E; +}; + +},{}],36:[function(require,module,exports){ +'use strict'; + +function areInputsEqual(newInputs, lastInputs) { + if (newInputs.length !== lastInputs.length) { + return false; + } + for (var i = 0; i < newInputs.length; i++) { + if (newInputs[i] !== lastInputs[i]) { + return false; + } + } + return true; +} + +function memoizeOne(resultFn, isEqual) { + if (isEqual === void 0) { isEqual = areInputsEqual; } + var lastThis; + var lastArgs = []; + var lastResult; + var calledOnce = false; + function memoized() { + var newArgs = []; + for (var _i = 0; _i < arguments.length; _i++) { + newArgs[_i] = arguments[_i]; + } + if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) { + return lastResult; + } + lastResult = resultFn.apply(this, newArgs); + calledOnce = true; + lastThis = this; + lastArgs = newArgs; + return lastResult; + } + return memoized; +} + +module.exports = memoizeOne; + +},{}],37:[function(require,module,exports){ +var wildcard = require('wildcard'); +var reMimePartSplit = /[\/\+\.]/; + +/** + # mime-match + + A simple function to checker whether a target mime type matches a mime-type + pattern (e.g. image/jpeg matches image/jpeg OR image/*). + + ## Example Usage + + <<< example.js + +**/ +module.exports = function(target, pattern) { + function test(pattern) { + var result = wildcard(pattern, target, reMimePartSplit); + + // ensure that we have a valid mime type (should have two parts) + return result && result.length >= 2; + } + + return pattern ? test(pattern.split(';')[0]) : test; +}; + +},{"wildcard":61}],38:[function(require,module,exports){ +/** +* Create an event emitter with namespaces +* @name createNamespaceEmitter +* @example +* var emitter = require('./index')() +* +* emitter.on('*', function () { +* console.log('all events emitted', this.event) +* }) +* +* emitter.on('example', function () { +* console.log('example event emitted') +* }) +*/ +module.exports = function createNamespaceEmitter () { + var emitter = {} + var _fns = emitter._fns = {} + + /** + * Emit an event. Optionally namespace the event. Handlers are fired in the order in which they were added with exact matches taking precedence. Separate the namespace and event with a `:` + * @name emit + * @param {String} event – the name of the event, with optional namespace + * @param {...*} data – up to 6 arguments that are passed to the event listener + * @example + * emitter.emit('example') + * emitter.emit('demo:test') + * emitter.emit('data', { example: true}, 'a string', 1) + */ + emitter.emit = function emit (event, arg1, arg2, arg3, arg4, arg5, arg6) { + var toEmit = getListeners(event) + + if (toEmit.length) { + emitAll(event, toEmit, [arg1, arg2, arg3, arg4, arg5, arg6]) + } + } + + /** + * Create en event listener. + * @name on + * @param {String} event + * @param {Function} fn + * @example + * emitter.on('example', function () {}) + * emitter.on('demo', function () {}) + */ + emitter.on = function on (event, fn) { + if (!_fns[event]) { + _fns[event] = [] + } + + _fns[event].push(fn) + } + + /** + * Create en event listener that fires once. + * @name once + * @param {String} event + * @param {Function} fn + * @example + * emitter.once('example', function () {}) + * emitter.once('demo', function () {}) + */ + emitter.once = function once (event, fn) { + function one () { + fn.apply(this, arguments) + emitter.off(event, one) + } + this.on(event, one) + } + + /** + * Stop listening to an event. Stop all listeners on an event by only passing the event name. Stop a single listener by passing that event handler as a callback. + * You must be explicit about what will be unsubscribed: `emitter.off('demo')` will unsubscribe an `emitter.on('demo')` listener, + * `emitter.off('demo:example')` will unsubscribe an `emitter.on('demo:example')` listener + * @name off + * @param {String} event + * @param {Function} [fn] – the specific handler + * @example + * emitter.off('example') + * emitter.off('demo', function () {}) + */ + emitter.off = function off (event, fn) { + var keep = [] + + if (event && fn) { + var fns = this._fns[event] + var i = 0 + var l = fns ? fns.length : 0 + + for (i; i < l; i++) { + if (fns[i] !== fn) { + keep.push(fns[i]) + } + } + } + + keep.length ? this._fns[event] = keep : delete this._fns[event] + } + + function getListeners (e) { + var out = _fns[e] ? _fns[e] : [] + var idx = e.indexOf(':') + var args = (idx === -1) ? [e] : [e.substring(0, idx), e.substring(idx + 1)] + + var keys = Object.keys(_fns) + var i = 0 + var l = keys.length + + for (i; i < l; i++) { + var key = keys[i] + if (key === '*') { + out = out.concat(_fns[key]) + } + + if (args.length === 2 && args[0] === key) { + out = out.concat(_fns[key]) + break + } + } + + return out + } + + function emitAll (e, fns, args) { + var i = 0 + var l = fns.length + + for (i; i < l; i++) { + if (!fns[i]) break + fns[i].event = e + fns[i].apply(fns[i], args) + } + } + + return emitter +} + +},{}],39:[function(require,module,exports){ +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}],40:[function(require,module,exports){ +var has = Object.prototype.hasOwnProperty + +/** + * Stringify an object for use in a query string. + * + * @param {Object} obj - The object. + * @param {string} prefix - When nesting, the parent key. + * keys in `obj` will be stringified as `prefix[key]`. + * @returns {string} + */ + +module.exports = function queryStringify (obj, prefix) { + var pairs = [] + for (var key in obj) { + if (!has.call(obj, key)) { + continue + } + + var value = obj[key] + var enkey = encodeURIComponent(key) + var pair + if (typeof value === 'object') { + pair = queryStringify(value, prefix ? prefix + '[' + enkey + ']' : enkey) + } else { + pair = (prefix ? prefix + '[' + enkey + ']' : enkey) + '=' + encodeURIComponent(value) + } + pairs.push(pair) + } + return pairs.join('&') +} + +},{}],41:[function(require,module,exports){ +'use strict'; + +var has = Object.prototype.hasOwnProperty + , undef; + +/** + * Decode a URI encoded string. + * + * @param {String} input The URI encoded string. + * @returns {String|Null} The decoded string. + * @api private + */ +function decode(input) { + try { + return decodeURIComponent(input.replace(/\+/g, ' ')); + } catch (e) { + return null; + } +} + +/** + * Attempts to encode a given input. + * + * @param {String} input The string that needs to be encoded. + * @returns {String|Null} The encoded string. + * @api private + */ +function encode(input) { + try { + return encodeURIComponent(input); + } catch (e) { + return null; + } +} + +/** + * Simple query string parser. + * + * @param {String} query The query string that needs to be parsed. + * @returns {Object} + * @api public + */ +function querystring(query) { + var parser = /([^=?#&]+)=?([^&]*)/g + , result = {} + , part; + + while (part = parser.exec(query)) { + var key = decode(part[1]) + , value = decode(part[2]); + + // + // Prevent overriding of existing properties. This ensures that build-in + // methods like `toString` or __proto__ are not overriden by malicious + // querystrings. + // + // In the case if failed decoding, we want to omit the key/value pairs + // from the result. + // + if (key === null || value === null || key in result) continue; + result[key] = value; + } + + return result; +} + +/** + * Transform a query string to an object. + * + * @param {Object} obj Object that should be transformed. + * @param {String} prefix Optional prefix. + * @returns {String} + * @api public + */ +function querystringify(obj, prefix) { + prefix = prefix || ''; + + var pairs = [] + , value + , key; + + // + // Optionally prefix with a '?' if needed + // + if ('string' !== typeof prefix) prefix = '?'; + + for (key in obj) { + if (has.call(obj, key)) { + value = obj[key]; + + // + // Edge cases where we actually want to encode the value to an empty + // string instead of the stringified value. + // + if (!value && (value === null || value === undef || isNaN(value))) { + value = ''; + } + + key = encode(key); + value = encode(value); + + // + // If we failed to encode the strings, we should bail out as we don't + // want to add invalid strings to the query. + // + if (key === null || value === null) continue; + pairs.push(key +'='+ value); + } + } + + return pairs.length ? prefix + pairs.join('&') : ''; +} + +// +// Expose the module. +// +exports.stringify = querystringify; +exports.parse = querystring; + +},{}],42:[function(require,module,exports){ +'use strict'; + +/** + * Check if we're required to add a port number. + * + * @see https://url.spec.whatwg.org/#default-port + * @param {Number|String} port Port number we need to check + * @param {String} protocol Protocol we need to check against. + * @returns {Boolean} Is it a default port for the given protocol + * @api private + */ +module.exports = function required(port, protocol) { + protocol = protocol.split(':')[0]; + port = +port; + + if (!port) return false; + + switch (protocol) { + case 'http': + case 'ws': + return port !== 80; + + case 'https': + case 'wss': + return port !== 443; + + case 'ftp': + return port !== 21; + + case 'gopher': + return port !== 70; + + case 'file': + return false; + } + + return port !== 0; +}; + +},{}],43:[function(require,module,exports){ +(function (global){(function (){ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.ResizeObserver = factory()); +}(this, (function () { 'use strict'; + + /** + * A collection of shims that provide minimal functionality of the ES6 collections. + * + * These implementations are not meant to be used outside of the ResizeObserver + * modules as they cover only a limited range of use cases. + */ + /* eslint-disable require-jsdoc, valid-jsdoc */ + var MapShim = (function () { + if (typeof Map !== 'undefined') { + return Map; + } + /** + * Returns index in provided array that matches the specified key. + * + * @param {Array} arr + * @param {*} key + * @returns {number} + */ + function getIndex(arr, key) { + var result = -1; + arr.some(function (entry, index) { + if (entry[0] === key) { + result = index; + return true; + } + return false; + }); + return result; + } + return /** @class */ (function () { + function class_1() { + this.__entries__ = []; + } + Object.defineProperty(class_1.prototype, "size", { + /** + * @returns {boolean} + */ + get: function () { + return this.__entries__.length; + }, + enumerable: true, + configurable: true + }); + /** + * @param {*} key + * @returns {*} + */ + class_1.prototype.get = function (key) { + var index = getIndex(this.__entries__, key); + var entry = this.__entries__[index]; + return entry && entry[1]; + }; + /** + * @param {*} key + * @param {*} value + * @returns {void} + */ + class_1.prototype.set = function (key, value) { + var index = getIndex(this.__entries__, key); + if (~index) { + this.__entries__[index][1] = value; + } + else { + this.__entries__.push([key, value]); + } + }; + /** + * @param {*} key + * @returns {void} + */ + class_1.prototype.delete = function (key) { + var entries = this.__entries__; + var index = getIndex(entries, key); + if (~index) { + entries.splice(index, 1); + } + }; + /** + * @param {*} key + * @returns {void} + */ + class_1.prototype.has = function (key) { + return !!~getIndex(this.__entries__, key); + }; + /** + * @returns {void} + */ + class_1.prototype.clear = function () { + this.__entries__.splice(0); + }; + /** + * @param {Function} callback + * @param {*} [ctx=null] + * @returns {void} + */ + class_1.prototype.forEach = function (callback, ctx) { + if (ctx === void 0) { ctx = null; } + for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) { + var entry = _a[_i]; + callback.call(ctx, entry[1], entry[0]); + } + }; + return class_1; + }()); + })(); + + /** + * Detects whether window and document objects are available in current environment. + */ + var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document; + + // Returns global object of a current environment. + var global$1 = (function () { + if (typeof global !== 'undefined' && global.Math === Math) { + return global; + } + if (typeof self !== 'undefined' && self.Math === Math) { + return self; + } + if (typeof window !== 'undefined' && window.Math === Math) { + return window; + } + // eslint-disable-next-line no-new-func + return Function('return this')(); + })(); + + /** + * A shim for the requestAnimationFrame which falls back to the setTimeout if + * first one is not supported. + * + * @returns {number} Requests' identifier. + */ + var requestAnimationFrame$1 = (function () { + if (typeof requestAnimationFrame === 'function') { + // It's required to use a bounded function because IE sometimes throws + // an "Invalid calling object" error if rAF is invoked without the global + // object on the left hand side. + return requestAnimationFrame.bind(global$1); + } + return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); }; + })(); + + // Defines minimum timeout before adding a trailing call. + var trailingTimeout = 2; + /** + * Creates a wrapper function which ensures that provided callback will be + * invoked only once during the specified delay period. + * + * @param {Function} callback - Function to be invoked after the delay period. + * @param {number} delay - Delay after which to invoke callback. + * @returns {Function} + */ + function throttle (callback, delay) { + var leadingCall = false, trailingCall = false, lastCallTime = 0; + /** + * Invokes the original callback function and schedules new invocation if + * the "proxy" was called during current request. + * + * @returns {void} + */ + function resolvePending() { + if (leadingCall) { + leadingCall = false; + callback(); + } + if (trailingCall) { + proxy(); + } + } + /** + * Callback invoked after the specified delay. It will further postpone + * invocation of the original function delegating it to the + * requestAnimationFrame. + * + * @returns {void} + */ + function timeoutCallback() { + requestAnimationFrame$1(resolvePending); + } + /** + * Schedules invocation of the original function. + * + * @returns {void} + */ + function proxy() { + var timeStamp = Date.now(); + if (leadingCall) { + // Reject immediately following calls. + if (timeStamp - lastCallTime < trailingTimeout) { + return; + } + // Schedule new call to be in invoked when the pending one is resolved. + // This is important for "transitions" which never actually start + // immediately so there is a chance that we might miss one if change + // happens amids the pending invocation. + trailingCall = true; + } + else { + leadingCall = true; + trailingCall = false; + setTimeout(timeoutCallback, delay); + } + lastCallTime = timeStamp; + } + return proxy; + } + + // Minimum delay before invoking the update of observers. + var REFRESH_DELAY = 20; + // A list of substrings of CSS properties used to find transition events that + // might affect dimensions of observed elements. + var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight']; + // Check if MutationObserver is available. + var mutationObserverSupported = typeof MutationObserver !== 'undefined'; + /** + * Singleton controller class which handles updates of ResizeObserver instances. + */ + var ResizeObserverController = /** @class */ (function () { + /** + * Creates a new instance of ResizeObserverController. + * + * @private + */ + function ResizeObserverController() { + /** + * Indicates whether DOM listeners have been added. + * + * @private {boolean} + */ + this.connected_ = false; + /** + * Tells that controller has subscribed for Mutation Events. + * + * @private {boolean} + */ + this.mutationEventsAdded_ = false; + /** + * Keeps reference to the instance of MutationObserver. + * + * @private {MutationObserver} + */ + this.mutationsObserver_ = null; + /** + * A list of connected observers. + * + * @private {Array} + */ + this.observers_ = []; + this.onTransitionEnd_ = this.onTransitionEnd_.bind(this); + this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY); + } + /** + * Adds observer to observers list. + * + * @param {ResizeObserverSPI} observer - Observer to be added. + * @returns {void} + */ + ResizeObserverController.prototype.addObserver = function (observer) { + if (!~this.observers_.indexOf(observer)) { + this.observers_.push(observer); + } + // Add listeners if they haven't been added yet. + if (!this.connected_) { + this.connect_(); + } + }; + /** + * Removes observer from observers list. + * + * @param {ResizeObserverSPI} observer - Observer to be removed. + * @returns {void} + */ + ResizeObserverController.prototype.removeObserver = function (observer) { + var observers = this.observers_; + var index = observers.indexOf(observer); + // Remove observer if it's present in registry. + if (~index) { + observers.splice(index, 1); + } + // Remove listeners if controller has no connected observers. + if (!observers.length && this.connected_) { + this.disconnect_(); + } + }; + /** + * Invokes the update of observers. It will continue running updates insofar + * it detects changes. + * + * @returns {void} + */ + ResizeObserverController.prototype.refresh = function () { + var changesDetected = this.updateObservers_(); + // Continue running updates if changes have been detected as there might + // be future ones caused by CSS transitions. + if (changesDetected) { + this.refresh(); + } + }; + /** + * Updates every observer from observers list and notifies them of queued + * entries. + * + * @private + * @returns {boolean} Returns "true" if any observer has detected changes in + * dimensions of it's elements. + */ + ResizeObserverController.prototype.updateObservers_ = function () { + // Collect observers that have active observations. + var activeObservers = this.observers_.filter(function (observer) { + return observer.gatherActive(), observer.hasActive(); + }); + // Deliver notifications in a separate cycle in order to avoid any + // collisions between observers, e.g. when multiple instances of + // ResizeObserver are tracking the same element and the callback of one + // of them changes content dimensions of the observed target. Sometimes + // this may result in notifications being blocked for the rest of observers. + activeObservers.forEach(function (observer) { return observer.broadcastActive(); }); + return activeObservers.length > 0; + }; + /** + * Initializes DOM listeners. + * + * @private + * @returns {void} + */ + ResizeObserverController.prototype.connect_ = function () { + // Do nothing if running in a non-browser environment or if listeners + // have been already added. + if (!isBrowser || this.connected_) { + return; + } + // Subscription to the "Transitionend" event is used as a workaround for + // delayed transitions. This way it's possible to capture at least the + // final state of an element. + document.addEventListener('transitionend', this.onTransitionEnd_); + window.addEventListener('resize', this.refresh); + if (mutationObserverSupported) { + this.mutationsObserver_ = new MutationObserver(this.refresh); + this.mutationsObserver_.observe(document, { + attributes: true, + childList: true, + characterData: true, + subtree: true + }); + } + else { + document.addEventListener('DOMSubtreeModified', this.refresh); + this.mutationEventsAdded_ = true; + } + this.connected_ = true; + }; + /** + * Removes DOM listeners. + * + * @private + * @returns {void} + */ + ResizeObserverController.prototype.disconnect_ = function () { + // Do nothing if running in a non-browser environment or if listeners + // have been already removed. + if (!isBrowser || !this.connected_) { + return; + } + document.removeEventListener('transitionend', this.onTransitionEnd_); + window.removeEventListener('resize', this.refresh); + if (this.mutationsObserver_) { + this.mutationsObserver_.disconnect(); + } + if (this.mutationEventsAdded_) { + document.removeEventListener('DOMSubtreeModified', this.refresh); + } + this.mutationsObserver_ = null; + this.mutationEventsAdded_ = false; + this.connected_ = false; + }; + /** + * "Transitionend" event handler. + * + * @private + * @param {TransitionEvent} event + * @returns {void} + */ + ResizeObserverController.prototype.onTransitionEnd_ = function (_a) { + var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b; + // Detect whether transition may affect dimensions of an element. + var isReflowProperty = transitionKeys.some(function (key) { + return !!~propertyName.indexOf(key); + }); + if (isReflowProperty) { + this.refresh(); + } + }; + /** + * Returns instance of the ResizeObserverController. + * + * @returns {ResizeObserverController} + */ + ResizeObserverController.getInstance = function () { + if (!this.instance_) { + this.instance_ = new ResizeObserverController(); + } + return this.instance_; + }; + /** + * Holds reference to the controller's instance. + * + * @private {ResizeObserverController} + */ + ResizeObserverController.instance_ = null; + return ResizeObserverController; + }()); + + /** + * Defines non-writable/enumerable properties of the provided target object. + * + * @param {Object} target - Object for which to define properties. + * @param {Object} props - Properties to be defined. + * @returns {Object} Target object. + */ + var defineConfigurable = (function (target, props) { + for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) { + var key = _a[_i]; + Object.defineProperty(target, key, { + value: props[key], + enumerable: false, + writable: false, + configurable: true + }); + } + return target; + }); + + /** + * Returns the global object associated with provided element. + * + * @param {Object} target + * @returns {Object} + */ + var getWindowOf = (function (target) { + // Assume that the element is an instance of Node, which means that it + // has the "ownerDocument" property from which we can retrieve a + // corresponding global object. + var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView; + // Return the local global object if it's not possible extract one from + // provided element. + return ownerGlobal || global$1; + }); + + // Placeholder of an empty content rectangle. + var emptyRect = createRectInit(0, 0, 0, 0); + /** + * Converts provided string to a number. + * + * @param {number|string} value + * @returns {number} + */ + function toFloat(value) { + return parseFloat(value) || 0; + } + /** + * Extracts borders size from provided styles. + * + * @param {CSSStyleDeclaration} styles + * @param {...string} positions - Borders positions (top, right, ...) + * @returns {number} + */ + function getBordersSize(styles) { + var positions = []; + for (var _i = 1; _i < arguments.length; _i++) { + positions[_i - 1] = arguments[_i]; + } + return positions.reduce(function (size, position) { + var value = styles['border-' + position + '-width']; + return size + toFloat(value); + }, 0); + } + /** + * Extracts paddings sizes from provided styles. + * + * @param {CSSStyleDeclaration} styles + * @returns {Object} Paddings box. + */ + function getPaddings(styles) { + var positions = ['top', 'right', 'bottom', 'left']; + var paddings = {}; + for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) { + var position = positions_1[_i]; + var value = styles['padding-' + position]; + paddings[position] = toFloat(value); + } + return paddings; + } + /** + * Calculates content rectangle of provided SVG element. + * + * @param {SVGGraphicsElement} target - Element content rectangle of which needs + * to be calculated. + * @returns {DOMRectInit} + */ + function getSVGContentRect(target) { + var bbox = target.getBBox(); + return createRectInit(0, 0, bbox.width, bbox.height); + } + /** + * Calculates content rectangle of provided HTMLElement. + * + * @param {HTMLElement} target - Element for which to calculate the content rectangle. + * @returns {DOMRectInit} + */ + function getHTMLElementContentRect(target) { + // Client width & height properties can't be + // used exclusively as they provide rounded values. + var clientWidth = target.clientWidth, clientHeight = target.clientHeight; + // By this condition we can catch all non-replaced inline, hidden and + // detached elements. Though elements with width & height properties less + // than 0.5 will be discarded as well. + // + // Without it we would need to implement separate methods for each of + // those cases and it's not possible to perform a precise and performance + // effective test for hidden elements. E.g. even jQuery's ':visible' filter + // gives wrong results for elements with width & height less than 0.5. + if (!clientWidth && !clientHeight) { + return emptyRect; + } + var styles = getWindowOf(target).getComputedStyle(target); + var paddings = getPaddings(styles); + var horizPad = paddings.left + paddings.right; + var vertPad = paddings.top + paddings.bottom; + // Computed styles of width & height are being used because they are the + // only dimensions available to JS that contain non-rounded values. It could + // be possible to utilize the getBoundingClientRect if only it's data wasn't + // affected by CSS transformations let alone paddings, borders and scroll bars. + var width = toFloat(styles.width), height = toFloat(styles.height); + // Width & height include paddings and borders when the 'border-box' box + // model is applied (except for IE). + if (styles.boxSizing === 'border-box') { + // Following conditions are required to handle Internet Explorer which + // doesn't include paddings and borders to computed CSS dimensions. + // + // We can say that if CSS dimensions + paddings are equal to the "client" + // properties then it's either IE, and thus we don't need to subtract + // anything, or an element merely doesn't have paddings/borders styles. + if (Math.round(width + horizPad) !== clientWidth) { + width -= getBordersSize(styles, 'left', 'right') + horizPad; + } + if (Math.round(height + vertPad) !== clientHeight) { + height -= getBordersSize(styles, 'top', 'bottom') + vertPad; + } + } + // Following steps can't be applied to the document's root element as its + // client[Width/Height] properties represent viewport area of the window. + // Besides, it's as well not necessary as the itself neither has + // rendered scroll bars nor it can be clipped. + if (!isDocumentElement(target)) { + // In some browsers (only in Firefox, actually) CSS width & height + // include scroll bars size which can be removed at this step as scroll + // bars are the only difference between rounded dimensions + paddings + // and "client" properties, though that is not always true in Chrome. + var vertScrollbar = Math.round(width + horizPad) - clientWidth; + var horizScrollbar = Math.round(height + vertPad) - clientHeight; + // Chrome has a rather weird rounding of "client" properties. + // E.g. for an element with content width of 314.2px it sometimes gives + // the client width of 315px and for the width of 314.7px it may give + // 314px. And it doesn't happen all the time. So just ignore this delta + // as a non-relevant. + if (Math.abs(vertScrollbar) !== 1) { + width -= vertScrollbar; + } + if (Math.abs(horizScrollbar) !== 1) { + height -= horizScrollbar; + } + } + return createRectInit(paddings.left, paddings.top, width, height); + } + /** + * Checks whether provided element is an instance of the SVGGraphicsElement. + * + * @param {Element} target - Element to be checked. + * @returns {boolean} + */ + var isSVGGraphicsElement = (function () { + // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement + // interface. + if (typeof SVGGraphicsElement !== 'undefined') { + return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; }; + } + // If it's so, then check that element is at least an instance of the + // SVGElement and that it has the "getBBox" method. + // eslint-disable-next-line no-extra-parens + return function (target) { return (target instanceof getWindowOf(target).SVGElement && + typeof target.getBBox === 'function'); }; + })(); + /** + * Checks whether provided element is a document element (). + * + * @param {Element} target - Element to be checked. + * @returns {boolean} + */ + function isDocumentElement(target) { + return target === getWindowOf(target).document.documentElement; + } + /** + * Calculates an appropriate content rectangle for provided html or svg element. + * + * @param {Element} target - Element content rectangle of which needs to be calculated. + * @returns {DOMRectInit} + */ + function getContentRect(target) { + if (!isBrowser) { + return emptyRect; + } + if (isSVGGraphicsElement(target)) { + return getSVGContentRect(target); + } + return getHTMLElementContentRect(target); + } + /** + * Creates rectangle with an interface of the DOMRectReadOnly. + * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly + * + * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions. + * @returns {DOMRectReadOnly} + */ + function createReadOnlyRect(_a) { + var x = _a.x, y = _a.y, width = _a.width, height = _a.height; + // If DOMRectReadOnly is available use it as a prototype for the rectangle. + var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object; + var rect = Object.create(Constr.prototype); + // Rectangle's properties are not writable and non-enumerable. + defineConfigurable(rect, { + x: x, y: y, width: width, height: height, + top: y, + right: x + width, + bottom: height + y, + left: x + }); + return rect; + } + /** + * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates. + * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit + * + * @param {number} x - X coordinate. + * @param {number} y - Y coordinate. + * @param {number} width - Rectangle's width. + * @param {number} height - Rectangle's height. + * @returns {DOMRectInit} + */ + function createRectInit(x, y, width, height) { + return { x: x, y: y, width: width, height: height }; + } + + /** + * Class that is responsible for computations of the content rectangle of + * provided DOM element and for keeping track of it's changes. + */ + var ResizeObservation = /** @class */ (function () { + /** + * Creates an instance of ResizeObservation. + * + * @param {Element} target - Element to be observed. + */ + function ResizeObservation(target) { + /** + * Broadcasted width of content rectangle. + * + * @type {number} + */ + this.broadcastWidth = 0; + /** + * Broadcasted height of content rectangle. + * + * @type {number} + */ + this.broadcastHeight = 0; + /** + * Reference to the last observed content rectangle. + * + * @private {DOMRectInit} + */ + this.contentRect_ = createRectInit(0, 0, 0, 0); + this.target = target; + } + /** + * Updates content rectangle and tells whether it's width or height properties + * have changed since the last broadcast. + * + * @returns {boolean} + */ + ResizeObservation.prototype.isActive = function () { + var rect = getContentRect(this.target); + this.contentRect_ = rect; + return (rect.width !== this.broadcastWidth || + rect.height !== this.broadcastHeight); + }; + /** + * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data + * from the corresponding properties of the last observed content rectangle. + * + * @returns {DOMRectInit} Last observed content rectangle. + */ + ResizeObservation.prototype.broadcastRect = function () { + var rect = this.contentRect_; + this.broadcastWidth = rect.width; + this.broadcastHeight = rect.height; + return rect; + }; + return ResizeObservation; + }()); + + var ResizeObserverEntry = /** @class */ (function () { + /** + * Creates an instance of ResizeObserverEntry. + * + * @param {Element} target - Element that is being observed. + * @param {DOMRectInit} rectInit - Data of the element's content rectangle. + */ + function ResizeObserverEntry(target, rectInit) { + var contentRect = createReadOnlyRect(rectInit); + // According to the specification following properties are not writable + // and are also not enumerable in the native implementation. + // + // Property accessors are not being used as they'd require to define a + // private WeakMap storage which may cause memory leaks in browsers that + // don't support this type of collections. + defineConfigurable(this, { target: target, contentRect: contentRect }); + } + return ResizeObserverEntry; + }()); + + var ResizeObserverSPI = /** @class */ (function () { + /** + * Creates a new instance of ResizeObserver. + * + * @param {ResizeObserverCallback} callback - Callback function that is invoked + * when one of the observed elements changes it's content dimensions. + * @param {ResizeObserverController} controller - Controller instance which + * is responsible for the updates of observer. + * @param {ResizeObserver} callbackCtx - Reference to the public + * ResizeObserver instance which will be passed to callback function. + */ + function ResizeObserverSPI(callback, controller, callbackCtx) { + /** + * Collection of resize observations that have detected changes in dimensions + * of elements. + * + * @private {Array} + */ + this.activeObservations_ = []; + /** + * Registry of the ResizeObservation instances. + * + * @private {Map} + */ + this.observations_ = new MapShim(); + if (typeof callback !== 'function') { + throw new TypeError('The callback provided as parameter 1 is not a function.'); + } + this.callback_ = callback; + this.controller_ = controller; + this.callbackCtx_ = callbackCtx; + } + /** + * Starts observing provided element. + * + * @param {Element} target - Element to be observed. + * @returns {void} + */ + ResizeObserverSPI.prototype.observe = function (target) { + if (!arguments.length) { + throw new TypeError('1 argument required, but only 0 present.'); + } + // Do nothing if current environment doesn't have the Element interface. + if (typeof Element === 'undefined' || !(Element instanceof Object)) { + return; + } + if (!(target instanceof getWindowOf(target).Element)) { + throw new TypeError('parameter 1 is not of type "Element".'); + } + var observations = this.observations_; + // Do nothing if element is already being observed. + if (observations.has(target)) { + return; + } + observations.set(target, new ResizeObservation(target)); + this.controller_.addObserver(this); + // Force the update of observations. + this.controller_.refresh(); + }; + /** + * Stops observing provided element. + * + * @param {Element} target - Element to stop observing. + * @returns {void} + */ + ResizeObserverSPI.prototype.unobserve = function (target) { + if (!arguments.length) { + throw new TypeError('1 argument required, but only 0 present.'); + } + // Do nothing if current environment doesn't have the Element interface. + if (typeof Element === 'undefined' || !(Element instanceof Object)) { + return; + } + if (!(target instanceof getWindowOf(target).Element)) { + throw new TypeError('parameter 1 is not of type "Element".'); + } + var observations = this.observations_; + // Do nothing if element is not being observed. + if (!observations.has(target)) { + return; + } + observations.delete(target); + if (!observations.size) { + this.controller_.removeObserver(this); + } + }; + /** + * Stops observing all elements. + * + * @returns {void} + */ + ResizeObserverSPI.prototype.disconnect = function () { + this.clearActive(); + this.observations_.clear(); + this.controller_.removeObserver(this); + }; + /** + * Collects observation instances the associated element of which has changed + * it's content rectangle. + * + * @returns {void} + */ + ResizeObserverSPI.prototype.gatherActive = function () { + var _this = this; + this.clearActive(); + this.observations_.forEach(function (observation) { + if (observation.isActive()) { + _this.activeObservations_.push(observation); + } + }); + }; + /** + * Invokes initial callback function with a list of ResizeObserverEntry + * instances collected from active resize observations. + * + * @returns {void} + */ + ResizeObserverSPI.prototype.broadcastActive = function () { + // Do nothing if observer doesn't have active observations. + if (!this.hasActive()) { + return; + } + var ctx = this.callbackCtx_; + // Create ResizeObserverEntry instance for every active observation. + var entries = this.activeObservations_.map(function (observation) { + return new ResizeObserverEntry(observation.target, observation.broadcastRect()); + }); + this.callback_.call(ctx, entries, ctx); + this.clearActive(); + }; + /** + * Clears the collection of active observations. + * + * @returns {void} + */ + ResizeObserverSPI.prototype.clearActive = function () { + this.activeObservations_.splice(0); + }; + /** + * Tells whether observer has active observations. + * + * @returns {boolean} + */ + ResizeObserverSPI.prototype.hasActive = function () { + return this.activeObservations_.length > 0; + }; + return ResizeObserverSPI; + }()); + + // Registry of internal observers. If WeakMap is not available use current shim + // for the Map collection as it has all required methods and because WeakMap + // can't be fully polyfilled anyway. + var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim(); + /** + * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation + * exposing only those methods and properties that are defined in the spec. + */ + var ResizeObserver = /** @class */ (function () { + /** + * Creates a new instance of ResizeObserver. + * + * @param {ResizeObserverCallback} callback - Callback that is invoked when + * dimensions of the observed elements change. + */ + function ResizeObserver(callback) { + if (!(this instanceof ResizeObserver)) { + throw new TypeError('Cannot call a class as a function.'); + } + if (!arguments.length) { + throw new TypeError('1 argument required, but only 0 present.'); + } + var controller = ResizeObserverController.getInstance(); + var observer = new ResizeObserverSPI(callback, controller, this); + observers.set(this, observer); + } + return ResizeObserver; + }()); + // Expose public methods of ResizeObserver. + [ + 'observe', + 'unobserve', + 'disconnect' + ].forEach(function (method) { + ResizeObserver.prototype[method] = function () { + var _a; + return (_a = observers.get(this))[method].apply(_a, arguments); + }; + }); + + var index = (function () { + // Export existing implementation if available. + if (typeof global$1.ResizeObserver !== 'undefined') { + return global$1.ResizeObserver; + } + return ResizeObserver; + })(); + + return index; + +}))); + +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{}],44:[function(require,module,exports){ +module.exports = toArray + +function toArray(list, index) { + var array = [] + + index = index || 0 + + for (var i = index || 0; i < list.length; i++) { + array[i - index] = list[i] + } + + return array +} + +},{}],45:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _isReactNative = _interopRequireDefault(require("./isReactNative")); + +var _uriToBlob = _interopRequireDefault(require("./uriToBlob")); + +var _isCordova = _interopRequireDefault(require("./isCordova")); + +var _readAsByteArray = _interopRequireDefault(require("./readAsByteArray")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +var FileSource = /*#__PURE__*/function () { + // Make this.size a method + function FileSource(file) { + _classCallCheck(this, FileSource); + + this._file = file; + this.size = file.size; + } + + _createClass(FileSource, [{ + key: "slice", + value: function slice(start, end) { + // In Apache Cordova applications, a File must be resolved using + // FileReader instances, see + // https://cordova.apache.org/docs/en/8.x/reference/cordova-plugin-file/index.html#read-a-file + if ((0, _isCordova.default)()) { + return (0, _readAsByteArray.default)(this._file.slice(start, end)); + } + + var value = this._file.slice(start, end); + + return Promise.resolve({ + value: value + }); + } + }, { + key: "close", + value: function close() {// Nothing to do here since we don't need to release any resources. + } + }]); + + return FileSource; +}(); + +var StreamSource = /*#__PURE__*/function () { + function StreamSource(reader, chunkSize) { + _classCallCheck(this, StreamSource); + + this._chunkSize = chunkSize; + this._buffer = undefined; + this._bufferOffset = 0; + this._reader = reader; + this._done = false; + } + + _createClass(StreamSource, [{ + key: "slice", + value: function slice(start, end) { + if (start < this._bufferOffset) { + return Promise.reject(new Error("Requested data is before the reader's current offset")); + } + + return this._readUntilEnoughDataOrDone(start, end); + } + }, { + key: "_readUntilEnoughDataOrDone", + value: function _readUntilEnoughDataOrDone(start, end) { + var _this = this; + + var hasEnoughData = end <= this._bufferOffset + len(this._buffer); + + if (this._done || hasEnoughData) { + var value = this._getDataFromBuffer(start, end); + + var done = value == null ? this._done : false; + return Promise.resolve({ + value: value, + done: done + }); + } + + return this._reader.read().then(function (_ref) { + var value = _ref.value, + done = _ref.done; + + if (done) { + _this._done = true; + } else if (_this._buffer === undefined) { + _this._buffer = value; + } else { + _this._buffer = concat(_this._buffer, value); + } + + return _this._readUntilEnoughDataOrDone(start, end); + }); + } + }, { + key: "_getDataFromBuffer", + value: function _getDataFromBuffer(start, end) { + // Remove data from buffer before `start`. + // Data might be reread from the buffer if an upload fails, so we can only + // safely delete data when it comes *before* what is currently being read. + if (start > this._bufferOffset) { + this._buffer = this._buffer.slice(start - this._bufferOffset); + this._bufferOffset = start; + } // If the buffer is empty after removing old data, all data has been read. + + + var hasAllDataBeenRead = len(this._buffer) === 0; + + if (this._done && hasAllDataBeenRead) { + return null; + } // We already removed data before `start`, so we just return the first + // chunk from the buffer. + + + return this._buffer.slice(0, end - start); + } + }, { + key: "close", + value: function close() { + if (this._reader.cancel) { + this._reader.cancel(); + } + } + }]); + + return StreamSource; +}(); + +function len(blobOrArray) { + if (blobOrArray === undefined) return 0; + if (blobOrArray.size !== undefined) return blobOrArray.size; + return blobOrArray.length; +} +/* + Typed arrays and blobs don't have a concat method. + This function helps StreamSource accumulate data to reach chunkSize. +*/ + + +function concat(a, b) { + if (a.concat) { + // Is `a` an Array? + return a.concat(b); + } + + if (a instanceof Blob) { + return new Blob([a, b], { + type: a.type + }); + } + + if (a.set) { + // Is `a` a typed array? + var c = new a.constructor(a.length + b.length); + c.set(a); + c.set(b, a.length); + return c; + } + + throw new Error("Unknown data type"); +} + +var FileReader = /*#__PURE__*/function () { + function FileReader() { + _classCallCheck(this, FileReader); + } + + _createClass(FileReader, [{ + key: "openFile", + value: function openFile(input, chunkSize) { + // In React Native, when user selects a file, instead of a File or Blob, + // you usually get a file object {} with a uri property that contains + // a local path to the file. We use XMLHttpRequest to fetch + // the file blob, before uploading with tus. + if ((0, _isReactNative.default)() && input && typeof input.uri !== "undefined") { + return (0, _uriToBlob.default)(input.uri).then(function (blob) { + return new FileSource(blob); + })["catch"](function (err) { + throw new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. " + err); + }); + } // Since we emulate the Blob type in our tests (not all target browsers + // support it), we cannot use `instanceof` for testing whether the input value + // can be handled. Instead, we simply check is the slice() function and the + // size property are available. + + + if (typeof input.slice === "function" && typeof input.size !== "undefined") { + return Promise.resolve(new FileSource(input)); + } + + if (typeof input.read === "function") { + chunkSize = +chunkSize; + + if (!isFinite(chunkSize)) { + return Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option")); + } + + return Promise.resolve(new StreamSource(input, chunkSize)); + } + + return Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment")); + } + }]); + + return FileReader; +}(); + +exports.default = FileReader; +},{"./isCordova":49,"./isReactNative":50,"./readAsByteArray":51,"./uriToBlob":52}],46:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = fingerprint; + +var _isReactNative = _interopRequireDefault(require("./isReactNative")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// TODO: Differenciate between input types + +/** + * Generate a fingerprint for a file which will be used the store the endpoint + * + * @param {File} file + * @param {Object} options + * @param {Function} callback + */ +function fingerprint(file, options) { + if ((0, _isReactNative.default)()) { + return Promise.resolve(reactNativeFingerprint(file, options)); + } + + return Promise.resolve(["tus-br", file.name, file.type, file.size, file.lastModified, options.endpoint].join("-")); +} + +function reactNativeFingerprint(file, options) { + var exifHash = file.exif ? hashCode(JSON.stringify(file.exif)) : "noexif"; + return ["tus-rn", file.name || "noname", file.size || "nosize", exifHash, options.endpoint].join("/"); +} + +function hashCode(str) { + // from https://stackoverflow.com/a/8831937/151666 + var hash = 0; + + if (str.length === 0) { + return hash; + } + + for (var i = 0; i < str.length; i++) { + var _char = str.charCodeAt(i); + + hash = (hash << 5) - hash + _char; + hash = hash & hash; // Convert to 32bit integer + } + + return hash; +} +},{"./isReactNative":50}],47:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} +/* global window */ + + +var XHRHttpStack = /*#__PURE__*/function () { + function XHRHttpStack() { + _classCallCheck(this, XHRHttpStack); + } + + _createClass(XHRHttpStack, [{ + key: "createRequest", + value: function createRequest(method, url) { + return new Request(method, url); + } + }, { + key: "getName", + value: function getName() { + return "XHRHttpStack"; + } + }]); + + return XHRHttpStack; +}(); + +exports.default = XHRHttpStack; + +var Request = /*#__PURE__*/function () { + function Request(method, url) { + _classCallCheck(this, Request); + + this._xhr = new XMLHttpRequest(); + + this._xhr.open(method, url, true); + + this._method = method; + this._url = url; + this._headers = {}; + } + + _createClass(Request, [{ + key: "getMethod", + value: function getMethod() { + return this._method; + } + }, { + key: "getURL", + value: function getURL() { + return this._url; + } + }, { + key: "setHeader", + value: function setHeader(header, value) { + this._xhr.setRequestHeader(header, value); + + this._headers[header] = value; + } + }, { + key: "getHeader", + value: function getHeader(header) { + return this._headers[header]; + } + }, { + key: "setProgressHandler", + value: function setProgressHandler(progressHandler) { + // Test support for progress events before attaching an event listener + if (!("upload" in this._xhr)) { + return; + } + + this._xhr.upload.onprogress = function (e) { + if (!e.lengthComputable) { + return; + } + + progressHandler(e.loaded); + }; + } + }, { + key: "send", + value: function send() { + var _this = this; + + var body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + return new Promise(function (resolve, reject) { + _this._xhr.onload = function () { + resolve(new Response(_this._xhr)); + }; + + _this._xhr.onerror = function (err) { + reject(err); + }; + + _this._xhr.send(body); + }); + } + }, { + key: "abort", + value: function abort() { + this._xhr.abort(); + + return Promise.resolve(); + } + }, { + key: "getUnderlyingObject", + value: function getUnderlyingObject() { + return this._xhr; + } + }]); + + return Request; +}(); + +var Response = /*#__PURE__*/function () { + function Response(xhr) { + _classCallCheck(this, Response); + + this._xhr = xhr; + } + + _createClass(Response, [{ + key: "getStatus", + value: function getStatus() { + return this._xhr.status; + } + }, { + key: "getHeader", + value: function getHeader(header) { + return this._xhr.getResponseHeader(header); + } + }, { + key: "getBody", + value: function getBody() { + return this._xhr.responseText; + } + }, { + key: "getUnderlyingObject", + value: function getUnderlyingObject() { + return this._xhr; + } + }]); + + return Response; +}(); +},{}],48:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "enableDebugLog", { + enumerable: true, + get: function () { + return _logger.enableDebugLog; + } +}); +Object.defineProperty(exports, "canStoreURLs", { + enumerable: true, + get: function () { + return _urlStorage.canStoreURLs; + } +}); +exports.isSupported = exports.defaultOptions = exports.Upload = void 0; + +var _upload = _interopRequireDefault(require("../upload")); + +var _noopUrlStorage = _interopRequireDefault(require("../noopUrlStorage")); + +var _logger = require("../logger"); + +var _urlStorage = require("./urlStorage"); + +var _httpStack = _interopRequireDefault(require("./httpStack")); + +var _fileReader = _interopRequireDefault(require("./fileReader")); + +var _fingerprint = _interopRequireDefault(require("./fingerprint")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _createSuper(Derived) { + return function () { + var Super = _getPrototypeOf(Derived), + result; + + if (_isNativeReflectConstruct()) { + var NewTarget = _getPrototypeOf(this).constructor; + + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return _possibleConstructorReturn(this, result); + }; +} + +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized(self); +} + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); + return true; + } catch (e) { + return false; + } +} + +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} +/* global window */ + + +var defaultOptions = _objectSpread({}, _upload.default.defaultOptions, { + httpStack: new _httpStack.default(), + fileReader: new _fileReader.default(), + urlStorage: _urlStorage.canStoreURLs ? new _urlStorage.WebStorageUrlStorage() : new _noopUrlStorage.default(), + fingerprint: _fingerprint.default +}); + +exports.defaultOptions = defaultOptions; + +var Upload = /*#__PURE__*/function (_BaseUpload) { + _inherits(Upload, _BaseUpload); + + var _super = _createSuper(Upload); + + function Upload() { + var file = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, Upload); + + options = _objectSpread({}, defaultOptions, {}, options); + return _super.call(this, file, options); + } + + _createClass(Upload, null, [{ + key: "terminate", + value: function terminate(url, options, cb) { + options = _objectSpread({}, defaultOptions, {}, options); + return _upload.default.terminate(url, options, cb); + } + }]); + + return Upload; +}(_upload.default); + +exports.Upload = Upload; +var _window = window, + XMLHttpRequest = _window.XMLHttpRequest, + Blob = _window.Blob; +var isSupported = XMLHttpRequest && Blob && typeof Blob.prototype.slice === "function"; +exports.isSupported = isSupported; +},{"../logger":55,"../noopUrlStorage":56,"../upload":57,"./fileReader":45,"./fingerprint":46,"./httpStack":47,"./urlStorage":53}],49:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var isCordova = function isCordova() { + return typeof window != "undefined" && (typeof window.PhoneGap != "undefined" || typeof window.Cordova != "undefined" || typeof window.cordova != "undefined"); +}; + +var _default = isCordova; +exports.default = _default; +},{}],50:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var isReactNative = function isReactNative() { + return typeof navigator !== "undefined" && typeof navigator.product === "string" && navigator.product.toLowerCase() === "reactnative"; +}; + +var _default = isReactNative; +exports.default = _default; +},{}],51:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = readAsByteArray; + +/** + * readAsByteArray converts a File object to a Uint8Array. + * This function is only used on the Apache Cordova platform. + * See https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html#read-a-file + */ +function readAsByteArray(chunk) { + return new Promise(function (resolve, reject) { + var reader = new FileReader(); + + reader.onload = function () { + var value = new Uint8Array(reader.result); + resolve({ + value: value + }); + }; + + reader.onerror = function (err) { + reject(err); + }; + + reader.readAsArrayBuffer(chunk); + }); +} +},{}],52:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = uriToBlob; + +/** + * uriToBlob resolves a URI to a Blob object. This is used for + * React Native to retrieve a file (identified by a file:// + * URI) as a blob. + */ +function uriToBlob(uri) { + return new Promise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.responseType = "blob"; + + xhr.onload = function () { + var blob = xhr.response; + resolve(blob); + }; + + xhr.onerror = function (err) { + reject(err); + }; + + xhr.open("GET", uri); + xhr.send(); + }); +} +},{}],53:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.WebStorageUrlStorage = exports.canStoreURLs = void 0; + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} +/* global window, localStorage */ + + +var hasStorage = false; + +try { + hasStorage = "localStorage" in window; // Attempt to store and read entries from the local storage to detect Private + // Mode on Safari on iOS (see #49) + + var key = "tusSupport"; + localStorage.setItem(key, localStorage.getItem(key)); +} catch (e) { + // If we try to access localStorage inside a sandboxed iframe, a SecurityError + // is thrown. When in private mode on iOS Safari, a QuotaExceededError is + // thrown (see #49) + if (e.code === e.SECURITY_ERR || e.code === e.QUOTA_EXCEEDED_ERR) { + hasStorage = false; + } else { + throw e; + } +} + +var canStoreURLs = hasStorage; +exports.canStoreURLs = canStoreURLs; + +var WebStorageUrlStorage = /*#__PURE__*/function () { + function WebStorageUrlStorage() { + _classCallCheck(this, WebStorageUrlStorage); + } + + _createClass(WebStorageUrlStorage, [{ + key: "findAllUploads", + value: function findAllUploads() { + var results = this._findEntries("tus::"); + + return Promise.resolve(results); + } + }, { + key: "findUploadsByFingerprint", + value: function findUploadsByFingerprint(fingerprint) { + var results = this._findEntries("tus::".concat(fingerprint, "::")); + + return Promise.resolve(results); + } + }, { + key: "removeUpload", + value: function removeUpload(urlStorageKey) { + localStorage.removeItem(urlStorageKey); + return Promise.resolve(); + } + }, { + key: "addUpload", + value: function addUpload(fingerprint, upload) { + var id = Math.round(Math.random() * 1e12); + var key = "tus::".concat(fingerprint, "::").concat(id); + localStorage.setItem(key, JSON.stringify(upload)); + return Promise.resolve(key); + } + }, { + key: "_findEntries", + value: function _findEntries(prefix) { + var results = []; + + for (var i = 0; i < localStorage.length; i++) { + var _key = localStorage.key(i); + + if (_key.indexOf(prefix) !== 0) continue; + + try { + var upload = JSON.parse(localStorage.getItem(_key)); + upload.urlStorageKey = _key; + results.push(upload); + } catch (e) {// The JSON parse error is intentionally ignored here, so a malformed + // entry in the storage cannot prevent an upload. + } + } + + return results; + } + }]); + + return WebStorageUrlStorage; +}(); + +exports.WebStorageUrlStorage = WebStorageUrlStorage; +},{}],54:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _createSuper(Derived) { + return function () { + var Super = _getPrototypeOf(Derived), + result; + + if (_isNativeReflectConstruct()) { + var NewTarget = _getPrototypeOf(this).constructor; + + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return _possibleConstructorReturn(this, result); + }; +} + +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized(self); +} + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +function _wrapNativeSuper(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + + _wrapNativeSuper = function _wrapNativeSuper(Class) { + if (Class === null || !_isNativeFunction(Class)) return Class; + + if (typeof Class !== "function") { + throw new TypeError("Super expression must either be null or a function"); + } + + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + + _cache.set(Class, Wrapper); + } + + function Wrapper() { + return _construct(Class, arguments, _getPrototypeOf(this).constructor); + } + + Wrapper.prototype = Object.create(Class.prototype, { + constructor: { + value: Wrapper, + enumerable: false, + writable: true, + configurable: true + } + }); + return _setPrototypeOf(Wrapper, Class); + }; + + return _wrapNativeSuper(Class); +} + +function _construct(Parent, args, Class) { + if (_isNativeReflectConstruct()) { + _construct = Reflect.construct; + } else { + _construct = function _construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + if (Class) _setPrototypeOf(instance, Class.prototype); + return instance; + }; + } + + return _construct.apply(null, arguments); +} + +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); + return true; + } catch (e) { + return false; + } +} + +function _isNativeFunction(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +var DetailedError = /*#__PURE__*/function (_Error) { + _inherits(DetailedError, _Error); + + var _super = _createSuper(DetailedError); + + function DetailedError(message) { + var _this; + + var causingErr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var req = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var res = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + + _classCallCheck(this, DetailedError); + + _this = _super.call(this, message); + _this.originalRequest = req; + _this.originalResponse = res; + _this.causingError = causingErr; + + if (causingErr != null) { + message += ", caused by ".concat(causingErr.toString()); + } + + if (req != null) { + var requestId = req.getHeader("X-Request-ID") || "n/a"; + var method = req.getMethod(); + var url = req.getURL(); + var status = res ? res.getStatus() : "n/a"; + var body = res ? res.getBody() || "" : "n/a"; + message += ", originated from request (method: ".concat(method, ", url: ").concat(url, ", response code: ").concat(status, ", response text: ").concat(body, ", request id: ").concat(requestId, ")"); + } + + _this.message = message; + return _this; + } + + return DetailedError; +}( /*#__PURE__*/_wrapNativeSuper(Error)); + +var _default = DetailedError; +exports.default = _default; +},{}],55:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.enableDebugLog = enableDebugLog; +exports.log = log; + +/* eslint no-console: "off" */ +var isEnabled = false; + +function enableDebugLog() { + isEnabled = true; +} + +function log(msg) { + if (!isEnabled) return; + console.log(msg); +} +},{}],56:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} +/* eslint no-unused-vars: "off" */ + + +var NoopUrlStorage = /*#__PURE__*/function () { + function NoopUrlStorage() { + _classCallCheck(this, NoopUrlStorage); + } + + _createClass(NoopUrlStorage, [{ + key: "listAllUploads", + value: function listAllUploads() { + return Promise.resolve([]); + } + }, { + key: "findUploadsByFingerprint", + value: function findUploadsByFingerprint(fingerprint) { + return Promise.resolve([]); + } + }, { + key: "removeUpload", + value: function removeUpload(urlStorageKey) { + return Promise.resolve(); + } + }, { + key: "addUpload", + value: function addUpload(fingerprint, upload) { + return Promise.resolve(null); + } + }]); + + return NoopUrlStorage; +}(); + +exports.default = NoopUrlStorage; +},{}],57:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _error = _interopRequireDefault(require("./error")); + +var _uuid = _interopRequireDefault(require("./uuid")); + +var _jsBase = require("js-base64"); + +var _urlParse = _interopRequireDefault(require("url-parse")); + +var _logger = require("./logger"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} +/* global window */ + + +var defaultOptions = { + endpoint: null, + uploadUrl: null, + metadata: {}, + fingerprint: null, + uploadSize: null, + onProgress: null, + onChunkComplete: null, + onSuccess: null, + onError: null, + _onUploadUrlAvailable: null, + overridePatchMethod: false, + headers: {}, + addRequestId: false, + onBeforeRequest: null, + onAfterResponse: null, + chunkSize: Infinity, + retryDelays: [0, 1000, 3000, 5000], + parallelUploads: 1, + storeFingerprintForResuming: true, + removeFingerprintOnSuccess: false, + uploadLengthDeferred: false, + uploadDataDuringCreation: false, + urlStorage: null, + fileReader: null, + httpStack: null +}; + +var BaseUpload = /*#__PURE__*/function () { + function BaseUpload(file, options) { + _classCallCheck(this, BaseUpload); // Warn about removed options from previous versions + + + if ("resume" in options) { + console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."); // eslint-disable-line no-console + } // The default options will already be added from the wrapper classes. + + + this.options = options; // The storage module used to store URLs + + this._urlStorage = this.options.urlStorage; // The underlying File/Blob object + + this.file = file; // The URL against which the file will be uploaded + + this.url = null; // The underlying request object for the current PATCH request + + this._req = null; // The fingerpinrt for the current file (set after start()) + + this._fingerprint = null; // The key that the URL storage returned when saving an URL with a fingerprint, + + this._urlStorageKey = null; // The offset used in the current PATCH request + + this._offset = null; // True if the current PATCH request has been aborted + + this._aborted = false; // The file's size in bytes + + this._size = null; // The Source object which will wrap around the given file and provides us + // with a unified interface for getting its size and slice chunks from its + // content allowing us to easily handle Files, Blobs, Buffers and Streams. + + this._source = null; // The current count of attempts which have been made. Zero indicates none. + + this._retryAttempt = 0; // The timeout's ID which is used to delay the next retry + + this._retryTimeout = null; // The offset of the remote upload before the latest attempt was started. + + this._offsetBeforeRetry = 0; // An array of BaseUpload instances which are used for uploading the different + // parts, if the parallelUploads option is used. + + this._parallelUploads = null; // An array of upload URLs which are used for uploading the different + // parts, if the parallelUploads option is used. + + this._parallelUploadUrls = null; + } + /** + * Use the Termination extension to delete an upload from the server by sending a DELETE + * request to the specified upload URL. This is only possible if the server supports the + * Termination extension. If the `options.retryDelays` property is set, the method will + * also retry if an error ocurrs. + * + * @param {String} url The upload's URL which will be terminated. + * @param {object} options Optional options for influencing HTTP requests. + * @return {Promise} The Promise will be resolved/rejected when the requests finish. + */ + + + _createClass(BaseUpload, [{ + key: "findPreviousUploads", + value: function findPreviousUploads() { + var _this = this; + + return this.options.fingerprint(this.file, this.options).then(function (fingerprint) { + return _this._urlStorage.findUploadsByFingerprint(fingerprint); + }); + } + }, { + key: "resumeFromPreviousUpload", + value: function resumeFromPreviousUpload(previousUpload) { + this.url = previousUpload.uploadUrl || null; + this._parallelUploadUrls = previousUpload.parallelUploadUrls || null; + this._urlStorageKey = previousUpload.urlStorageKey; + } + }, { + key: "start", + value: function start() { + var _this2 = this; + + var file = this.file; + + if (!file) { + this._emitError(new Error("tus: no file or stream to upload provided")); + + return; + } + + if (!this.options.endpoint && !this.options.uploadUrl) { + this._emitError(new Error("tus: neither an endpoint or an upload URL is provided")); + + return; + } + + var retryDelays = this.options.retryDelays; + + if (retryDelays != null && Object.prototype.toString.call(retryDelays) !== "[object Array]") { + this._emitError(new Error("tus: the `retryDelays` option must either be an array or null")); + + return; + } + + if (this.options.parallelUploads > 1) { + // Test which options are incompatible with parallel uploads. + ["uploadUrl", "uploadSize", "uploadLengthDeferred"].forEach(function (optionName) { + if (_this2.options[optionName]) { + _this2._emitError(new Error("tus: cannot use the ".concat(optionName, " option when parallelUploads is enabled"))); + } + }); + } + + this.options.fingerprint(file, this.options).then(function (fingerprint) { + if (fingerprint == null) { + (0, _logger.log)("No fingerprint was calculated meaning that the upload cannot be stored in the URL storage."); + } else { + (0, _logger.log)("Calculated fingerprint: ".concat(fingerprint)); + } + + _this2._fingerprint = fingerprint; + + if (_this2._source) { + return _this2._source; + } else { + return _this2.options.fileReader.openFile(file, _this2.options.chunkSize); + } + }).then(function (source) { + _this2._source = source; // If the upload was configured to use multiple requests or if we resume from + // an upload which used multiple requests, we start a parallel upload. + + if (_this2.options.parallelUploads > 1 || _this2._parallelUploadUrls != null) { + _this2._startParallelUpload(); + } else { + _this2._startSingleUpload(); + } + })["catch"](function (err) { + _this2._emitError(err); + }); + } + /** + * Initiate the uploading procedure for a parallelized upload, where one file is split into + * multiple request which are run in parallel. + * + * @api private + */ + + }, { + key: "_startParallelUpload", + value: function _startParallelUpload() { + var _this3 = this; + + var totalSize = this._size = this._source.size; + var totalProgress = 0; + this._parallelUploads = []; + var partCount = this._parallelUploadUrls != null ? this._parallelUploadUrls.length : this.options.parallelUploads; // The input file will be split into multiple slices which are uploaded in separate + // requests. Here we generate the start and end position for the slices. + + var parts = splitSizeIntoParts(this._source.size, partCount, this._parallelUploadUrls); // Create an empty list for storing the upload URLs + + this._parallelUploadUrls = new Array(parts.length); // Generate a promise for each slice that will be resolve if the respective + // upload is completed. + + var uploads = parts.map(function (part, index) { + var lastPartProgress = 0; + return _this3._source.slice(part.start, part.end).then(function (_ref) { + var value = _ref.value; + return new Promise(function (resolve, reject) { + // Merge with the user supplied options but overwrite some values. + var options = _objectSpread({}, _this3.options, { + // If available, the partial upload should be resumed from a previous URL. + uploadUrl: part.uploadUrl || null, + // We take manually care of resuming for partial uploads, so they should + // not be stored in the URL storage. + storeFingerprintForResuming: false, + removeFingerprintOnSuccess: false, + // Reset the parallelUploads option to not cause recursion. + parallelUploads: 1, + metadata: {}, + // Add the header to indicate the this is a partial upload. + headers: _objectSpread({}, _this3.options.headers, { + "Upload-Concat": "partial" + }), + // Reject or resolve the promise if the upload errors or completes. + onSuccess: resolve, + onError: reject, + // Based in the progress for this partial upload, calculate the progress + // for the entire final upload. + onProgress: function onProgress(newPartProgress) { + totalProgress = totalProgress - lastPartProgress + newPartProgress; + lastPartProgress = newPartProgress; + + _this3._emitProgress(totalProgress, totalSize); + }, + // Wait until every partial upload has an upload URL, so we can add + // them to the URL storage. + _onUploadUrlAvailable: function _onUploadUrlAvailable() { + _this3._parallelUploadUrls[index] = upload.url; // Test if all uploads have received an URL + + if (_this3._parallelUploadUrls.filter(function (u) { + return !!u; + }).length === parts.length) { + _this3._saveUploadInUrlStorage(); + } + } + }); + + var upload = new BaseUpload(value, options); + upload.start(); // Store the upload in an array, so we can later abort them if necessary. + + _this3._parallelUploads.push(upload); + }); + }); + }); + var req; // Wait until all partial uploads are finished and we can send the POST request for + // creating the final upload. + + Promise.all(uploads).then(function () { + req = _this3._openRequest("POST", _this3.options.endpoint); + req.setHeader("Upload-Concat", "final;".concat(_this3._parallelUploadUrls.join(" "))); // Add metadata if values have been added + + var metadata = encodeMetadata(_this3.options.metadata); + + if (metadata !== "") { + req.setHeader("Upload-Metadata", metadata); + } + + return _this3._sendRequest(req, null); + }).then(function (res) { + if (!inStatusCategory(res.getStatus(), 200)) { + _this3._emitHttpError(req, res, "tus: unexpected response while creating upload"); + + return; + } + + var location = res.getHeader("Location"); + + if (location == null) { + _this3._emitHttpError(req, res, "tus: invalid or missing Location header"); + + return; + } + + _this3.url = resolveUrl(_this3.options.endpoint, location); + (0, _logger.log)("Created upload at ".concat(_this3.url)); + + _this3._emitSuccess(); + })["catch"](function (err) { + _this3._emitError(err); + }); + } + /** + * Initiate the uploading procedure for a non-parallel upload. Here the entire file is + * uploaded in a sequential matter. + * + * @api private + */ + + }, { + key: "_startSingleUpload", + value: function _startSingleUpload() { + // First, we look at the uploadLengthDeferred option. + // Next, we check if the caller has supplied a manual upload size. + // Finally, we try to use the calculated size from the source object. + if (this.options.uploadLengthDeferred) { + this._size = null; + } else if (this.options.uploadSize != null) { + this._size = +this.options.uploadSize; + + if (isNaN(this._size)) { + this._emitError(new Error("tus: cannot convert `uploadSize` option into a number")); + + return; + } + } else { + this._size = this._source.size; + + if (this._size == null) { + this._emitError(new Error("tus: cannot automatically derive upload's size from input and must be specified manually using the `uploadSize` option")); + + return; + } + } // Reset the aborted flag when the upload is started or else the + // _performUpload will stop before sending a request if the upload has been + // aborted previously. + + + this._aborted = false; // The upload had been started previously and we should reuse this URL. + + if (this.url != null) { + (0, _logger.log)("Resuming upload from previous URL: ".concat(this.url)); + + this._resumeUpload(); + + return; + } // A URL has manually been specified, so we try to resume + + + if (this.options.uploadUrl != null) { + (0, _logger.log)("Resuming upload from provided URL: ".concat(this.options.url)); + this.url = this.options.uploadUrl; + + this._resumeUpload(); + + return; + } // An upload has not started for the file yet, so we start a new one + + + (0, _logger.log)("Creating a new upload"); + + this._createUpload(); + } + /** + * Abort any running request and stop the current upload. After abort is called, no event + * handler will be invoked anymore. You can use the `start` method to resume the upload + * again. + * If `shouldTerminate` is true, the `terminate` function will be called to remove the + * current upload from the server. + * + * @param {boolean} shouldTerminate True if the upload should be deleted from the server. + * @return {Promise} The Promise will be resolved/rejected when the requests finish. + */ + + }, { + key: "abort", + value: function abort(shouldTerminate, cb) { + var _this4 = this; + + if (typeof cb === "function") { + throw new Error("tus: the abort function does not accept a callback since v2 anymore; please use the returned Promise instead"); + } // Stop any parallel partial uploads, that have been started in _startParallelUploads. + + + if (this._parallelUploads != null) { + this._parallelUploads.forEach(function (upload) { + upload.abort(shouldTerminate); + }); + } // Stop any current running request. + + + if (this._req !== null) { + this._req.abort(); + + this._source.close(); + } + + this._aborted = true; // Stop any timeout used for initiating a retry. + + if (this._retryTimeout != null) { + clearTimeout(this._retryTimeout); + this._retryTimeout = null; + } + + if (!shouldTerminate || this.url == null) { + return Promise.resolve(); + } + + return BaseUpload.terminate(this.url, this.options) // Remove entry from the URL storage since the upload URL is no longer valid. + .then(function () { + return _this4._removeFromUrlStorage(); + }); + } + }, { + key: "_emitHttpError", + value: function _emitHttpError(req, res, message, causingErr) { + this._emitError(new _error.default(message, causingErr, req, res)); + } + }, { + key: "_emitError", + value: function _emitError(err) { + var _this5 = this; // Do not emit errors, e.g. from aborted HTTP requests, if the upload has been stopped. + + + if (this._aborted) return; // Check if we should retry, when enabled, before sending the error to the user. + + if (this.options.retryDelays != null) { + // We will reset the attempt counter if + // - we were already able to connect to the server (offset != null) and + // - we were able to upload a small chunk of data to the server + var shouldResetDelays = this._offset != null && this._offset > this._offsetBeforeRetry; + + if (shouldResetDelays) { + this._retryAttempt = 0; + } + + if (shouldRetry(err, this._retryAttempt, this.options)) { + var delay = this.options.retryDelays[this._retryAttempt++]; + this._offsetBeforeRetry = this._offset; + this._retryTimeout = setTimeout(function () { + _this5.start(); + }, delay); + return; + } + } + + if (typeof this.options.onError === "function") { + this.options.onError(err); + } else { + throw err; + } + } + /** + * Publishes notification if the upload has been successfully completed. + * + * @api private + */ + + }, { + key: "_emitSuccess", + value: function _emitSuccess() { + if (this.options.removeFingerprintOnSuccess) { + // Remove stored fingerprint and corresponding endpoint. This causes + // new uploads of the same file to be treated as a different file. + this._removeFromUrlStorage(); + } + + if (typeof this.options.onSuccess === "function") { + this.options.onSuccess(); + } + } + /** + * Publishes notification when data has been sent to the server. This + * data may not have been accepted by the server yet. + * + * @param {number} bytesSent Number of bytes sent to the server. + * @param {number} bytesTotal Total number of bytes to be sent to the server. + * @api private + */ + + }, { + key: "_emitProgress", + value: function _emitProgress(bytesSent, bytesTotal) { + if (typeof this.options.onProgress === "function") { + this.options.onProgress(bytesSent, bytesTotal); + } + } + /** + * Publishes notification when a chunk of data has been sent to the server + * and accepted by the server. + * @param {number} chunkSize Size of the chunk that was accepted by the server. + * @param {number} bytesAccepted Total number of bytes that have been + * accepted by the server. + * @param {number} bytesTotal Total number of bytes to be sent to the server. + * @api private + */ + + }, { + key: "_emitChunkComplete", + value: function _emitChunkComplete(chunkSize, bytesAccepted, bytesTotal) { + if (typeof this.options.onChunkComplete === "function") { + this.options.onChunkComplete(chunkSize, bytesAccepted, bytesTotal); + } + } + /** + * Create a new upload using the creation extension by sending a POST + * request to the endpoint. After successful creation the file will be + * uploaded + * + * @api private + */ + + }, { + key: "_createUpload", + value: function _createUpload() { + var _this6 = this; + + if (!this.options.endpoint) { + this._emitError(new Error("tus: unable to create upload because no endpoint is provided")); + + return; + } + + var req = this._openRequest("POST", this.options.endpoint); + + if (this.options.uploadLengthDeferred) { + req.setHeader("Upload-Defer-Length", 1); + } else { + req.setHeader("Upload-Length", this._size); + } // Add metadata if values have been added + + + var metadata = encodeMetadata(this.options.metadata); + + if (metadata !== "") { + req.setHeader("Upload-Metadata", metadata); + } + + var promise; + + if (this.options.uploadDataDuringCreation && !this.options.uploadLengthDeferred) { + this._offset = 0; + promise = this._addChunkToRequest(req); + } else { + promise = this._sendRequest(req, null); + } + + promise.then(function (res) { + if (!inStatusCategory(res.getStatus(), 200)) { + _this6._emitHttpError(req, res, "tus: unexpected response while creating upload"); + + return; + } + + var location = res.getHeader("Location"); + + if (location == null) { + _this6._emitHttpError(req, res, "tus: invalid or missing Location header"); + + return; + } + + _this6.url = resolveUrl(_this6.options.endpoint, location); + (0, _logger.log)("Created upload at ".concat(_this6.url)); + + if (typeof _this6.options._onUploadUrlAvailable === "function") { + _this6.options._onUploadUrlAvailable(); + } + + if (_this6._size === 0) { + // Nothing to upload and file was successfully created + _this6._emitSuccess(); + + _this6._source.close(); + + return; + } + + _this6._saveUploadInUrlStorage(); + + if (_this6.options.uploadDataDuringCreation) { + _this6._handleUploadResponse(req, res); + } else { + _this6._offset = 0; + + _this6._performUpload(); + } + })["catch"](function (err) { + _this6._emitHttpError(req, null, "tus: failed to create upload", err); + }); + } + /* + * Try to resume an existing upload. First a HEAD request will be sent + * to retrieve the offset. If the request fails a new upload will be + * created. In the case of a successful response the file will be uploaded. + * + * @api private + */ + + }, { + key: "_resumeUpload", + value: function _resumeUpload() { + var _this7 = this; + + var req = this._openRequest("HEAD", this.url); + + var promise = this._sendRequest(req, null); + + promise.then(function (res) { + var status = res.getStatus(); + + if (!inStatusCategory(status, 200)) { + if (inStatusCategory(status, 400)) { + // Remove stored fingerprint and corresponding endpoint, + // on client errors since the file can not be found + _this7._removeFromUrlStorage(); + } // If the upload is locked (indicated by the 423 Locked status code), we + // emit an error instead of directly starting a new upload. This way the + // retry logic can catch the error and will retry the upload. An upload + // is usually locked for a short period of time and will be available + // afterwards. + + + if (status === 423) { + _this7._emitHttpError(req, res, "tus: upload is currently locked; retry later"); + + return; + } + + if (!_this7.options.endpoint) { + // Don't attempt to create a new upload if no endpoint is provided. + _this7._emitHttpError(req, res, "tus: unable to resume upload (new upload cannot be created without an endpoint)"); + + return; + } // Try to create a new upload + + + _this7.url = null; + + _this7._createUpload(); + + return; + } + + var offset = parseInt(res.getHeader("Upload-Offset"), 10); + + if (isNaN(offset)) { + _this7._emitHttpError(req, res, "tus: invalid or missing offset value"); + + return; + } + + var length = parseInt(res.getHeader("Upload-Length"), 10); + + if (isNaN(length) && !_this7.options.uploadLengthDeferred) { + _this7._emitHttpError(req, res, "tus: invalid or missing length value"); + + return; + } + + if (typeof _this7.options._onUploadUrlAvailable === "function") { + _this7.options._onUploadUrlAvailable(); + } // Upload has already been completed and we do not need to send additional + // data to the server + + + if (offset === length) { + _this7._emitProgress(length, length); + + _this7._emitSuccess(); + + return; + } + + _this7._offset = offset; + + _this7._performUpload(); + })["catch"](function (err) { + _this7._emitHttpError(req, null, "tus: failed to resume upload", err); + }); + } + /** + * Start uploading the file using PATCH requests. The file will be divided + * into chunks as specified in the chunkSize option. During the upload + * the onProgress event handler may be invoked multiple times. + * + * @api private + */ + + }, { + key: "_performUpload", + value: function _performUpload() { + var _this8 = this; // If the upload has been aborted, we will not send the next PATCH request. + // This is important if the abort method was called during a callback, such + // as onChunkComplete or onProgress. + + + if (this._aborted) { + return; + } + + var req; // Some browser and servers may not support the PATCH method. For those + // cases, you can tell tus-js-client to use a POST request with the + // X-HTTP-Method-Override header for simulating a PATCH request. + + if (this.options.overridePatchMethod) { + req = this._openRequest("POST", this.url); + req.setHeader("X-HTTP-Method-Override", "PATCH"); + } else { + req = this._openRequest("PATCH", this.url); + } + + req.setHeader("Upload-Offset", this._offset); + + var promise = this._addChunkToRequest(req); + + promise.then(function (res) { + if (!inStatusCategory(res.getStatus(), 200)) { + _this8._emitHttpError(req, res, "tus: unexpected response while uploading chunk"); + + return; + } + + _this8._handleUploadResponse(req, res); + })["catch"](function (err) { + // Don't emit an error if the upload was aborted manually + if (_this8._aborted) { + return; + } + + _this8._emitHttpError(req, null, "tus: failed to upload chunk at offset " + _this8._offset, err); + }); + } + /** + * _addChunktoRequest reads a chunk from the source and sends it using the + * supplied request object. It will not handle the response. + * + * @api private + */ + + }, { + key: "_addChunkToRequest", + value: function _addChunkToRequest(req) { + var _this9 = this; + + var start = this._offset; + var end = this._offset + this.options.chunkSize; + req.setProgressHandler(function (bytesSent) { + _this9._emitProgress(start + bytesSent, _this9._size); + }); + req.setHeader("Content-Type", "application/offset+octet-stream"); // The specified chunkSize may be Infinity or the calcluated end position + // may exceed the file's size. In both cases, we limit the end position to + // the input's total size for simpler calculations and correctness. + + if ((end === Infinity || end > this._size) && !this.options.uploadLengthDeferred) { + end = this._size; + } + + return this._source.slice(start, end).then(function (_ref2) { + var value = _ref2.value, + done = _ref2.done; // If the upload length is deferred, the upload size was not specified during + // upload creation. So, if the file reader is done reading, we know the total + // upload size and can tell the tus server. + + if (_this9.options.uploadLengthDeferred && done) { + _this9._size = _this9._offset + (value && value.size ? value.size : 0); + req.setHeader("Upload-Length", _this9._size); + } + + if (value === null) { + return _this9._sendRequest(req); + } else { + _this9._emitProgress(_this9._offset, _this9._size); + + return _this9._sendRequest(req, value); + } + }); + } + /** + * _handleUploadResponse is used by requests that haven been sent using _addChunkToRequest + * and already have received a response. + * + * @api private + */ + + }, { + key: "_handleUploadResponse", + value: function _handleUploadResponse(req, res) { + var offset = parseInt(res.getHeader("Upload-Offset"), 10); + + if (isNaN(offset)) { + this._emitHttpError(req, res, "tus: invalid or missing offset value"); + + return; + } + + this._emitProgress(offset, this._size); + + this._emitChunkComplete(offset - this._offset, offset, this._size); + + this._offset = offset; + + if (offset == this._size) { + // Yay, finally done :) + this._emitSuccess(); + + this._source.close(); + + return; + } + + this._performUpload(); + } + /** + * Create a new HTTP request object with the given method and URL. + * + * @api private + */ + + }, { + key: "_openRequest", + value: function _openRequest(method, url) { + var req = openRequest(method, url, this.options); + this._req = req; + return req; + } + /** + * Remove the entry in the URL storage, if it has been saved before. + * + * @api private + */ + + }, { + key: "_removeFromUrlStorage", + value: function _removeFromUrlStorage() { + var _this10 = this; + + if (!this._urlStorageKey) return; + + this._urlStorage.removeUpload(this._urlStorageKey)["catch"](function (err) { + _this10._emitError(err); + }); + + this._urlStorageKey = null; + } + /** + * Add the upload URL to the URL storage, if possible. + * + * @api private + */ + + }, { + key: "_saveUploadInUrlStorage", + value: function _saveUploadInUrlStorage() { + var _this11 = this; // Only if a fingerprint was calculated for the input (i.e. not a stream), we can store the upload URL. + + + if (!this.options.storeFingerprintForResuming || !this._fingerprint) { + return; + } + + var storedUpload = { + size: this._size, + metadata: this.options.metadata, + creationTime: new Date().toString() + }; + + if (this._parallelUploads) { + // Save multiple URLs if the parallelUploads option is used ... + storedUpload.parallelUploadUrls = this._parallelUploadUrls; + } else { + // ... otherwise we just save the one available URL. + storedUpload.uploadUrl = this.url; + } + + this._urlStorage.addUpload(this._fingerprint, storedUpload).then(function (urlStorageKey) { + return _this11._urlStorageKey = urlStorageKey; + })["catch"](function (err) { + _this11._emitError(err); + }); + } + /** + * Send a request with the provided body while invoking the onBeforeRequest + * and onAfterResponse callbacks. + * + * @api private + */ + + }, { + key: "_sendRequest", + value: function _sendRequest(req) { + var _this12 = this; + + var body = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + if (typeof this.options.onBeforeRequest === "function") { + this.options.onBeforeRequest(req); + } + + return req.send(body).then(function (res) { + if (typeof _this12.options.onAfterResponse === "function") { + _this12.options.onAfterResponse(req, res); + } + + return res; + }); + } + }], [{ + key: "terminate", + value: function terminate(url) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var cb = arguments.length > 2 ? arguments[2] : undefined; + + if (typeof options === "function" || typeof cb === "function") { + throw new Error("tus: the terminate function does not accept a callback since v2 anymore; please use the returned Promise instead"); + } + + var req = openRequest("DELETE", url, options); + var promise = req.send(); + return promise.then(function (res) { + // A 204 response indicates a successfull request + if (res.getStatus() === 204) { + return; + } + + throw new _error.default("tus: unexpected response while terminating upload", null, req, res); + })["catch"](function (err) { + if (!(err instanceof _error.default)) { + err = new _error.default("tus: failed to terminate upload", err, req, null); + } + + if (!shouldRetry(err, 0, options)) { + throw err; + } // Instead of keeping track of the retry attempts, we remove the first element from the delays + // array. If the array is empty, all retry attempts are used up and we will bubble up the error. + // We recursively call the terminate function will removing elements from the retryDelays array. + + + var delay = options.retryDelays[0]; + var remainingDelays = options.retryDelays.slice(1); + + var newOptions = _objectSpread({}, options, { + retryDelays: remainingDelays + }); + + return new Promise(function (resolve) { + return setTimeout(resolve, delay); + }).then(function () { + return BaseUpload.terminate(url, newOptions); + }); + }); + } + }]); + + return BaseUpload; +}(); + +function encodeMetadata(metadata) { + var encoded = []; + + for (var key in metadata) { + encoded.push(key + " " + _jsBase.Base64.encode(metadata[key])); + } + + return encoded.join(","); +} +/** + * Checks whether a given status is in the range of the expected category. + * For example, only a status between 200 and 299 will satisfy the category 200. + * + * @api private + */ + + +function inStatusCategory(status, category) { + return status >= category && status < category + 100; +} +/** + * Create a new HTTP request with the specified method and URL. + * The necessary headers that are included in every request + * will be added, including the request ID. + * + * @api private + */ + + +function openRequest(method, url, options) { + var req = options.httpStack.createRequest(method, url); + req.setHeader("Tus-Resumable", "1.0.0"); + var headers = options.headers || {}; + + for (var name in headers) { + req.setHeader(name, headers[name]); + } + + if (options.addRequestId) { + var requestId = (0, _uuid.default)(); + req.setHeader("X-Request-ID", requestId); + } + + return req; +} +/** + * Checks whether the browser running this code has internet access. + * This function will always return true in the node.js environment + * + * @api private + */ + + +function isOnline() { + var online = true; + + if (typeof window !== "undefined" && "navigator" in window && window.navigator.onLine === false) { + online = false; + } + + return online; +} +/** + * Checks whether or not it is ok to retry a request. + * @param {Error} err the error returned from the last request + * @param {number} retryAttempt the number of times the request has already been retried + * @param {object} options tus Upload options + * + * @api private + */ + + +function shouldRetry(err, retryAttempt, options) { + // We only attempt a retry if + // - retryDelays option is set + // - we didn't exceed the maxium number of retries, yet, and + // - this error was caused by a request or it's response and + // - the error is server error (i.e. no a status 4xx or a 409 or 423) and + // - the browser does not indicate that we are offline + var status = err.originalResponse ? err.originalResponse.getStatus() : 0; + var isServerError = !inStatusCategory(status, 400) || status === 409 || status === 423; + return options.retryDelays != null && retryAttempt < options.retryDelays.length && err.originalRequest != null && isServerError && isOnline(); +} +/** + * Resolve a relative link given the origin as source. For example, + * if a HTTP request to http://example.com/files/ returns a Location + * header with the value /upload/abc, the resolved URL will be: + * http://example.com/upload/abc + */ + + +function resolveUrl(origin, link) { + return new _urlParse.default(link, origin).toString(); +} +/** + * Calculate the start and end positions for the parts if an upload + * is split into multiple parallel requests. + * + * @param {number} totalSize The byte size of the upload, which will be split. + * @param {number} partCount The number in how many parts the upload will be split. + * @param {string[]} previousUrls The upload URLs for previous parts. + * @return {object[]} + * @api private + */ + + +function splitSizeIntoParts(totalSize, partCount, previousUrls) { + var partSize = Math.floor(totalSize / partCount); + var parts = []; + + for (var i = 0; i < partCount; i++) { + parts.push({ + start: partSize * i, + end: partSize * (i + 1) + }); + } + + parts[partCount - 1].end = totalSize; // Attach URLs from previous uploads, if available. + + if (previousUrls) { + parts.forEach(function (part, index) { + part.uploadUrl = previousUrls[index] || null; + }); + } + + return parts; +} + +BaseUpload.defaultOptions = defaultOptions; +var _default = BaseUpload; +exports.default = _default; +},{"./error":54,"./logger":55,"./uuid":58,"js-base64":32,"url-parse":59}],58:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = uuid; + +/** + * Generate a UUID v4 based on random numbers. We intentioanlly use the less + * secure Math.random function here since the more secure crypto.getRandomNumbers + * is not available on all platforms. + * This is not a problem for us since we use the UUID only for generating a + * request ID, so we can correlate server logs to client errors. + * + * This function is taken from following site: + * https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript + * + * @return {string} The generate UUID + */ +function uuid() { + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == "x" ? r : r & 0x3 | 0x8; + return v.toString(16); + }); +} +},{}],59:[function(require,module,exports){ +(function (global){(function (){ +'use strict'; + +var required = require('requires-port') + , qs = require('querystringify') + , slashes = /^[A-Za-z][A-Za-z0-9+-.]*:[\\/]+/ + , protocolre = /^([a-z][a-z0-9.+-]*:)?([\\/]{1,})?([\S\s]*)/i + , whitespace = '[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]' + , left = new RegExp('^'+ whitespace +'+'); + +/** + * Trim a given string. + * + * @param {String} str String to trim. + * @public + */ +function trimLeft(str) { + return (str ? str : '').toString().replace(left, ''); +} + +/** + * These are the parse rules for the URL parser, it informs the parser + * about: + * + * 0. The char it Needs to parse, if it's a string it should be done using + * indexOf, RegExp using exec and NaN means set as current value. + * 1. The property we should set when parsing this value. + * 2. Indication if it's backwards or forward parsing, when set as number it's + * the value of extra chars that should be split off. + * 3. Inherit from location if non existing in the parser. + * 4. `toLowerCase` the resulting value. + */ +var rules = [ + ['#', 'hash'], // Extract from the back. + ['?', 'query'], // Extract from the back. + function sanitize(address) { // Sanitize what is left of the address + return address.replace('\\', '/'); + }, + ['/', 'pathname'], // Extract from the back. + ['@', 'auth', 1], // Extract from the front. + [NaN, 'host', undefined, 1, 1], // Set left over value. + [/:(\d+)$/, 'port', undefined, 1], // RegExp the back. + [NaN, 'hostname', undefined, 1, 1] // Set left over. +]; + +/** + * These properties should not be copied or inherited from. This is only needed + * for all non blob URL's as a blob URL does not include a hash, only the + * origin. + * + * @type {Object} + * @private + */ +var ignore = { hash: 1, query: 1 }; + +/** + * The location object differs when your code is loaded through a normal page, + * Worker or through a worker using a blob. And with the blobble begins the + * trouble as the location object will contain the URL of the blob, not the + * location of the page where our code is loaded in. The actual origin is + * encoded in the `pathname` so we can thankfully generate a good "default" + * location from it so we can generate proper relative URL's again. + * + * @param {Object|String} loc Optional default location object. + * @returns {Object} lolcation object. + * @public + */ +function lolcation(loc) { + var globalVar; + + if (typeof window !== 'undefined') globalVar = window; + else if (typeof global !== 'undefined') globalVar = global; + else if (typeof self !== 'undefined') globalVar = self; + else globalVar = {}; + + var location = globalVar.location || {}; + loc = loc || location; + + var finaldestination = {} + , type = typeof loc + , key; + + if ('blob:' === loc.protocol) { + finaldestination = new Url(unescape(loc.pathname), {}); + } else if ('string' === type) { + finaldestination = new Url(loc, {}); + for (key in ignore) delete finaldestination[key]; + } else if ('object' === type) { + for (key in loc) { + if (key in ignore) continue; + finaldestination[key] = loc[key]; + } + + if (finaldestination.slashes === undefined) { + finaldestination.slashes = slashes.test(loc.href); + } + } + + return finaldestination; +} + +/** + * @typedef ProtocolExtract + * @type Object + * @property {String} protocol Protocol matched in the URL, in lowercase. + * @property {Boolean} slashes `true` if protocol is followed by "//", else `false`. + * @property {String} rest Rest of the URL that is not part of the protocol. + */ + +/** + * Extract protocol information from a URL with/without double slash ("//"). + * + * @param {String} address URL we want to extract from. + * @return {ProtocolExtract} Extracted information. + * @private + */ +function extractProtocol(address) { + address = trimLeft(address); + + var match = protocolre.exec(address) + , protocol = match[1] ? match[1].toLowerCase() : '' + , slashes = !!(match[2] && match[2].length >= 2) + , rest = match[2] && match[2].length === 1 ? '/' + match[3] : match[3]; + + return { + protocol: protocol, + slashes: slashes, + rest: rest + }; +} + +/** + * Resolve a relative URL pathname against a base URL pathname. + * + * @param {String} relative Pathname of the relative URL. + * @param {String} base Pathname of the base URL. + * @return {String} Resolved pathname. + * @private + */ +function resolve(relative, base) { + if (relative === '') return base; + + var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/')) + , i = path.length + , last = path[i - 1] + , unshift = false + , up = 0; + + while (i--) { + if (path[i] === '.') { + path.splice(i, 1); + } else if (path[i] === '..') { + path.splice(i, 1); + up++; + } else if (up) { + if (i === 0) unshift = true; + path.splice(i, 1); + up--; + } + } + + if (unshift) path.unshift(''); + if (last === '.' || last === '..') path.push(''); + + return path.join('/'); +} + +/** + * The actual URL instance. Instead of returning an object we've opted-in to + * create an actual constructor as it's much more memory efficient and + * faster and it pleases my OCD. + * + * It is worth noting that we should not use `URL` as class name to prevent + * clashes with the global URL instance that got introduced in browsers. + * + * @constructor + * @param {String} address URL we want to parse. + * @param {Object|String} [location] Location defaults for relative paths. + * @param {Boolean|Function} [parser] Parser for the query string. + * @private + */ +function Url(address, location, parser) { + address = trimLeft(address); + + if (!(this instanceof Url)) { + return new Url(address, location, parser); + } + + var relative, extracted, parse, instruction, index, key + , instructions = rules.slice() + , type = typeof location + , url = this + , i = 0; + + // + // The following if statements allows this module two have compatibility with + // 2 different API: + // + // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments + // where the boolean indicates that the query string should also be parsed. + // + // 2. The `URL` interface of the browser which accepts a URL, object as + // arguments. The supplied object will be used as default values / fall-back + // for relative paths. + // + if ('object' !== type && 'string' !== type) { + parser = location; + location = null; + } + + if (parser && 'function' !== typeof parser) parser = qs.parse; + + location = lolcation(location); + + // + // Extract protocol information before running the instructions. + // + extracted = extractProtocol(address || ''); + relative = !extracted.protocol && !extracted.slashes; + url.slashes = extracted.slashes || relative && location.slashes; + url.protocol = extracted.protocol || location.protocol || ''; + address = extracted.rest; + + // + // When the authority component is absent the URL starts with a path + // component. + // + if (!extracted.slashes) instructions[3] = [/(.*)/, 'pathname']; + + for (; i < instructions.length; i++) { + instruction = instructions[i]; + + if (typeof instruction === 'function') { + address = instruction(address); + continue; + } + + parse = instruction[0]; + key = instruction[1]; + + if (parse !== parse) { + url[key] = address; + } else if ('string' === typeof parse) { + if (~(index = address.indexOf(parse))) { + if ('number' === typeof instruction[2]) { + url[key] = address.slice(0, index); + address = address.slice(index + instruction[2]); + } else { + url[key] = address.slice(index); + address = address.slice(0, index); + } + } + } else if ((index = parse.exec(address))) { + url[key] = index[1]; + address = address.slice(0, index.index); + } + + url[key] = url[key] || ( + relative && instruction[3] ? location[key] || '' : '' + ); + + // + // Hostname, host and protocol should be lowercased so they can be used to + // create a proper `origin`. + // + if (instruction[4]) url[key] = url[key].toLowerCase(); + } + + // + // Also parse the supplied query string in to an object. If we're supplied + // with a custom parser as function use that instead of the default build-in + // parser. + // + if (parser) url.query = parser(url.query); + + // + // If the URL is relative, resolve the pathname against the base URL. + // + if ( + relative + && location.slashes + && url.pathname.charAt(0) !== '/' + && (url.pathname !== '' || location.pathname !== '') + ) { + url.pathname = resolve(url.pathname, location.pathname); + } + + // + // Default to a / for pathname if none exists. This normalizes the URL + // to always have a / + // + if (url.pathname.charAt(0) !== '/' && url.hostname) { + url.pathname = '/' + url.pathname; + } + + // + // We should not add port numbers if they are already the default port number + // for a given protocol. As the host also contains the port number we're going + // override it with the hostname which contains no port number. + // + if (!required(url.port, url.protocol)) { + url.host = url.hostname; + url.port = ''; + } + + // + // Parse down the `auth` for the username and password. + // + url.username = url.password = ''; + if (url.auth) { + instruction = url.auth.split(':'); + url.username = instruction[0] || ''; + url.password = instruction[1] || ''; + } + + url.origin = url.protocol && url.host && url.protocol !== 'file:' + ? url.protocol +'//'+ url.host + : 'null'; + + // + // The href is just the compiled result. + // + url.href = url.toString(); +} + +/** + * This is convenience method for changing properties in the URL instance to + * insure that they all propagate correctly. + * + * @param {String} part Property we need to adjust. + * @param {Mixed} value The newly assigned value. + * @param {Boolean|Function} fn When setting the query, it will be the function + * used to parse the query. + * When setting the protocol, double slash will be + * removed from the final url if it is true. + * @returns {URL} URL instance for chaining. + * @public + */ +function set(part, value, fn) { + var url = this; + + switch (part) { + case 'query': + if ('string' === typeof value && value.length) { + value = (fn || qs.parse)(value); + } + + url[part] = value; + break; + + case 'port': + url[part] = value; + + if (!required(value, url.protocol)) { + url.host = url.hostname; + url[part] = ''; + } else if (value) { + url.host = url.hostname +':'+ value; + } + + break; + + case 'hostname': + url[part] = value; + + if (url.port) value += ':'+ url.port; + url.host = value; + break; + + case 'host': + url[part] = value; + + if (/:\d+$/.test(value)) { + value = value.split(':'); + url.port = value.pop(); + url.hostname = value.join(':'); + } else { + url.hostname = value; + url.port = ''; + } + + break; + + case 'protocol': + url.protocol = value.toLowerCase(); + url.slashes = !fn; + break; + + case 'pathname': + case 'hash': + if (value) { + var char = part === 'pathname' ? '/' : '#'; + url[part] = value.charAt(0) !== char ? char + value : value; + } else { + url[part] = value; + } + break; + + default: + url[part] = value; + } + + for (var i = 0; i < rules.length; i++) { + var ins = rules[i]; + + if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase(); + } + + url.origin = url.protocol && url.host && url.protocol !== 'file:' + ? url.protocol +'//'+ url.host + : 'null'; + + url.href = url.toString(); + + return url; +} + +/** + * Transform the properties back in to a valid and full URL string. + * + * @param {Function} stringify Optional query stringify function. + * @returns {String} Compiled version of the URL. + * @public + */ +function toString(stringify) { + if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify; + + var query + , url = this + , protocol = url.protocol; + + if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':'; + + var result = protocol + (url.slashes ? '//' : ''); + + if (url.username) { + result += url.username; + if (url.password) result += ':'+ url.password; + result += '@'; + } + + result += url.host + url.pathname; + + query = 'object' === typeof url.query ? stringify(url.query) : url.query; + if (query) result += '?' !== query.charAt(0) ? '?'+ query : query; + + if (url.hash) result += url.hash; + + return result; +} + +Url.prototype = { set: set, toString: toString }; + +// +// Expose the URL parser and some additional properties that might be useful for +// others or testing. +// +Url.extractProtocol = extractProtocol; +Url.location = lolcation; +Url.trimLeft = trimLeft; +Url.qs = qs; + +module.exports = Url; + +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"querystringify":41,"requires-port":42}],60:[function(require,module,exports){ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.WHATWGFetch = {}))); +}(this, (function (exports) { 'use strict'; + + var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof self !== 'undefined' && self) || + (typeof global !== 'undefined' && global); + + var support = { + searchParams: 'URLSearchParams' in global, + iterable: 'Symbol' in global && 'iterator' in Symbol, + blob: + 'FileReader' in global && + 'Blob' in global && + (function() { + try { + new Blob(); + return true + } catch (e) { + return false + } + })(), + formData: 'FormData' in global, + arrayBuffer: 'ArrayBuffer' in global + }; + + function isDataView(obj) { + return obj && DataView.prototype.isPrototypeOf(obj) + } + + if (support.arrayBuffer) { + var viewClasses = [ + '[object Int8Array]', + '[object Uint8Array]', + '[object Uint8ClampedArray]', + '[object Int16Array]', + '[object Uint16Array]', + '[object Int32Array]', + '[object Uint32Array]', + '[object Float32Array]', + '[object Float64Array]' + ]; + + var isArrayBufferView = + ArrayBuffer.isView || + function(obj) { + return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1 + }; + } + + function normalizeName(name) { + if (typeof name !== 'string') { + name = String(name); + } + if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') { + throw new TypeError('Invalid character in header field name: "' + name + '"') + } + return name.toLowerCase() + } + + function normalizeValue(value) { + if (typeof value !== 'string') { + value = String(value); + } + return value + } + + // Build a destructive iterator for the value list + function iteratorFor(items) { + var iterator = { + next: function() { + var value = items.shift(); + return {done: value === undefined, value: value} + } + }; + + if (support.iterable) { + iterator[Symbol.iterator] = function() { + return iterator + }; + } + + return iterator + } + + function Headers(headers) { + this.map = {}; + + if (headers instanceof Headers) { + headers.forEach(function(value, name) { + this.append(name, value); + }, this); + } else if (Array.isArray(headers)) { + headers.forEach(function(header) { + this.append(header[0], header[1]); + }, this); + } else if (headers) { + Object.getOwnPropertyNames(headers).forEach(function(name) { + this.append(name, headers[name]); + }, this); + } + } + + Headers.prototype.append = function(name, value) { + name = normalizeName(name); + value = normalizeValue(value); + var oldValue = this.map[name]; + this.map[name] = oldValue ? oldValue + ', ' + value : value; + }; + + Headers.prototype['delete'] = function(name) { + delete this.map[normalizeName(name)]; + }; + + Headers.prototype.get = function(name) { + name = normalizeName(name); + return this.has(name) ? this.map[name] : null + }; + + Headers.prototype.has = function(name) { + return this.map.hasOwnProperty(normalizeName(name)) + }; + + Headers.prototype.set = function(name, value) { + this.map[normalizeName(name)] = normalizeValue(value); + }; + + Headers.prototype.forEach = function(callback, thisArg) { + for (var name in this.map) { + if (this.map.hasOwnProperty(name)) { + callback.call(thisArg, this.map[name], name, this); + } + } + }; + + Headers.prototype.keys = function() { + var items = []; + this.forEach(function(value, name) { + items.push(name); + }); + return iteratorFor(items) + }; + + Headers.prototype.values = function() { + var items = []; + this.forEach(function(value) { + items.push(value); + }); + return iteratorFor(items) + }; + + Headers.prototype.entries = function() { + var items = []; + this.forEach(function(value, name) { + items.push([name, value]); + }); + return iteratorFor(items) + }; + + if (support.iterable) { + Headers.prototype[Symbol.iterator] = Headers.prototype.entries; + } + + function consumed(body) { + if (body.bodyUsed) { + return Promise.reject(new TypeError('Already read')) + } + body.bodyUsed = true; + } + + function fileReaderReady(reader) { + return new Promise(function(resolve, reject) { + reader.onload = function() { + resolve(reader.result); + }; + reader.onerror = function() { + reject(reader.error); + }; + }) + } + + function readBlobAsArrayBuffer(blob) { + var reader = new FileReader(); + var promise = fileReaderReady(reader); + reader.readAsArrayBuffer(blob); + return promise + } + + function readBlobAsText(blob) { + var reader = new FileReader(); + var promise = fileReaderReady(reader); + reader.readAsText(blob); + return promise + } + + function readArrayBufferAsText(buf) { + var view = new Uint8Array(buf); + var chars = new Array(view.length); + + for (var i = 0; i < view.length; i++) { + chars[i] = String.fromCharCode(view[i]); + } + return chars.join('') + } + + function bufferClone(buf) { + if (buf.slice) { + return buf.slice(0) + } else { + var view = new Uint8Array(buf.byteLength); + view.set(new Uint8Array(buf)); + return view.buffer + } + } + + function Body() { + this.bodyUsed = false; + + this._initBody = function(body) { + /* + fetch-mock wraps the Response object in an ES6 Proxy to + provide useful test harness features such as flush. However, on + ES5 browsers without fetch or Proxy support pollyfills must be used; + the proxy-pollyfill is unable to proxy an attribute unless it exists + on the object before the Proxy is created. This change ensures + Response.bodyUsed exists on the instance, while maintaining the + semantic of setting Request.bodyUsed in the constructor before + _initBody is called. + */ + this.bodyUsed = this.bodyUsed; + this._bodyInit = body; + if (!body) { + this._bodyText = ''; + } else if (typeof body === 'string') { + this._bodyText = body; + } else if (support.blob && Blob.prototype.isPrototypeOf(body)) { + this._bodyBlob = body; + } else if (support.formData && FormData.prototype.isPrototypeOf(body)) { + this._bodyFormData = body; + } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { + this._bodyText = body.toString(); + } else if (support.arrayBuffer && support.blob && isDataView(body)) { + this._bodyArrayBuffer = bufferClone(body.buffer); + // IE 10-11 can't handle a DataView body. + this._bodyInit = new Blob([this._bodyArrayBuffer]); + } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) { + this._bodyArrayBuffer = bufferClone(body); + } else { + this._bodyText = body = Object.prototype.toString.call(body); + } + + if (!this.headers.get('content-type')) { + if (typeof body === 'string') { + this.headers.set('content-type', 'text/plain;charset=UTF-8'); + } else if (this._bodyBlob && this._bodyBlob.type) { + this.headers.set('content-type', this._bodyBlob.type); + } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { + this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); + } + } + }; + + if (support.blob) { + this.blob = function() { + var rejected = consumed(this); + if (rejected) { + return rejected + } + + if (this._bodyBlob) { + return Promise.resolve(this._bodyBlob) + } else if (this._bodyArrayBuffer) { + return Promise.resolve(new Blob([this._bodyArrayBuffer])) + } else if (this._bodyFormData) { + throw new Error('could not read FormData body as blob') + } else { + return Promise.resolve(new Blob([this._bodyText])) + } + }; + + this.arrayBuffer = function() { + if (this._bodyArrayBuffer) { + var isConsumed = consumed(this); + if (isConsumed) { + return isConsumed + } + if (ArrayBuffer.isView(this._bodyArrayBuffer)) { + return Promise.resolve( + this._bodyArrayBuffer.buffer.slice( + this._bodyArrayBuffer.byteOffset, + this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength + ) + ) + } else { + return Promise.resolve(this._bodyArrayBuffer) + } + } else { + return this.blob().then(readBlobAsArrayBuffer) + } + }; + } + + this.text = function() { + var rejected = consumed(this); + if (rejected) { + return rejected + } + + if (this._bodyBlob) { + return readBlobAsText(this._bodyBlob) + } else if (this._bodyArrayBuffer) { + return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)) + } else if (this._bodyFormData) { + throw new Error('could not read FormData body as text') + } else { + return Promise.resolve(this._bodyText) + } + }; + + if (support.formData) { + this.formData = function() { + return this.text().then(decode) + }; + } + + this.json = function() { + return this.text().then(JSON.parse) + }; + + return this + } + + // HTTP methods whose capitalization should be normalized + var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']; + + function normalizeMethod(method) { + var upcased = method.toUpperCase(); + return methods.indexOf(upcased) > -1 ? upcased : method + } + + function Request(input, options) { + if (!(this instanceof Request)) { + throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.') + } + + options = options || {}; + var body = options.body; + + if (input instanceof Request) { + if (input.bodyUsed) { + throw new TypeError('Already read') + } + this.url = input.url; + this.credentials = input.credentials; + if (!options.headers) { + this.headers = new Headers(input.headers); + } + this.method = input.method; + this.mode = input.mode; + this.signal = input.signal; + if (!body && input._bodyInit != null) { + body = input._bodyInit; + input.bodyUsed = true; + } + } else { + this.url = String(input); + } + + this.credentials = options.credentials || this.credentials || 'same-origin'; + if (options.headers || !this.headers) { + this.headers = new Headers(options.headers); + } + this.method = normalizeMethod(options.method || this.method || 'GET'); + this.mode = options.mode || this.mode || null; + this.signal = options.signal || this.signal; + this.referrer = null; + + if ((this.method === 'GET' || this.method === 'HEAD') && body) { + throw new TypeError('Body not allowed for GET or HEAD requests') + } + this._initBody(body); + + if (this.method === 'GET' || this.method === 'HEAD') { + if (options.cache === 'no-store' || options.cache === 'no-cache') { + // Search for a '_' parameter in the query string + var reParamSearch = /([?&])_=[^&]*/; + if (reParamSearch.test(this.url)) { + // If it already exists then set the value with the current time + this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime()); + } else { + // Otherwise add a new '_' parameter to the end with the current time + var reQueryString = /\?/; + this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime(); + } + } + } + } + + Request.prototype.clone = function() { + return new Request(this, {body: this._bodyInit}) + }; + + function decode(body) { + var form = new FormData(); + body + .trim() + .split('&') + .forEach(function(bytes) { + if (bytes) { + var split = bytes.split('='); + var name = split.shift().replace(/\+/g, ' '); + var value = split.join('=').replace(/\+/g, ' '); + form.append(decodeURIComponent(name), decodeURIComponent(value)); + } + }); + return form + } + + function parseHeaders(rawHeaders) { + var headers = new Headers(); + // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space + // https://tools.ietf.org/html/rfc7230#section-3.2 + var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' '); + // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill + // https://github.com/github/fetch/issues/748 + // https://github.com/zloirock/core-js/issues/751 + preProcessedHeaders + .split('\r') + .map(function(header) { + return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header + }) + .forEach(function(line) { + var parts = line.split(':'); + var key = parts.shift().trim(); + if (key) { + var value = parts.join(':').trim(); + headers.append(key, value); + } + }); + return headers + } + + Body.call(Request.prototype); + + function Response(bodyInit, options) { + if (!(this instanceof Response)) { + throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.') + } + if (!options) { + options = {}; + } + + this.type = 'default'; + this.status = options.status === undefined ? 200 : options.status; + this.ok = this.status >= 200 && this.status < 300; + this.statusText = options.statusText === undefined ? '' : '' + options.statusText; + this.headers = new Headers(options.headers); + this.url = options.url || ''; + this._initBody(bodyInit); + } + + Body.call(Response.prototype); + + Response.prototype.clone = function() { + return new Response(this._bodyInit, { + status: this.status, + statusText: this.statusText, + headers: new Headers(this.headers), + url: this.url + }) + }; + + Response.error = function() { + var response = new Response(null, {status: 0, statusText: ''}); + response.type = 'error'; + return response + }; + + var redirectStatuses = [301, 302, 303, 307, 308]; + + Response.redirect = function(url, status) { + if (redirectStatuses.indexOf(status) === -1) { + throw new RangeError('Invalid status code') + } + + return new Response(null, {status: status, headers: {location: url}}) + }; + + exports.DOMException = global.DOMException; + try { + new exports.DOMException(); + } catch (err) { + exports.DOMException = function(message, name) { + this.message = message; + this.name = name; + var error = Error(message); + this.stack = error.stack; + }; + exports.DOMException.prototype = Object.create(Error.prototype); + exports.DOMException.prototype.constructor = exports.DOMException; + } + + function fetch(input, init) { + return new Promise(function(resolve, reject) { + var request = new Request(input, init); + + if (request.signal && request.signal.aborted) { + return reject(new exports.DOMException('Aborted', 'AbortError')) + } + + var xhr = new XMLHttpRequest(); + + function abortXhr() { + xhr.abort(); + } + + xhr.onload = function() { + var options = { + status: xhr.status, + statusText: xhr.statusText, + headers: parseHeaders(xhr.getAllResponseHeaders() || '') + }; + options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL'); + var body = 'response' in xhr ? xhr.response : xhr.responseText; + setTimeout(function() { + resolve(new Response(body, options)); + }, 0); + }; + + xhr.onerror = function() { + setTimeout(function() { + reject(new TypeError('Network request failed')); + }, 0); + }; + + xhr.ontimeout = function() { + setTimeout(function() { + reject(new TypeError('Network request failed')); + }, 0); + }; + + xhr.onabort = function() { + setTimeout(function() { + reject(new exports.DOMException('Aborted', 'AbortError')); + }, 0); + }; + + function fixUrl(url) { + try { + return url === '' && global.location.href ? global.location.href : url + } catch (e) { + return url + } + } + + xhr.open(request.method, fixUrl(request.url), true); + + if (request.credentials === 'include') { + xhr.withCredentials = true; + } else if (request.credentials === 'omit') { + xhr.withCredentials = false; + } + + if ('responseType' in xhr) { + if (support.blob) { + xhr.responseType = 'blob'; + } else if ( + support.arrayBuffer && + request.headers.get('Content-Type') && + request.headers.get('Content-Type').indexOf('application/octet-stream') !== -1 + ) { + xhr.responseType = 'arraybuffer'; + } + } + + if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers)) { + Object.getOwnPropertyNames(init.headers).forEach(function(name) { + xhr.setRequestHeader(name, normalizeValue(init.headers[name])); + }); + } else { + request.headers.forEach(function(value, name) { + xhr.setRequestHeader(name, value); + }); + } + + if (request.signal) { + request.signal.addEventListener('abort', abortXhr); + + xhr.onreadystatechange = function() { + // DONE (success or failure) + if (xhr.readyState === 4) { + request.signal.removeEventListener('abort', abortXhr); + } + }; + } + + xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit); + }) + } + + fetch.polyfill = true; + + if (!global.fetch) { + global.fetch = fetch; + global.Headers = Headers; + global.Request = Request; + global.Response = Response; + } + + exports.Headers = Headers; + exports.Request = Request; + exports.Response = Response; + exports.fetch = fetch; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +},{}],61:[function(require,module,exports){ +/* jshint node: true */ +'use strict'; + +/** + # wildcard + + Very simple wildcard matching, which is designed to provide the same + functionality that is found in the + [eve](https://github.com/adobe-webplatform/eve) eventing library. + + ## Usage + + It works with strings: + + <<< examples/strings.js + + Arrays: + + <<< examples/arrays.js + + Objects (matching against keys): + + <<< examples/objects.js + + While the library works in Node, if you are are looking for file-based + wildcard matching then you should have a look at: + + +**/ + +function WildcardMatcher(text, separator) { + this.text = text = text || ''; + this.hasWild = ~text.indexOf('*'); + this.separator = separator; + this.parts = text.split(separator); +} + +WildcardMatcher.prototype.match = function(input) { + var matches = true; + var parts = this.parts; + var ii; + var partsCount = parts.length; + var testParts; + + if (typeof input == 'string' || input instanceof String) { + if (!this.hasWild && this.text != input) { + matches = false; + } else { + testParts = (input || '').split(this.separator); + for (ii = 0; matches && ii < partsCount; ii++) { + if (parts[ii] === '*') { + continue; + } else if (ii < testParts.length) { + matches = parts[ii] === testParts[ii]; + } else { + matches = false; + } + } + + // If matches, then return the component parts + matches = matches && testParts; + } + } + else if (typeof input.splice == 'function') { + matches = []; + + for (ii = input.length; ii--; ) { + if (this.match(input[ii])) { + matches[matches.length] = input[ii]; + } + } + } + else if (typeof input == 'object') { + matches = {}; + + for (var key in input) { + if (this.match(key)) { + matches[key] = input[key]; + } + } + } + + return matches; +}; + +module.exports = function(text, test, separator) { + var matcher = new WildcardMatcher(text, separator || /[\/\.]/); + if (typeof test != 'undefined') { + return matcher.match(test); + } + + return matcher; +}; + +},{}],62:[function(require,module,exports){ +'use strict'; + +var alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split('') + , length = 64 + , map = {} + , seed = 0 + , i = 0 + , prev; + +/** + * Return a string representing the specified number. + * + * @param {Number} num The number to convert. + * @returns {String} The string representation of the number. + * @api public + */ +function encode(num) { + var encoded = ''; + + do { + encoded = alphabet[num % length] + encoded; + num = Math.floor(num / length); + } while (num > 0); + + return encoded; +} + +/** + * Return the integer value specified by the given string. + * + * @param {String} str The string to convert. + * @returns {Number} The integer value represented by the string. + * @api public + */ +function decode(str) { + var decoded = 0; + + for (i = 0; i < str.length; i++) { + decoded = decoded * length + map[str.charAt(i)]; + } + + return decoded; +} + +/** + * Yeast: A tiny growing id generator. + * + * @returns {String} A unique id. + * @api public + */ +function yeast() { + var now = encode(+new Date()); + + if (now !== prev) return seed = 0, prev = now; + return now +'.'+ encode(seed++); +} + +// +// Map each character to its index. +// +for (; i < length; i++) map[alphabet[i]] = i; + +// +// Expose the `yeast`, `encode` and `decode` functions. +// +yeast.encode = encode; +yeast.decode = decode; +module.exports = yeast; + +},{}],63:[function(require,module,exports){ +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +var _require = require('@uppy/utils/lib/AbortController'), + AbortController = _require.AbortController, + createAbortError = _require.createAbortError; + +var delay = require('@uppy/utils/lib/delay'); + +var MB = 1024 * 1024; +var defaultOptions = { + limit: 1, + retryDelays: [0, 1000, 3000, 5000], + getChunkSize: function getChunkSize(file) { + return Math.ceil(file.size / 10000); + }, + onStart: function onStart() {}, + onProgress: function onProgress() {}, + onPartComplete: function onPartComplete() {}, + onSuccess: function onSuccess() {}, + onError: function onError(err) { + throw err; + } +}; + +function ensureInt(value) { + if (typeof value === 'string') { + return parseInt(value, 10); + } + + if (typeof value === 'number') { + return value; + } + + throw new TypeError('Expected a number'); +} + +var MultipartUploader = /*#__PURE__*/function () { + function MultipartUploader(file, options) { + this.options = _extends({}, defaultOptions, options); // Use default `getChunkSize` if it was null or something + + if (!this.options.getChunkSize) { + this.options.getChunkSize = defaultOptions.getChunkSize; + } + + this.file = file; + this.abortController = new AbortController(); + this.key = this.options.key || null; + this.uploadId = this.options.uploadId || null; + this.parts = []; // Do `this.createdPromise.then(OP)` to execute an operation `OP` _only_ if the + // upload was created already. That also ensures that the sequencing is right + // (so the `OP` definitely happens if the upload is created). + // + // This mostly exists to make `_abortUpload` work well: only sending the abort request if + // the upload was already created, and if the createMultipartUpload request is still in flight, + // aborting it immediately after it finishes. + + this.createdPromise = Promise.reject(); // eslint-disable-line prefer-promise-reject-errors + + this.isPaused = false; + this.partsInProgress = 0; + this.chunks = null; + this.chunkState = null; + + this._initChunks(); + + this.createdPromise.catch(function () {}); // silence uncaught rejection warning + } + /** + * Was this upload aborted? + * + * If yes, we may need to throw an AbortError. + * + * @returns {boolean} + */ + + + var _proto = MultipartUploader.prototype; + + _proto._aborted = function _aborted() { + return this.abortController.signal.aborted; + }; + + _proto._initChunks = function _initChunks() { + var chunks = []; + var desiredChunkSize = this.options.getChunkSize(this.file); // at least 5MB per request, at most 10k requests + + var minChunkSize = Math.max(5 * MB, Math.ceil(this.file.size / 10000)); + var chunkSize = Math.max(desiredChunkSize, minChunkSize); // Upload zero-sized files in one zero-sized chunk + + if (this.file.size === 0) { + chunks.push(this.file); + } else { + for (var i = 0; i < this.file.size; i += chunkSize) { + var end = Math.min(this.file.size, i + chunkSize); + chunks.push(this.file.slice(i, end)); + } + } + + this.chunks = chunks; + this.chunkState = chunks.map(function () { + return { + uploaded: 0, + busy: false, + done: false + }; + }); + }; + + _proto._createUpload = function _createUpload() { + var _this = this; + + this.createdPromise = Promise.resolve().then(function () { + return _this.options.createMultipartUpload(); + }); + return this.createdPromise.then(function (result) { + if (_this._aborted()) throw createAbortError(); + var valid = typeof result === 'object' && result && typeof result.uploadId === 'string' && typeof result.key === 'string'; + + if (!valid) { + throw new TypeError('AwsS3/Multipart: Got incorrect result from `createMultipartUpload()`, expected an object `{ uploadId, key }`.'); + } + + _this.key = result.key; + _this.uploadId = result.uploadId; + + _this.options.onStart(result); + + _this._uploadParts(); + }).catch(function (err) { + _this._onError(err); + }); + }; + + _proto._resumeUpload = function _resumeUpload() { + var _this2 = this; + + return Promise.resolve().then(function () { + return _this2.options.listParts({ + uploadId: _this2.uploadId, + key: _this2.key + }); + }).then(function (parts) { + if (_this2._aborted()) throw createAbortError(); + parts.forEach(function (part) { + var i = part.PartNumber - 1; + _this2.chunkState[i] = { + uploaded: ensureInt(part.Size), + etag: part.ETag, + done: true + }; // Only add if we did not yet know about this part. + + if (!_this2.parts.some(function (p) { + return p.PartNumber === part.PartNumber; + })) { + _this2.parts.push({ + PartNumber: part.PartNumber, + ETag: part.ETag + }); + } + }); + + _this2._uploadParts(); + }).catch(function (err) { + _this2._onError(err); + }); + }; + + _proto._uploadParts = function _uploadParts() { + var _this3 = this; + + if (this.isPaused) return; + var need = this.options.limit - this.partsInProgress; + if (need === 0) return; // All parts are uploaded. + + if (this.chunkState.every(function (state) { + return state.done; + })) { + this._completeUpload(); + + return; + } + + var candidates = []; + + for (var i = 0; i < this.chunkState.length; i++) { + var state = this.chunkState[i]; + if (state.done || state.busy) continue; + candidates.push(i); + + if (candidates.length >= need) { + break; + } + } + + candidates.forEach(function (index) { + _this3._uploadPartRetryable(index).then(function () { + // Continue uploading parts + _this3._uploadParts(); + }, function (err) { + _this3._onError(err); + }); + }); + }; + + _proto._retryable = function _retryable(_ref) { + var _this4 = this; + + var before = _ref.before, + attempt = _ref.attempt, + after = _ref.after; + var retryDelays = this.options.retryDelays; + var signal = this.abortController.signal; + if (before) before(); + + function shouldRetry(err) { + if (err.source && typeof err.source.status === 'number') { + var status = err.source.status; // 0 probably indicates network failure + + return status === 0 || status === 409 || status === 423 || status >= 500 && status < 600; + } + + return false; + } + + var doAttempt = function doAttempt(retryAttempt) { + return attempt().catch(function (err) { + if (_this4._aborted()) throw createAbortError(); + + if (shouldRetry(err) && retryAttempt < retryDelays.length) { + return delay(retryDelays[retryAttempt], { + signal: signal + }).then(function () { + return doAttempt(retryAttempt + 1); + }); + } + + throw err; + }); + }; + + return doAttempt(0).then(function (result) { + if (after) after(); + return result; + }, function (err) { + if (after) after(); + throw err; + }); + }; + + _proto._uploadPartRetryable = function _uploadPartRetryable(index) { + var _this5 = this; + + return this._retryable({ + before: function before() { + _this5.partsInProgress += 1; + }, + attempt: function attempt() { + return _this5._uploadPart(index); + }, + after: function after() { + _this5.partsInProgress -= 1; + } + }); + }; + + _proto._uploadPart = function _uploadPart(index) { + var _this6 = this; + + var body = this.chunks[index]; + this.chunkState[index].busy = true; + return Promise.resolve().then(function () { + return _this6.options.prepareUploadPart({ + key: _this6.key, + uploadId: _this6.uploadId, + body: body, + number: index + 1 + }); + }).then(function (result) { + var valid = typeof result === 'object' && result && typeof result.url === 'string'; + + if (!valid) { + throw new TypeError('AwsS3/Multipart: Got incorrect result from `prepareUploadPart()`, expected an object `{ url }`.'); + } + + return result; + }).then(function (_ref2) { + var url = _ref2.url, + headers = _ref2.headers; + + if (_this6._aborted()) { + _this6.chunkState[index].busy = false; + throw createAbortError(); + } + + return _this6._uploadPartBytes(index, url, headers); + }); + }; + + _proto._onPartProgress = function _onPartProgress(index, sent, total) { + this.chunkState[index].uploaded = ensureInt(sent); + var totalUploaded = this.chunkState.reduce(function (n, c) { + return n + c.uploaded; + }, 0); + this.options.onProgress(totalUploaded, this.file.size); + }; + + _proto._onPartComplete = function _onPartComplete(index, etag) { + this.chunkState[index].etag = etag; + this.chunkState[index].done = true; + var part = { + PartNumber: index + 1, + ETag: etag + }; + this.parts.push(part); + this.options.onPartComplete(part); + }; + + _proto._uploadPartBytes = function _uploadPartBytes(index, url, headers) { + var _this7 = this; + + var body = this.chunks[index]; + var signal = this.abortController.signal; + var defer; + var promise = new Promise(function (resolve, reject) { + defer = { + resolve: resolve, + reject: reject + }; + }); + var xhr = new XMLHttpRequest(); + xhr.open('PUT', url, true); + + if (headers) { + Object.keys(headers).map(function (key) { + xhr.setRequestHeader(key, headers[key]); + }); + } + + xhr.responseType = 'text'; + + function cleanup() { + signal.removeEventListener('abort', onabort); + } + + function onabort() { + xhr.abort(); + } + + signal.addEventListener('abort', onabort); + xhr.upload.addEventListener('progress', function (ev) { + if (!ev.lengthComputable) return; + + _this7._onPartProgress(index, ev.loaded, ev.total); + }); + xhr.addEventListener('abort', function (ev) { + cleanup(); + _this7.chunkState[index].busy = false; + defer.reject(createAbortError()); + }); + xhr.addEventListener('load', function (ev) { + cleanup(); + _this7.chunkState[index].busy = false; + + if (ev.target.status < 200 || ev.target.status >= 300) { + var error = new Error('Non 2xx'); + error.source = ev.target; + defer.reject(error); + return; + } + + _this7._onPartProgress(index, body.size, body.size); // NOTE This must be allowed by CORS. + + + var etag = ev.target.getResponseHeader('ETag'); + + if (etag === null) { + defer.reject(new Error('AwsS3/Multipart: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions.')); + return; + } + + _this7._onPartComplete(index, etag); + + defer.resolve(); + }); + xhr.addEventListener('error', function (ev) { + cleanup(); + _this7.chunkState[index].busy = false; + var error = new Error('Unknown error'); + error.source = ev.target; + defer.reject(error); + }); + xhr.send(body); + return promise; + }; + + _proto._completeUpload = function _completeUpload() { + var _this8 = this; + + // Parts may not have completed uploading in sorted order, if limit > 1. + this.parts.sort(function (a, b) { + return a.PartNumber - b.PartNumber; + }); + return Promise.resolve().then(function () { + return _this8.options.completeMultipartUpload({ + key: _this8.key, + uploadId: _this8.uploadId, + parts: _this8.parts + }); + }).then(function (result) { + _this8.options.onSuccess(result); + }, function (err) { + _this8._onError(err); + }); + }; + + _proto._abortUpload = function _abortUpload() { + var _this9 = this; + + this.abortController.abort(); + this.createdPromise.then(function () { + _this9.options.abortMultipartUpload({ + key: _this9.key, + uploadId: _this9.uploadId + }); + }, function () {// if the creation failed we do not need to abort + }); + }; + + _proto._onError = function _onError(err) { + if (err && err.name === 'AbortError') { + return; + } + + this.options.onError(err); + }; + + _proto.start = function start() { + this.isPaused = false; + + if (this.uploadId) { + this._resumeUpload(); + } else { + this._createUpload(); + } + }; + + _proto.pause = function pause() { + this.abortController.abort(); // Swap it out for a new controller, because this instance may be resumed later. + + this.abortController = new AbortController(); + this.isPaused = true; + }; + + _proto.abort = function abort(opts) { + if (opts === void 0) { + opts = {}; + } + + var really = opts.really || false; + if (!really) return this.pause(); + + this._abortUpload(); + }; + + return MultipartUploader; +}(); + +module.exports = MultipartUploader; +},{"@uppy/utils/lib/AbortController":212,"@uppy/utils/lib/delay":221}],64:[function(require,module,exports){ +var _class, _temp; + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +var _require = require('@uppy/core'), + Plugin = _require.Plugin; + +var _require2 = require('@uppy/companion-client'), + Socket = _require2.Socket, + Provider = _require2.Provider, + RequestClient = _require2.RequestClient; + +var EventTracker = require('@uppy/utils/lib/EventTracker'); + +var emitSocketProgress = require('@uppy/utils/lib/emitSocketProgress'); + +var getSocketHost = require('@uppy/utils/lib/getSocketHost'); + +var RateLimitedQueue = require('@uppy/utils/lib/RateLimitedQueue'); + +var Uploader = require('./MultipartUploader'); + +function assertServerError(res) { + if (res && res.error) { + var error = new Error(res.message); + + _extends(error, res.error); + + throw error; + } + + return res; +} + +module.exports = (_temp = _class = /*#__PURE__*/function (_Plugin) { + _inheritsLoose(AwsS3Multipart, _Plugin); + + function AwsS3Multipart(uppy, opts) { + var _this; + + _this = _Plugin.call(this, uppy, opts) || this; + _this.type = 'uploader'; + _this.id = _this.opts.id || 'AwsS3Multipart'; + _this.title = 'AWS S3 Multipart'; + _this.client = new RequestClient(uppy, opts); + var defaultOptions = { + timeout: 30 * 1000, + limit: 0, + retryDelays: [0, 1000, 3000, 5000], + createMultipartUpload: _this.createMultipartUpload.bind(_assertThisInitialized(_this)), + listParts: _this.listParts.bind(_assertThisInitialized(_this)), + prepareUploadPart: _this.prepareUploadPart.bind(_assertThisInitialized(_this)), + abortMultipartUpload: _this.abortMultipartUpload.bind(_assertThisInitialized(_this)), + completeMultipartUpload: _this.completeMultipartUpload.bind(_assertThisInitialized(_this)) + }; + _this.opts = _extends({}, defaultOptions, opts); + _this.upload = _this.upload.bind(_assertThisInitialized(_this)); + _this.requests = new RateLimitedQueue(_this.opts.limit); + _this.uploaders = Object.create(null); + _this.uploaderEvents = Object.create(null); + _this.uploaderSockets = Object.create(null); + return _this; + } + /** + * Clean up all references for a file's upload: the MultipartUploader instance, + * any events related to the file, and the Companion WebSocket connection. + * + * Set `opts.abort` to tell S3 that the multipart upload is cancelled and must be removed. + * This should be done when the user cancels the upload, not when the upload is completed or errored. + */ + + + var _proto = AwsS3Multipart.prototype; + + _proto.resetUploaderReferences = function resetUploaderReferences(fileID, opts) { + if (opts === void 0) { + opts = {}; + } + + if (this.uploaders[fileID]) { + this.uploaders[fileID].abort({ + really: opts.abort || false + }); + this.uploaders[fileID] = null; + } + + if (this.uploaderEvents[fileID]) { + this.uploaderEvents[fileID].remove(); + this.uploaderEvents[fileID] = null; + } + + if (this.uploaderSockets[fileID]) { + this.uploaderSockets[fileID].close(); + this.uploaderSockets[fileID] = null; + } + }; + + _proto.assertHost = function assertHost(method) { + if (!this.opts.companionUrl) { + throw new Error("Expected a `companionUrl` option containing a Companion address, or if you are not using Companion, a custom `" + method + "` implementation."); + } + }; + + _proto.createMultipartUpload = function createMultipartUpload(file) { + this.assertHost('createMultipartUpload'); + var metadata = {}; + Object.keys(file.meta).map(function (key) { + if (file.meta[key] != null) { + metadata[key] = file.meta[key].toString(); + } + }); + return this.client.post('s3/multipart', { + filename: file.name, + type: file.type, + metadata: metadata + }).then(assertServerError); + }; + + _proto.listParts = function listParts(file, _ref) { + var key = _ref.key, + uploadId = _ref.uploadId; + this.assertHost('listParts'); + var filename = encodeURIComponent(key); + return this.client.get("s3/multipart/" + uploadId + "?key=" + filename).then(assertServerError); + }; + + _proto.prepareUploadPart = function prepareUploadPart(file, _ref2) { + var key = _ref2.key, + uploadId = _ref2.uploadId, + number = _ref2.number; + this.assertHost('prepareUploadPart'); + var filename = encodeURIComponent(key); + return this.client.get("s3/multipart/" + uploadId + "/" + number + "?key=" + filename).then(assertServerError); + }; + + _proto.completeMultipartUpload = function completeMultipartUpload(file, _ref3) { + var key = _ref3.key, + uploadId = _ref3.uploadId, + parts = _ref3.parts; + this.assertHost('completeMultipartUpload'); + var filename = encodeURIComponent(key); + var uploadIdEnc = encodeURIComponent(uploadId); + return this.client.post("s3/multipart/" + uploadIdEnc + "/complete?key=" + filename, { + parts: parts + }).then(assertServerError); + }; + + _proto.abortMultipartUpload = function abortMultipartUpload(file, _ref4) { + var key = _ref4.key, + uploadId = _ref4.uploadId; + this.assertHost('abortMultipartUpload'); + var filename = encodeURIComponent(key); + var uploadIdEnc = encodeURIComponent(uploadId); + return this.client.delete("s3/multipart/" + uploadIdEnc + "?key=" + filename).then(assertServerError); + }; + + _proto.uploadFile = function uploadFile(file) { + var _this2 = this; + + return new Promise(function (resolve, reject) { + var onStart = function onStart(data) { + var cFile = _this2.uppy.getFile(file.id); + + _this2.uppy.setFileState(file.id, { + s3Multipart: _extends({}, cFile.s3Multipart, { + key: data.key, + uploadId: data.uploadId + }) + }); + }; + + var onProgress = function onProgress(bytesUploaded, bytesTotal) { + _this2.uppy.emit('upload-progress', file, { + uploader: _this2, + bytesUploaded: bytesUploaded, + bytesTotal: bytesTotal + }); + }; + + var onError = function onError(err) { + _this2.uppy.log(err); + + _this2.uppy.emit('upload-error', file, err); + + queuedRequest.done(); + + _this2.resetUploaderReferences(file.id); + + reject(err); + }; + + var onSuccess = function onSuccess(result) { + var uploadResp = { + body: _extends({}, result), + uploadURL: result.location + }; + queuedRequest.done(); + + _this2.resetUploaderReferences(file.id); + + var cFile = _this2.uppy.getFile(file.id); + + _this2.uppy.emit('upload-success', cFile || file, uploadResp); + + if (result.location) { + _this2.uppy.log("Download " + upload.file.name + " from " + result.location); + } + + resolve(upload); + }; + + var onPartComplete = function onPartComplete(part) { + var cFile = _this2.uppy.getFile(file.id); + + if (!cFile) { + return; + } + + _this2.uppy.emit('s3-multipart:part-uploaded', cFile, part); + }; + + var upload = new Uploader(file.data, _extends({ + // .bind to pass the file object to each handler. + createMultipartUpload: _this2.opts.createMultipartUpload.bind(_this2, file), + listParts: _this2.opts.listParts.bind(_this2, file), + prepareUploadPart: _this2.opts.prepareUploadPart.bind(_this2, file), + completeMultipartUpload: _this2.opts.completeMultipartUpload.bind(_this2, file), + abortMultipartUpload: _this2.opts.abortMultipartUpload.bind(_this2, file), + getChunkSize: _this2.opts.getChunkSize ? _this2.opts.getChunkSize.bind(_this2) : null, + onStart: onStart, + onProgress: onProgress, + onError: onError, + onSuccess: onSuccess, + onPartComplete: onPartComplete, + limit: _this2.opts.limit || 5, + retryDelays: _this2.opts.retryDelays || [] + }, file.s3Multipart)); + _this2.uploaders[file.id] = upload; + _this2.uploaderEvents[file.id] = new EventTracker(_this2.uppy); + + var queuedRequest = _this2.requests.run(function () { + if (!file.isPaused) { + upload.start(); + } // Don't do anything here, the caller will take care of cancelling the upload itself + // using resetUploaderReferences(). This is because resetUploaderReferences() has to be + // called when this request is still in the queue, and has not been started yet, too. At + // that point this cancellation function is not going to be called. + + + return function () {}; + }); + + _this2.onFileRemove(file.id, function (removed) { + queuedRequest.abort(); + + _this2.resetUploaderReferences(file.id, { + abort: true + }); + + resolve("upload " + removed.id + " was removed"); + }); + + _this2.onCancelAll(file.id, function () { + queuedRequest.abort(); + + _this2.resetUploaderReferences(file.id, { + abort: true + }); + + resolve("upload " + file.id + " was canceled"); + }); + + _this2.onFilePause(file.id, function (isPaused) { + if (isPaused) { + // Remove this file from the queue so another file can start in its place. + queuedRequest.abort(); + upload.pause(); + } else { + // Resuming an upload should be queued, else you could pause and then resume a queued upload to make it skip the queue. + queuedRequest.abort(); + queuedRequest = _this2.requests.run(function () { + upload.start(); + return function () {}; + }); + } + }); + + _this2.onPauseAll(file.id, function () { + queuedRequest.abort(); + upload.pause(); + }); + + _this2.onResumeAll(file.id, function () { + queuedRequest.abort(); + + if (file.error) { + upload.abort(); + } + + queuedRequest = _this2.requests.run(function () { + upload.start(); + return function () {}; + }); + }); // Don't double-emit upload-started for Golden Retriever-restored files that were already started + + + if (!file.progress.uploadStarted || !file.isRestored) { + _this2.uppy.emit('upload-started', file); + } + }); + }; + + _proto.uploadRemote = function uploadRemote(file) { + var _this3 = this; + + this.resetUploaderReferences(file.id); // Don't double-emit upload-started for Golden Retriever-restored files that were already started + + if (!file.progress.uploadStarted || !file.isRestored) { + this.uppy.emit('upload-started', file); + } + + if (file.serverToken) { + return this.connectToServerSocket(file); + } + + return new Promise(function (resolve, reject) { + var Client = file.remote.providerOptions.provider ? Provider : RequestClient; + var client = new Client(_this3.uppy, file.remote.providerOptions); + client.post(file.remote.url, _extends({}, file.remote.body, { + protocol: 's3-multipart', + size: file.data.size, + metadata: file.meta + })).then(function (res) { + _this3.uppy.setFileState(file.id, { + serverToken: res.token + }); + + file = _this3.uppy.getFile(file.id); + return file; + }).then(function (file) { + return _this3.connectToServerSocket(file); + }).then(function () { + resolve(); + }).catch(function (err) { + _this3.uppy.emit('upload-error', file, err); + + reject(err); + }); + }); + }; + + _proto.connectToServerSocket = function connectToServerSocket(file) { + var _this4 = this; + + return new Promise(function (resolve, reject) { + var token = file.serverToken; + var host = getSocketHost(file.remote.companionUrl); + var socket = new Socket({ + target: host + "/api/" + token, + autoOpen: false + }); + _this4.uploaderSockets[file.id] = socket; + _this4.uploaderEvents[file.id] = new EventTracker(_this4.uppy); + + _this4.onFileRemove(file.id, function (removed) { + queuedRequest.abort(); + socket.send('pause', {}); + + _this4.resetUploaderReferences(file.id, { + abort: true + }); + + resolve("upload " + file.id + " was removed"); + }); + + _this4.onFilePause(file.id, function (isPaused) { + if (isPaused) { + // Remove this file from the queue so another file can start in its place. + queuedRequest.abort(); + socket.send('pause', {}); + } else { + // Resuming an upload should be queued, else you could pause and then resume a queued upload to make it skip the queue. + queuedRequest.abort(); + queuedRequest = _this4.requests.run(function () { + socket.send('resume', {}); + return function () {}; + }); + } + }); + + _this4.onPauseAll(file.id, function () { + queuedRequest.abort(); + socket.send('pause', {}); + }); + + _this4.onCancelAll(file.id, function () { + queuedRequest.abort(); + socket.send('pause', {}); + + _this4.resetUploaderReferences(file.id); + + resolve("upload " + file.id + " was canceled"); + }); + + _this4.onResumeAll(file.id, function () { + queuedRequest.abort(); + + if (file.error) { + socket.send('pause', {}); + } + + queuedRequest = _this4.requests.run(function () { + socket.send('resume', {}); + }); + }); + + _this4.onRetry(file.id, function () { + // Only do the retry if the upload is actually in progress; + // else we could try to send these messages when the upload is still queued. + // We may need a better check for this since the socket may also be closed + // for other reasons, like network failures. + if (socket.isOpen) { + socket.send('pause', {}); + socket.send('resume', {}); + } + }); + + _this4.onRetryAll(file.id, function () { + if (socket.isOpen) { + socket.send('pause', {}); + socket.send('resume', {}); + } + }); + + socket.on('progress', function (progressData) { + return emitSocketProgress(_this4, progressData, file); + }); + socket.on('error', function (errData) { + _this4.uppy.emit('upload-error', file, new Error(errData.error)); + + _this4.resetUploaderReferences(file.id); + + queuedRequest.done(); + reject(new Error(errData.error)); + }); + socket.on('success', function (data) { + var uploadResp = { + uploadURL: data.url + }; + + _this4.uppy.emit('upload-success', file, uploadResp); + + _this4.resetUploaderReferences(file.id); + + queuedRequest.done(); + resolve(); + }); + + var queuedRequest = _this4.requests.run(function () { + socket.open(); + + if (file.isPaused) { + socket.send('pause', {}); + } + + return function () {}; + }); + }); + }; + + _proto.upload = function upload(fileIDs) { + var _this5 = this; + + if (fileIDs.length === 0) return Promise.resolve(); + var promises = fileIDs.map(function (id) { + var file = _this5.uppy.getFile(id); + + if (file.isRemote) { + return _this5.uploadRemote(file); + } + + return _this5.uploadFile(file); + }); + return Promise.all(promises); + }; + + _proto.onFileRemove = function onFileRemove(fileID, cb) { + this.uploaderEvents[fileID].on('file-removed', function (file) { + if (fileID === file.id) cb(file.id); + }); + }; + + _proto.onFilePause = function onFilePause(fileID, cb) { + this.uploaderEvents[fileID].on('upload-pause', function (targetFileID, isPaused) { + if (fileID === targetFileID) { + // const isPaused = this.uppy.pauseResume(fileID) + cb(isPaused); + } + }); + }; + + _proto.onRetry = function onRetry(fileID, cb) { + this.uploaderEvents[fileID].on('upload-retry', function (targetFileID) { + if (fileID === targetFileID) { + cb(); + } + }); + }; + + _proto.onRetryAll = function onRetryAll(fileID, cb) { + var _this6 = this; + + this.uploaderEvents[fileID].on('retry-all', function (filesToRetry) { + if (!_this6.uppy.getFile(fileID)) return; + cb(); + }); + }; + + _proto.onPauseAll = function onPauseAll(fileID, cb) { + var _this7 = this; + + this.uploaderEvents[fileID].on('pause-all', function () { + if (!_this7.uppy.getFile(fileID)) return; + cb(); + }); + }; + + _proto.onCancelAll = function onCancelAll(fileID, cb) { + var _this8 = this; + + this.uploaderEvents[fileID].on('cancel-all', function () { + if (!_this8.uppy.getFile(fileID)) return; + cb(); + }); + }; + + _proto.onResumeAll = function onResumeAll(fileID, cb) { + var _this9 = this; + + this.uploaderEvents[fileID].on('resume-all', function () { + if (!_this9.uppy.getFile(fileID)) return; + cb(); + }); + }; + + _proto.install = function install() { + var _this$uppy$getState = this.uppy.getState(), + capabilities = _this$uppy$getState.capabilities; + + this.uppy.setState({ + capabilities: _extends({}, capabilities, { + resumableUploads: true + }) + }); + this.uppy.addUploader(this.upload); + }; + + _proto.uninstall = function uninstall() { + var _this$uppy$getState2 = this.uppy.getState(), + capabilities = _this$uppy$getState2.capabilities; + + this.uppy.setState({ + capabilities: _extends({}, capabilities, { + resumableUploads: false + }) + }); + this.uppy.removeUploader(this.upload); + }; + + return AwsS3Multipart; +}(Plugin), _class.VERSION = "1.8.18", _temp); +},{"./MultipartUploader":63,"@uppy/companion-client":75,"@uppy/core":78,"@uppy/utils/lib/EventTracker":213,"@uppy/utils/lib/RateLimitedQueue":217,"@uppy/utils/lib/emitSocketProgress":222,"@uppy/utils/lib/getSocketHost":237}],65:[function(require,module,exports){ +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +var cuid = require('cuid'); + +var _require = require('@uppy/companion-client'), + Provider = _require.Provider, + RequestClient = _require.RequestClient, + Socket = _require.Socket; + +var emitSocketProgress = require('@uppy/utils/lib/emitSocketProgress'); + +var getSocketHost = require('@uppy/utils/lib/getSocketHost'); + +var EventTracker = require('@uppy/utils/lib/EventTracker'); + +var ProgressTimeout = require('@uppy/utils/lib/ProgressTimeout'); + +var NetworkError = require('@uppy/utils/lib/NetworkError'); + +var isNetworkError = require('@uppy/utils/lib/isNetworkError'); // See XHRUpload + + +function buildResponseError(xhr, error) { + // No error message + if (!error) error = new Error('Upload error'); // Got an error message string + + if (typeof error === 'string') error = new Error(error); // Got something else + + if (!(error instanceof Error)) { + error = _extends(new Error('Upload error'), { + data: error + }); + } + + if (isNetworkError(xhr)) { + error = new NetworkError(error, xhr); + return error; + } + + error.request = xhr; + return error; +} // See XHRUpload + + +function setTypeInBlob(file) { + var dataWithUpdatedType = file.data.slice(0, file.data.size, file.meta.type); + return dataWithUpdatedType; +} + +module.exports = /*#__PURE__*/function () { + function MiniXHRUpload(uppy, opts) { + this.uppy = uppy; + this.opts = _extends({ + validateStatus: function validateStatus(status, responseText, response) { + return status >= 200 && status < 300; + } + }, opts); + this.requests = opts.__queue; + this.uploaderEvents = Object.create(null); + this.i18n = opts.i18n; + } + + var _proto = MiniXHRUpload.prototype; + + _proto._getOptions = function _getOptions(file) { + var uppy = this.uppy; + var overrides = uppy.getState().xhrUpload; + + var opts = _extends({}, this.opts, overrides || {}, file.xhrUpload || {}, { + headers: {} + }); + + _extends(opts.headers, this.opts.headers); + + if (overrides) { + _extends(opts.headers, overrides.headers); + } + + if (file.xhrUpload) { + _extends(opts.headers, file.xhrUpload.headers); + } + + return opts; + }; + + _proto.uploadFile = function uploadFile(id, current, total) { + var file = this.uppy.getFile(id); + + if (file.error) { + throw new Error(file.error); + } else if (file.isRemote) { + return this._uploadRemoteFile(file, current, total); + } + + return this._uploadLocalFile(file, current, total); + }; + + _proto._addMetadata = function _addMetadata(formData, meta, opts) { + var metaFields = Array.isArray(opts.metaFields) ? opts.metaFields // Send along all fields by default. + : Object.keys(meta); + metaFields.forEach(function (item) { + formData.append(item, meta[item]); + }); + }; + + _proto._createFormDataUpload = function _createFormDataUpload(file, opts) { + var formPost = new FormData(); + + this._addMetadata(formPost, file.meta, opts); + + var dataWithUpdatedType = setTypeInBlob(file); + + if (file.name) { + formPost.append(opts.fieldName, dataWithUpdatedType, file.meta.name); + } else { + formPost.append(opts.fieldName, dataWithUpdatedType); + } + + return formPost; + }; + + _proto._createBareUpload = function _createBareUpload(file, opts) { + return file.data; + }; + + _proto._onFileRemoved = function _onFileRemoved(fileID, cb) { + this.uploaderEvents[fileID].on('file-removed', function (file) { + if (fileID === file.id) cb(file.id); + }); + }; + + _proto._onRetry = function _onRetry(fileID, cb) { + this.uploaderEvents[fileID].on('upload-retry', function (targetFileID) { + if (fileID === targetFileID) { + cb(); + } + }); + }; + + _proto._onRetryAll = function _onRetryAll(fileID, cb) { + var _this = this; + + this.uploaderEvents[fileID].on('retry-all', function (filesToRetry) { + if (!_this.uppy.getFile(fileID)) return; + cb(); + }); + }; + + _proto._onCancelAll = function _onCancelAll(fileID, cb) { + var _this2 = this; + + this.uploaderEvents[fileID].on('cancel-all', function () { + if (!_this2.uppy.getFile(fileID)) return; + cb(); + }); + }; + + _proto._uploadLocalFile = function _uploadLocalFile(file, current, total) { + var _this3 = this; + + var opts = this._getOptions(file); + + this.uppy.log("uploading " + current + " of " + total); + return new Promise(function (resolve, reject) { + // This is done in index.js in the S3 plugin. + // this.uppy.emit('upload-started', file) + var data = opts.formData ? _this3._createFormDataUpload(file, opts) : _this3._createBareUpload(file, opts); + var xhr = new XMLHttpRequest(); + _this3.uploaderEvents[file.id] = new EventTracker(_this3.uppy); + var timer = new ProgressTimeout(opts.timeout, function () { + xhr.abort(); + queuedRequest.done(); + var error = new Error(_this3.i18n('timedOut', { + seconds: Math.ceil(opts.timeout / 1000) + })); + + _this3.uppy.emit('upload-error', file, error); + + reject(error); + }); + var id = cuid(); + xhr.upload.addEventListener('loadstart', function (ev) { + _this3.uppy.log("[AwsS3/XHRUpload] " + id + " started"); + }); + xhr.upload.addEventListener('progress', function (ev) { + _this3.uppy.log("[AwsS3/XHRUpload] " + id + " progress: " + ev.loaded + " / " + ev.total); // Begin checking for timeouts when progress starts, instead of loading, + // to avoid timing out requests on browser concurrency queue + + + timer.progress(); + + if (ev.lengthComputable) { + _this3.uppy.emit('upload-progress', file, { + uploader: _this3, + bytesUploaded: ev.loaded, + bytesTotal: ev.total + }); + } + }); + xhr.addEventListener('load', function (ev) { + _this3.uppy.log("[AwsS3/XHRUpload] " + id + " finished"); + + timer.done(); + queuedRequest.done(); + + if (_this3.uploaderEvents[file.id]) { + _this3.uploaderEvents[file.id].remove(); + + _this3.uploaderEvents[file.id] = null; + } + + if (opts.validateStatus(ev.target.status, xhr.responseText, xhr)) { + var _body = opts.getResponseData(xhr.responseText, xhr); + + var uploadURL = _body[opts.responseUrlFieldName]; + var uploadResp = { + status: ev.target.status, + body: _body, + uploadURL: uploadURL + }; + + _this3.uppy.emit('upload-success', file, uploadResp); + + if (uploadURL) { + _this3.uppy.log("Download " + file.name + " from " + uploadURL); + } + + return resolve(file); + } + + var body = opts.getResponseData(xhr.responseText, xhr); + var error = buildResponseError(xhr, opts.getResponseError(xhr.responseText, xhr)); + var response = { + status: ev.target.status, + body: body + }; + + _this3.uppy.emit('upload-error', file, error, response); + + return reject(error); + }); + xhr.addEventListener('error', function (ev) { + _this3.uppy.log("[AwsS3/XHRUpload] " + id + " errored"); + + timer.done(); + queuedRequest.done(); + + if (_this3.uploaderEvents[file.id]) { + _this3.uploaderEvents[file.id].remove(); + + _this3.uploaderEvents[file.id] = null; + } + + var error = buildResponseError(xhr, opts.getResponseError(xhr.responseText, xhr)); + + _this3.uppy.emit('upload-error', file, error); + + return reject(error); + }); + xhr.open(opts.method.toUpperCase(), opts.endpoint, true); // IE10 does not allow setting `withCredentials` and `responseType` + // before `open()` is called. + + xhr.withCredentials = opts.withCredentials; + + if (opts.responseType !== '') { + xhr.responseType = opts.responseType; + } + + Object.keys(opts.headers).forEach(function (header) { + xhr.setRequestHeader(header, opts.headers[header]); + }); + + var queuedRequest = _this3.requests.run(function () { + xhr.send(data); + return function () { + timer.done(); + xhr.abort(); + }; + }, { + priority: 1 + }); + + _this3._onFileRemoved(file.id, function () { + queuedRequest.abort(); + reject(new Error('File removed')); + }); + + _this3._onCancelAll(file.id, function () { + queuedRequest.abort(); + reject(new Error('Upload cancelled')); + }); + }); + }; + + _proto._uploadRemoteFile = function _uploadRemoteFile(file, current, total) { + var _this4 = this; + + var opts = this._getOptions(file); + + return new Promise(function (resolve, reject) { + // This is done in index.js in the S3 plugin. + // this.uppy.emit('upload-started', file) + var fields = {}; + var metaFields = Array.isArray(opts.metaFields) ? opts.metaFields // Send along all fields by default. + : Object.keys(file.meta); + metaFields.forEach(function (name) { + fields[name] = file.meta[name]; + }); + var Client = file.remote.providerOptions.provider ? Provider : RequestClient; + var client = new Client(_this4.uppy, file.remote.providerOptions); + client.post(file.remote.url, _extends({}, file.remote.body, { + endpoint: opts.endpoint, + size: file.data.size, + fieldname: opts.fieldName, + metadata: fields, + httpMethod: opts.method, + useFormData: opts.formData, + headers: opts.headers + })).then(function (res) { + var token = res.token; + var host = getSocketHost(file.remote.companionUrl); + var socket = new Socket({ + target: host + "/api/" + token, + autoOpen: false + }); + _this4.uploaderEvents[file.id] = new EventTracker(_this4.uppy); + + _this4._onFileRemoved(file.id, function () { + socket.send('pause', {}); + queuedRequest.abort(); + resolve("upload " + file.id + " was removed"); + }); + + _this4._onCancelAll(file.id, function () { + socket.send('pause', {}); + queuedRequest.abort(); + resolve("upload " + file.id + " was canceled"); + }); + + _this4._onRetry(file.id, function () { + socket.send('pause', {}); + socket.send('resume', {}); + }); + + _this4._onRetryAll(file.id, function () { + socket.send('pause', {}); + socket.send('resume', {}); + }); + + socket.on('progress', function (progressData) { + return emitSocketProgress(_this4, progressData, file); + }); + socket.on('success', function (data) { + var body = opts.getResponseData(data.response.responseText, data.response); + var uploadURL = body[opts.responseUrlFieldName]; + var uploadResp = { + status: data.response.status, + body: body, + uploadURL: uploadURL, + bytesUploaded: data.bytesUploaded + }; + + _this4.uppy.emit('upload-success', file, uploadResp); + + queuedRequest.done(); + + if (_this4.uploaderEvents[file.id]) { + _this4.uploaderEvents[file.id].remove(); + + _this4.uploaderEvents[file.id] = null; + } + + return resolve(); + }); + socket.on('error', function (errData) { + var resp = errData.response; + var error = resp ? opts.getResponseError(resp.responseText, resp) : _extends(new Error(errData.error.message), { + cause: errData.error + }); + + _this4.uppy.emit('upload-error', file, error); + + queuedRequest.done(); + + if (_this4.uploaderEvents[file.id]) { + _this4.uploaderEvents[file.id].remove(); + + _this4.uploaderEvents[file.id] = null; + } + + reject(error); + }); + + var queuedRequest = _this4.requests.run(function () { + socket.open(); + + if (file.isPaused) { + socket.send('pause', {}); + } + + return function () { + return socket.close(); + }; + }); + }).catch(function (err) { + _this4.uppy.emit('upload-error', file, err); + + reject(err); + }); + }); + }; + + return MiniXHRUpload; +}(); +},{"@uppy/companion-client":75,"@uppy/utils/lib/EventTracker":213,"@uppy/utils/lib/NetworkError":215,"@uppy/utils/lib/ProgressTimeout":216,"@uppy/utils/lib/emitSocketProgress":222,"@uppy/utils/lib/getSocketHost":237,"@uppy/utils/lib/isNetworkError":244,"cuid":15}],66:[function(require,module,exports){ +var _class, _temp; + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +/** + * This plugin is currently a A Big Hack™! The core reason for that is how this plugin + * interacts with Uppy's current pipeline design. The pipeline can handle files in steps, + * including preprocessing, uploading, and postprocessing steps. This plugin initially + * was designed to do its work in a preprocessing step, and let XHRUpload deal with the + * actual file upload as an uploading step. However, Uppy runs steps on all files at once, + * sequentially: first, all files go through a preprocessing step, then, once they are all + * done, they go through the uploading step. + * + * For S3, this causes severely broken behaviour when users upload many files. The + * preprocessing step will request S3 upload URLs that are valid for a short time only, + * but it has to do this for _all_ files, which can take a long time if there are hundreds + * or even thousands of files. By the time the uploader step starts, the first URLs may + * already have expired. If not, the uploading might take such a long time that later URLs + * will expire before some files can be uploaded. + * + * The long-term solution to this problem is to change the upload pipeline so that files + * can be sent to the next step individually. That requires a breaking change, so it is + * planned for some future Uppy version. + * + * In the mean time, this plugin is stuck with a hackier approach: the necessary parts + * of the XHRUpload implementation were copied into this plugin, as the MiniXHRUpload + * class, and this plugin calls into it immediately once it receives an upload URL. + * This isn't as nicely modular as we'd like and requires us to maintain two copies of + * the XHRUpload code, but at least it's not horrifically broken :) + */ +// If global `URL` constructor is available, use it +var URL_ = typeof URL === 'function' ? URL : require('url-parse'); + +var _require = require('@uppy/core'), + Plugin = _require.Plugin; + +var Translator = require('@uppy/utils/lib/Translator'); + +var RateLimitedQueue = require('@uppy/utils/lib/RateLimitedQueue'); + +var settle = require('@uppy/utils/lib/settle'); + +var hasProperty = require('@uppy/utils/lib/hasProperty'); + +var _require2 = require('@uppy/companion-client'), + RequestClient = _require2.RequestClient; + +var qsStringify = require('qs-stringify'); + +var MiniXHRUpload = require('./MiniXHRUpload'); + +var isXml = require('./isXml'); + +function resolveUrl(origin, link) { + return origin ? new URL_(link, origin).toString() : new URL_(link).toString(); +} +/** + * Get the contents of a named tag in an XML source string. + * + * @param {string} source - The XML source string. + * @param {string} tagName - The name of the tag. + * @returns {string} The contents of the tag, or the empty string if the tag does not exist. + */ + + +function getXmlValue(source, tagName) { + var start = source.indexOf("<" + tagName + ">"); + var end = source.indexOf("", start); + return start !== -1 && end !== -1 ? source.slice(start + tagName.length + 2, end) : ''; +} + +function assertServerError(res) { + if (res && res.error) { + var error = new Error(res.message); + + _extends(error, res.error); + + throw error; + } + + return res; +} // warning deduplication flag: see `getResponseData()` XHRUpload option definition + + +var warnedSuccessActionStatus = false; +module.exports = (_temp = _class = /*#__PURE__*/function (_Plugin) { + _inheritsLoose(AwsS3, _Plugin); + + function AwsS3(uppy, opts) { + var _this; + + _this = _Plugin.call(this, uppy, opts) || this; + _this.type = 'uploader'; + _this.id = _this.opts.id || 'AwsS3'; + _this.title = 'AWS S3'; + _this.defaultLocale = { + strings: { + timedOut: 'Upload stalled for %{seconds} seconds, aborting.' + } + }; + var defaultOptions = { + timeout: 30 * 1000, + limit: 0, + metaFields: [], + // have to opt in + getUploadParameters: _this.getUploadParameters.bind(_assertThisInitialized(_this)) + }; + _this.opts = _extends({}, defaultOptions, opts); + + _this.i18nInit(); + + _this.client = new RequestClient(uppy, opts); + _this.handleUpload = _this.handleUpload.bind(_assertThisInitialized(_this)); + _this.requests = new RateLimitedQueue(_this.opts.limit); + return _this; + } + + var _proto = AwsS3.prototype; + + _proto.setOptions = function setOptions(newOpts) { + _Plugin.prototype.setOptions.call(this, newOpts); + + this.i18nInit(); + }; + + _proto.i18nInit = function i18nInit() { + this.translator = new Translator([this.defaultLocale, this.uppy.locale, this.opts.locale]); + this.i18n = this.translator.translate.bind(this.translator); + this.setPluginState(); // so that UI re-renders and we see the updated locale + }; + + _proto.getUploadParameters = function getUploadParameters(file) { + if (!this.opts.companionUrl) { + throw new Error('Expected a `companionUrl` option containing a Companion address.'); + } + + var filename = file.meta.name; + var type = file.meta.type; + var metadata = {}; + this.opts.metaFields.forEach(function (key) { + if (file.meta[key] != null) { + metadata[key] = file.meta[key].toString(); + } + }); + var query = qsStringify({ + filename: filename, + type: type, + metadata: metadata + }); + return this.client.get("s3/params?" + query).then(assertServerError); + }; + + _proto.validateParameters = function validateParameters(file, params) { + var valid = typeof params === 'object' && params && typeof params.url === 'string' && (typeof params.fields === 'object' || params.fields == null); + + if (!valid) { + var err = new TypeError("AwsS3: got incorrect result from 'getUploadParameters()' for file '" + file.name + "', expected an object '{ url, method, fields, headers }' but got '" + JSON.stringify(params) + "' instead.\nSee https://uppy.io/docs/aws-s3/#getUploadParameters-file for more on the expected format."); + console.error(err); + throw err; + } + + var methodIsValid = params.method == null || /^(put|post)$/i.test(params.method); + + if (!methodIsValid) { + var _err = new TypeError("AwsS3: got incorrect method from 'getUploadParameters()' for file '" + file.name + "', expected 'put' or 'post' but got '" + params.method + "' instead.\nSee https://uppy.io/docs/aws-s3/#getUploadParameters-file for more on the expected format."); + + console.error(_err); + throw _err; + } + }; + + _proto.handleUpload = function handleUpload(fileIDs) { + var _this2 = this; + + /** + * keep track of `getUploadParameters()` responses + * so we can cancel the calls individually using just a file ID + * + * @type {object.} + */ + var paramsPromises = Object.create(null); + + function onremove(file) { + var id = file.id; + + if (hasProperty(paramsPromises, id)) { + paramsPromises[id].abort(); + } + } + + this.uppy.on('file-removed', onremove); + fileIDs.forEach(function (id) { + var file = _this2.uppy.getFile(id); + + _this2.uppy.emit('upload-started', file); + }); + var getUploadParameters = this.requests.wrapPromiseFunction(function (file) { + return _this2.opts.getUploadParameters(file); + }); + var numberOfFiles = fileIDs.length; + return settle(fileIDs.map(function (id, index) { + paramsPromises[id] = getUploadParameters(_this2.uppy.getFile(id)); + return paramsPromises[id].then(function (params) { + delete paramsPromises[id]; + + var file = _this2.uppy.getFile(id); + + _this2.validateParameters(file, params); + + var _params$method = params.method, + method = _params$method === void 0 ? 'post' : _params$method, + url = params.url, + fields = params.fields, + headers = params.headers; + var xhrOpts = { + method: method, + formData: method.toLowerCase() === 'post', + endpoint: url, + metaFields: fields ? Object.keys(fields) : [] + }; + + if (headers) { + xhrOpts.headers = headers; + } + + _this2.uppy.setFileState(file.id, { + meta: _extends({}, file.meta, fields), + xhrUpload: xhrOpts + }); + + return _this2._uploader.uploadFile(file.id, index, numberOfFiles); + }).catch(function (error) { + delete paramsPromises[id]; + + var file = _this2.uppy.getFile(id); + + _this2.uppy.emit('upload-error', file, error); + }); + })).then(function (settled) { + // cleanup. + _this2.uppy.off('file-removed', onremove); + + return settled; + }); + }; + + _proto.install = function install() { + var uppy = this.uppy; + this.uppy.addUploader(this.handleUpload); // Get the response data from a successful XMLHttpRequest instance. + // `content` is the S3 response as a string. + // `xhr` is the XMLHttpRequest instance. + + function defaultGetResponseData(content, xhr) { + var opts = this; // If no response, we've hopefully done a PUT request to the file + // in the bucket on its full URL. + + if (!isXml(content, xhr)) { + if (opts.method.toUpperCase() === 'POST') { + if (!warnedSuccessActionStatus) { + uppy.log('[AwsS3] No response data found, make sure to set the success_action_status AWS SDK option to 201. See https://uppy.io/docs/aws-s3/#POST-Uploads', 'warning'); + warnedSuccessActionStatus = true; + } // The responseURL won't contain the object key. Give up. + + + return { + location: null + }; + } // responseURL is not available in older browsers. + + + if (!xhr.responseURL) { + return { + location: null + }; + } // Trim the query string because it's going to be a bunch of presign + // parameters for a PUT request—doing a GET request with those will + // always result in an error + + + return { + location: xhr.responseURL.replace(/\?.*$/, '') + }; + } + + return { + // Some S3 alternatives do not reply with an absolute URL. + // Eg DigitalOcean Spaces uses /$bucketName/xyz + location: resolveUrl(xhr.responseURL, getXmlValue(content, 'Location')), + bucket: getXmlValue(content, 'Bucket'), + key: getXmlValue(content, 'Key'), + etag: getXmlValue(content, 'ETag') + }; + } // Get the error data from a failed XMLHttpRequest instance. + // `content` is the S3 response as a string. + // `xhr` is the XMLHttpRequest instance. + + + function defaultGetResponseError(content, xhr) { + // If no response, we don't have a specific error message, use the default. + if (!isXml(content, xhr)) { + return; + } + + var error = getXmlValue(content, 'Message'); + return new Error(error); + } + + var xhrOptions = { + fieldName: 'file', + responseUrlFieldName: 'location', + timeout: this.opts.timeout, + // Share the rate limiting queue with XHRUpload. + __queue: this.requests, + responseType: 'text', + getResponseData: this.opts.getResponseData || defaultGetResponseData, + getResponseError: defaultGetResponseError + }; // Only for MiniXHRUpload, remove once we can depend on XHRUpload directly again + + xhrOptions.i18n = this.i18n; // Revert to `this.uppy.use(XHRUpload)` once the big comment block at the top of + // this file is solved + + this._uploader = new MiniXHRUpload(this.uppy, xhrOptions); + }; + + _proto.uninstall = function uninstall() { + this.uppy.removeUploader(this.handleUpload); + }; + + return AwsS3; +}(Plugin), _class.VERSION = "1.8.0", _temp); +},{"./MiniXHRUpload":65,"./isXml":67,"@uppy/companion-client":75,"@uppy/core":78,"@uppy/utils/lib/RateLimitedQueue":217,"@uppy/utils/lib/Translator":218,"@uppy/utils/lib/hasProperty":241,"@uppy/utils/lib/settle":251,"qs-stringify":40,"url-parse":59}],67:[function(require,module,exports){ +/** + * Remove parameters like `charset=utf-8` from the end of a mime type string. + * + * @param {string} mimeType - The mime type string that may have optional parameters. + * @returns {string} The "base" mime type, i.e. only 'category/type'. + */ +function removeMimeParameters(mimeType) { + return mimeType.replace(/;.*$/, ''); +} +/** + * Check if a response contains XML based on the response object and its text content. + * + * @param {string} content - The text body of the response. + * @param {object|XMLHttpRequest} xhr - The XHR object or response object from Companion. + * @returns {bool} Whether the content is (probably) XML. + */ + + +function isXml(content, xhr) { + var rawContentType = xhr.headers ? xhr.headers['content-type'] : xhr.getResponseHeader('Content-Type'); + + if (typeof rawContentType === 'string') { + var contentType = removeMimeParameters(rawContentType).toLowerCase(); + + if (contentType === 'application/xml' || contentType === 'text/xml') { + return true; + } // GCS uses text/html for some reason + // https://github.com/transloadit/uppy/issues/896 + + + if (contentType === 'text/html' && /^<\?xml /.test(content)) { + return true; + } + } + + return false; +} + +module.exports = isXml; +},{}],68:[function(require,module,exports){ +var _class, _temp; + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var _require = require('@uppy/core'), + Plugin = _require.Plugin; + +var _require2 = require('@uppy/companion-client'), + Provider = _require2.Provider; + +var _require3 = require('@uppy/provider-views'), + ProviderViews = _require3.ProviderViews; + +var _require4 = require('preact'), + h = _require4.h; + +module.exports = (_temp = _class = /*#__PURE__*/function (_Plugin) { + _inheritsLoose(Box, _Plugin); + + function Box(uppy, opts) { + var _this; + + _this = _Plugin.call(this, uppy, opts) || this; + _this.id = _this.opts.id || 'Box'; + Provider.initPlugin(_assertThisInitialized(_this), opts); + _this.title = _this.opts.title || 'Box'; + + _this.icon = function () { + return h("svg", { + "aria-hidden": "true", + focusable: "false", + width: "32", + height: "32", + viewBox: "0 0 32 32" + }, h("g", { + fill: "none", + fillRule: "evenodd" + }, h("rect", { + className: "uppy-ProviderIconBg", + fill: "#0061D5", + width: "32", + height: "32", + rx: "16" + }), h("g", { + fill: "#fff", + fillRule: "nonzero" + }, h("path", { + d: "m16.4 13.5c-1.6 0-3 0.9-3.7 2.2-0.7-1.3-2.1-2.2-3.7-2.2-1 0-1.8 0.3-2.5 0.8v-3.6c-0.1-0.3-0.5-0.7-1-0.7s-0.8 0.4-0.8 0.8v7c0 2.3 1.9 4.2 4.2 4.2 1.6 0 3-0.9 3.7-2.2 0.7 1.3 2.1 2.2 3.7 2.2 2.3 0 4.2-1.9 4.2-4.2 0.1-2.4-1.8-4.3-4.1-4.3m-7.5 6.8c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5m7.5 0c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5" + }), h("path", { + d: "m27.2 20.6l-2.3-2.8 2.3-2.8c0.3-0.4 0.2-0.9-0.2-1.2s-1-0.2-1.3 0.2l-2 2.4-2-2.4c-0.3-0.4-0.9-0.4-1.3-0.2-0.4 0.3-0.5 0.8-0.2 1.2l2.3 2.8-2.3 2.8c-0.3 0.4-0.2 0.9 0.2 1.2s1 0.2 1.3-0.2l2-2.4 2 2.4c0.3 0.4 0.9 0.4 1.3 0.2 0.4-0.3 0.4-0.8 0.2-1.2" + })))); + }; + + _this.provider = new Provider(uppy, { + companionUrl: _this.opts.companionUrl, + companionHeaders: _this.opts.companionHeaders || _this.opts.serverHeaders, + companionKeysParams: _this.opts.companionKeysParams, + companionCookiesRule: _this.opts.companionCookiesRule, + provider: 'box', + pluginId: _this.id + }); + _this.onFirstRender = _this.onFirstRender.bind(_assertThisInitialized(_this)); + _this.render = _this.render.bind(_assertThisInitialized(_this)); + return _this; + } + + var _proto = Box.prototype; + + _proto.install = function install() { + this.view = new ProviderViews(this, { + provider: this.provider + }); + var target = this.opts.target; + + if (target) { + this.mount(target, this); + } + }; + + _proto.uninstall = function uninstall() { + this.view.tearDown(); + this.unmount(); + }; + + _proto.onFirstRender = function onFirstRender() { + return this.view.getFolder(); + }; + + _proto.render = function render(state) { + return this.view.render(state); + }; + + return Box; +}(Plugin), _class.VERSION = "0.3.12", _temp); +},{"@uppy/companion-client":75,"@uppy/core":78,"@uppy/provider-views":155,"preact":69}],69:[function(require,module,exports){ +!function() { + 'use strict'; + function VNode() {} + function h(nodeName, attributes) { + var lastSimple, child, simple, i, children = EMPTY_CHILDREN; + for (i = arguments.length; i-- > 2; ) stack.push(arguments[i]); + if (attributes && null != attributes.children) { + if (!stack.length) stack.push(attributes.children); + delete attributes.children; + } + while (stack.length) if ((child = stack.pop()) && void 0 !== child.pop) for (i = child.length; i--; ) stack.push(child[i]); else { + if ('boolean' == typeof child) child = null; + if (simple = 'function' != typeof nodeName) if (null == child) child = ''; else if ('number' == typeof child) child = String(child); else if ('string' != typeof child) simple = !1; + if (simple && lastSimple) children[children.length - 1] += child; else if (children === EMPTY_CHILDREN) children = [ child ]; else children.push(child); + lastSimple = simple; + } + var p = new VNode(); + p.nodeName = nodeName; + p.children = children; + p.attributes = null == attributes ? void 0 : attributes; + p.key = null == attributes ? void 0 : attributes.key; + if (void 0 !== options.vnode) options.vnode(p); + return p; + } + function extend(obj, props) { + for (var i in props) obj[i] = props[i]; + return obj; + } + function cloneElement(vnode, props) { + return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children); + } + function enqueueRender(component) { + if (!component.__d && (component.__d = !0) && 1 == items.push(component)) (options.debounceRendering || defer)(rerender); + } + function rerender() { + var p, list = items; + items = []; + while (p = list.pop()) if (p.__d) renderComponent(p); + } + function isSameNodeType(node, vnode, hydrating) { + if ('string' == typeof vnode || 'number' == typeof vnode) return void 0 !== node.splitText; + if ('string' == typeof vnode.nodeName) return !node._componentConstructor && isNamedNode(node, vnode.nodeName); else return hydrating || node._componentConstructor === vnode.nodeName; + } + function isNamedNode(node, nodeName) { + return node.__n === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase(); + } + function getNodeProps(vnode) { + var props = extend({}, vnode.attributes); + props.children = vnode.children; + var defaultProps = vnode.nodeName.defaultProps; + if (void 0 !== defaultProps) for (var i in defaultProps) if (void 0 === props[i]) props[i] = defaultProps[i]; + return props; + } + function createNode(nodeName, isSvg) { + var node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName); + node.__n = nodeName; + return node; + } + function removeNode(node) { + var parentNode = node.parentNode; + if (parentNode) parentNode.removeChild(node); + } + function setAccessor(node, name, old, value, isSvg) { + if ('className' === name) name = 'class'; + if ('key' === name) ; else if ('ref' === name) { + if (old) old(null); + if (value) value(node); + } else if ('class' === name && !isSvg) node.className = value || ''; else if ('style' === name) { + if (!value || 'string' == typeof value || 'string' == typeof old) node.style.cssText = value || ''; + if (value && 'object' == typeof value) { + if ('string' != typeof old) for (var i in old) if (!(i in value)) node.style[i] = ''; + for (var i in value) node.style[i] = 'number' == typeof value[i] && !1 === IS_NON_DIMENSIONAL.test(i) ? value[i] + 'px' : value[i]; + } + } else if ('dangerouslySetInnerHTML' === name) { + if (value) node.innerHTML = value.__html || ''; + } else if ('o' == name[0] && 'n' == name[1]) { + var useCapture = name !== (name = name.replace(/Capture$/, '')); + name = name.toLowerCase().substring(2); + if (value) { + if (!old) node.addEventListener(name, eventProxy, useCapture); + } else node.removeEventListener(name, eventProxy, useCapture); + (node.__l || (node.__l = {}))[name] = value; + } else if ('list' !== name && 'type' !== name && !isSvg && name in node) { + setProperty(node, name, null == value ? '' : value); + if (null == value || !1 === value) node.removeAttribute(name); + } else { + var ns = isSvg && name !== (name = name.replace(/^xlink:?/, '')); + if (null == value || !1 === value) if (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase()); else node.removeAttribute(name); else if ('function' != typeof value) if (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value); else node.setAttribute(name, value); + } + } + function setProperty(node, name, value) { + try { + node[name] = value; + } catch (e) {} + } + function eventProxy(e) { + return this.__l[e.type](options.event && options.event(e) || e); + } + function flushMounts() { + var c; + while (c = mounts.pop()) { + if (options.afterMount) options.afterMount(c); + if (c.componentDidMount) c.componentDidMount(); + } + } + function diff(dom, vnode, context, mountAll, parent, componentRoot) { + if (!diffLevel++) { + isSvgMode = null != parent && void 0 !== parent.ownerSVGElement; + hydrating = null != dom && !('__preactattr_' in dom); + } + var ret = idiff(dom, vnode, context, mountAll, componentRoot); + if (parent && ret.parentNode !== parent) parent.appendChild(ret); + if (!--diffLevel) { + hydrating = !1; + if (!componentRoot) flushMounts(); + } + return ret; + } + function idiff(dom, vnode, context, mountAll, componentRoot) { + var out = dom, prevSvgMode = isSvgMode; + if (null == vnode || 'boolean' == typeof vnode) vnode = ''; + if ('string' == typeof vnode || 'number' == typeof vnode) { + if (dom && void 0 !== dom.splitText && dom.parentNode && (!dom._component || componentRoot)) { + if (dom.nodeValue != vnode) dom.nodeValue = vnode; + } else { + out = document.createTextNode(vnode); + if (dom) { + if (dom.parentNode) dom.parentNode.replaceChild(out, dom); + recollectNodeTree(dom, !0); + } + } + out.__preactattr_ = !0; + return out; + } + var vnodeName = vnode.nodeName; + if ('function' == typeof vnodeName) return buildComponentFromVNode(dom, vnode, context, mountAll); + isSvgMode = 'svg' === vnodeName ? !0 : 'foreignObject' === vnodeName ? !1 : isSvgMode; + vnodeName = String(vnodeName); + if (!dom || !isNamedNode(dom, vnodeName)) { + out = createNode(vnodeName, isSvgMode); + if (dom) { + while (dom.firstChild) out.appendChild(dom.firstChild); + if (dom.parentNode) dom.parentNode.replaceChild(out, dom); + recollectNodeTree(dom, !0); + } + } + var fc = out.firstChild, props = out.__preactattr_, vchildren = vnode.children; + if (null == props) { + props = out.__preactattr_ = {}; + for (var a = out.attributes, i = a.length; i--; ) props[a[i].name] = a[i].value; + } + if (!hydrating && vchildren && 1 === vchildren.length && 'string' == typeof vchildren[0] && null != fc && void 0 !== fc.splitText && null == fc.nextSibling) { + if (fc.nodeValue != vchildren[0]) fc.nodeValue = vchildren[0]; + } else if (vchildren && vchildren.length || null != fc) innerDiffNode(out, vchildren, context, mountAll, hydrating || null != props.dangerouslySetInnerHTML); + diffAttributes(out, vnode.attributes, props); + isSvgMode = prevSvgMode; + return out; + } + function innerDiffNode(dom, vchildren, context, mountAll, isHydrating) { + var j, c, f, vchild, child, originalChildren = dom.childNodes, children = [], keyed = {}, keyedLen = 0, min = 0, len = originalChildren.length, childrenLen = 0, vlen = vchildren ? vchildren.length : 0; + if (0 !== len) for (var i = 0; i < len; i++) { + var _child = originalChildren[i], props = _child.__preactattr_, key = vlen && props ? _child._component ? _child._component.__k : props.key : null; + if (null != key) { + keyedLen++; + keyed[key] = _child; + } else if (props || (void 0 !== _child.splitText ? isHydrating ? _child.nodeValue.trim() : !0 : isHydrating)) children[childrenLen++] = _child; + } + if (0 !== vlen) for (var i = 0; i < vlen; i++) { + vchild = vchildren[i]; + child = null; + var key = vchild.key; + if (null != key) { + if (keyedLen && void 0 !== keyed[key]) { + child = keyed[key]; + keyed[key] = void 0; + keyedLen--; + } + } else if (!child && min < childrenLen) for (j = min; j < childrenLen; j++) if (void 0 !== children[j] && isSameNodeType(c = children[j], vchild, isHydrating)) { + child = c; + children[j] = void 0; + if (j === childrenLen - 1) childrenLen--; + if (j === min) min++; + break; + } + child = idiff(child, vchild, context, mountAll); + f = originalChildren[i]; + if (child && child !== dom && child !== f) if (null == f) dom.appendChild(child); else if (child === f.nextSibling) removeNode(f); else dom.insertBefore(child, f); + } + if (keyedLen) for (var i in keyed) if (void 0 !== keyed[i]) recollectNodeTree(keyed[i], !1); + while (min <= childrenLen) if (void 0 !== (child = children[childrenLen--])) recollectNodeTree(child, !1); + } + function recollectNodeTree(node, unmountOnly) { + var component = node._component; + if (component) unmountComponent(component); else { + if (null != node.__preactattr_ && node.__preactattr_.ref) node.__preactattr_.ref(null); + if (!1 === unmountOnly || null == node.__preactattr_) removeNode(node); + removeChildren(node); + } + } + function removeChildren(node) { + node = node.lastChild; + while (node) { + var next = node.previousSibling; + recollectNodeTree(node, !0); + node = next; + } + } + function diffAttributes(dom, attrs, old) { + var name; + for (name in old) if ((!attrs || null == attrs[name]) && null != old[name]) setAccessor(dom, name, old[name], old[name] = void 0, isSvgMode); + for (name in attrs) if (!('children' === name || 'innerHTML' === name || name in old && attrs[name] === ('value' === name || 'checked' === name ? dom[name] : old[name]))) setAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode); + } + function collectComponent(component) { + var name = component.constructor.name; + (components[name] || (components[name] = [])).push(component); + } + function createComponent(Ctor, props, context) { + var inst, list = components[Ctor.name]; + if (Ctor.prototype && Ctor.prototype.render) { + inst = new Ctor(props, context); + Component.call(inst, props, context); + } else { + inst = new Component(props, context); + inst.constructor = Ctor; + inst.render = doRender; + } + if (list) for (var i = list.length; i--; ) if (list[i].constructor === Ctor) { + inst.__b = list[i].__b; + list.splice(i, 1); + break; + } + return inst; + } + function doRender(props, state, context) { + return this.constructor(props, context); + } + function setComponentProps(component, props, opts, context, mountAll) { + if (!component.__x) { + component.__x = !0; + if (component.__r = props.ref) delete props.ref; + if (component.__k = props.key) delete props.key; + if (!component.base || mountAll) { + if (component.componentWillMount) component.componentWillMount(); + } else if (component.componentWillReceiveProps) component.componentWillReceiveProps(props, context); + if (context && context !== component.context) { + if (!component.__c) component.__c = component.context; + component.context = context; + } + if (!component.__p) component.__p = component.props; + component.props = props; + component.__x = !1; + if (0 !== opts) if (1 === opts || !1 !== options.syncComponentUpdates || !component.base) renderComponent(component, 1, mountAll); else enqueueRender(component); + if (component.__r) component.__r(component); + } + } + function renderComponent(component, opts, mountAll, isChild) { + if (!component.__x) { + var rendered, inst, cbase, props = component.props, state = component.state, context = component.context, previousProps = component.__p || props, previousState = component.__s || state, previousContext = component.__c || context, isUpdate = component.base, nextBase = component.__b, initialBase = isUpdate || nextBase, initialChildComponent = component._component, skip = !1; + if (isUpdate) { + component.props = previousProps; + component.state = previousState; + component.context = previousContext; + if (2 !== opts && component.shouldComponentUpdate && !1 === component.shouldComponentUpdate(props, state, context)) skip = !0; else if (component.componentWillUpdate) component.componentWillUpdate(props, state, context); + component.props = props; + component.state = state; + component.context = context; + } + component.__p = component.__s = component.__c = component.__b = null; + component.__d = !1; + if (!skip) { + rendered = component.render(props, state, context); + if (component.getChildContext) context = extend(extend({}, context), component.getChildContext()); + var toUnmount, base, childComponent = rendered && rendered.nodeName; + if ('function' == typeof childComponent) { + var childProps = getNodeProps(rendered); + inst = initialChildComponent; + if (inst && inst.constructor === childComponent && childProps.key == inst.__k) setComponentProps(inst, childProps, 1, context, !1); else { + toUnmount = inst; + component._component = inst = createComponent(childComponent, childProps, context); + inst.__b = inst.__b || nextBase; + inst.__u = component; + setComponentProps(inst, childProps, 0, context, !1); + renderComponent(inst, 1, mountAll, !0); + } + base = inst.base; + } else { + cbase = initialBase; + toUnmount = initialChildComponent; + if (toUnmount) cbase = component._component = null; + if (initialBase || 1 === opts) { + if (cbase) cbase._component = null; + base = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, !0); + } + } + if (initialBase && base !== initialBase && inst !== initialChildComponent) { + var baseParent = initialBase.parentNode; + if (baseParent && base !== baseParent) { + baseParent.replaceChild(base, initialBase); + if (!toUnmount) { + initialBase._component = null; + recollectNodeTree(initialBase, !1); + } + } + } + if (toUnmount) unmountComponent(toUnmount); + component.base = base; + if (base && !isChild) { + var componentRef = component, t = component; + while (t = t.__u) (componentRef = t).base = base; + base._component = componentRef; + base._componentConstructor = componentRef.constructor; + } + } + if (!isUpdate || mountAll) mounts.unshift(component); else if (!skip) { + if (component.componentDidUpdate) component.componentDidUpdate(previousProps, previousState, previousContext); + if (options.afterUpdate) options.afterUpdate(component); + } + if (null != component.__h) while (component.__h.length) component.__h.pop().call(component); + if (!diffLevel && !isChild) flushMounts(); + } + } + function buildComponentFromVNode(dom, vnode, context, mountAll) { + var c = dom && dom._component, originalComponent = c, oldDom = dom, isDirectOwner = c && dom._componentConstructor === vnode.nodeName, isOwner = isDirectOwner, props = getNodeProps(vnode); + while (c && !isOwner && (c = c.__u)) isOwner = c.constructor === vnode.nodeName; + if (c && isOwner && (!mountAll || c._component)) { + setComponentProps(c, props, 3, context, mountAll); + dom = c.base; + } else { + if (originalComponent && !isDirectOwner) { + unmountComponent(originalComponent); + dom = oldDom = null; + } + c = createComponent(vnode.nodeName, props, context); + if (dom && !c.__b) { + c.__b = dom; + oldDom = null; + } + setComponentProps(c, props, 1, context, mountAll); + dom = c.base; + if (oldDom && dom !== oldDom) { + oldDom._component = null; + recollectNodeTree(oldDom, !1); + } + } + return dom; + } + function unmountComponent(component) { + if (options.beforeUnmount) options.beforeUnmount(component); + var base = component.base; + component.__x = !0; + if (component.componentWillUnmount) component.componentWillUnmount(); + component.base = null; + var inner = component._component; + if (inner) unmountComponent(inner); else if (base) { + if (base.__preactattr_ && base.__preactattr_.ref) base.__preactattr_.ref(null); + component.__b = base; + removeNode(base); + collectComponent(component); + removeChildren(base); + } + if (component.__r) component.__r(null); + } + function Component(props, context) { + this.__d = !0; + this.context = context; + this.props = props; + this.state = this.state || {}; + } + function render(vnode, parent, merge) { + return diff(merge, vnode, {}, !1, parent, !1); + } + var options = {}; + var stack = []; + var EMPTY_CHILDREN = []; + var defer = 'function' == typeof Promise ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout; + var IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i; + var items = []; + var mounts = []; + var diffLevel = 0; + var isSvgMode = !1; + var hydrating = !1; + var components = {}; + extend(Component.prototype, { + setState: function(state, callback) { + var s = this.state; + if (!this.__s) this.__s = extend({}, s); + extend(s, 'function' == typeof state ? state(s, this.props) : state); + if (callback) (this.__h = this.__h || []).push(callback); + enqueueRender(this); + }, + forceUpdate: function(callback) { + if (callback) (this.__h = this.__h || []).push(callback); + renderComponent(this, 2); + }, + render: function() {} + }); + var preact = { + h: h, + createElement: h, + cloneElement: cloneElement, + Component: Component, + render: render, + rerender: rerender, + options: options + }; + if ('undefined' != typeof module) module.exports = preact; else self.preact = preact; +}(); + +},{}],70:[function(require,module,exports){ +'use strict'; + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } + +function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var AuthError = /*#__PURE__*/function (_Error) { + _inheritsLoose(AuthError, _Error); + + function AuthError() { + var _this; + + _this = _Error.call(this, 'Authorization required') || this; + _this.name = 'AuthError'; + _this.isAuthError = true; + return _this; + } + + return AuthError; +}( /*#__PURE__*/_wrapNativeSuper(Error)); + +module.exports = AuthError; +},{}],71:[function(require,module,exports){ +'use strict'; + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var qsStringify = require('qs-stringify'); + +var URL = require('url-parse'); + +var RequestClient = require('./RequestClient'); + +var tokenStorage = require('./tokenStorage'); + +var _getName = function _getName(id) { + return id.split('-').map(function (s) { + return s.charAt(0).toUpperCase() + s.slice(1); + }).join(' '); +}; + +module.exports = /*#__PURE__*/function (_RequestClient) { + _inheritsLoose(Provider, _RequestClient); + + function Provider(uppy, opts) { + var _this; + + _this = _RequestClient.call(this, uppy, opts) || this; + _this.provider = opts.provider; + _this.id = _this.provider; + _this.name = _this.opts.name || _getName(_this.id); + _this.pluginId = _this.opts.pluginId; + _this.tokenKey = "companion-" + _this.pluginId + "-auth-token"; + _this.companionKeysParams = _this.opts.companionKeysParams; + _this.preAuthToken = null; + return _this; + } + + var _proto = Provider.prototype; + + _proto.headers = function headers() { + var _this2 = this; + + return Promise.all([_RequestClient.prototype.headers.call(this), this.getAuthToken()]).then(function (_ref) { + var headers = _ref[0], + token = _ref[1]; + var authHeaders = {}; + + if (token) { + authHeaders['uppy-auth-token'] = token; + } + + if (_this2.companionKeysParams) { + authHeaders['uppy-credentials-params'] = btoa(JSON.stringify({ + params: _this2.companionKeysParams + })); + } + + return _extends({}, headers, authHeaders); + }); + }; + + _proto.onReceiveResponse = function onReceiveResponse(response) { + response = _RequestClient.prototype.onReceiveResponse.call(this, response); + var plugin = this.uppy.getPlugin(this.pluginId); + var oldAuthenticated = plugin.getPluginState().authenticated; + var authenticated = oldAuthenticated ? response.status !== 401 : response.status < 400; + plugin.setPluginState({ + authenticated: authenticated + }); + return response; + } // @todo(i.olarewaju) consider whether or not this method should be exposed + ; + + _proto.setAuthToken = function setAuthToken(token) { + return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey, token); + }; + + _proto.getAuthToken = function getAuthToken() { + return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey); + }; + + _proto.authUrl = function authUrl(queries) { + if (queries === void 0) { + queries = {}; + } + + if (this.preAuthToken) { + queries.uppyPreAuthToken = this.preAuthToken; + } + + var strigifiedQueries = qsStringify(queries); + strigifiedQueries = strigifiedQueries ? "?" + strigifiedQueries : strigifiedQueries; + return this.hostname + "/" + this.id + "/connect" + strigifiedQueries; + }; + + _proto.fileUrl = function fileUrl(id) { + return this.hostname + "/" + this.id + "/get/" + id; + }; + + _proto.fetchPreAuthToken = function fetchPreAuthToken() { + var _this3 = this; + + if (!this.companionKeysParams) { + return Promise.resolve(); + } + + return this.post(this.id + "/preauth/", { + params: this.companionKeysParams + }).then(function (res) { + _this3.preAuthToken = res.token; + }).catch(function (err) { + _this3.uppy.log("[CompanionClient] unable to fetch preAuthToken " + err, 'warning'); + }); + }; + + _proto.list = function list(directory) { + return this.get(this.id + "/list/" + (directory || '')); + }; + + _proto.logout = function logout() { + var _this4 = this; + + return this.get(this.id + "/logout").then(function (response) { + return Promise.all([response, _this4.uppy.getPlugin(_this4.pluginId).storage.removeItem(_this4.tokenKey)]); + }).then(function (_ref2) { + var response = _ref2[0]; + return response; + }); + }; + + Provider.initPlugin = function initPlugin(plugin, opts, defaultOpts) { + plugin.type = 'acquirer'; + plugin.files = []; + + if (defaultOpts) { + plugin.opts = _extends({}, defaultOpts, opts); + } + + if (opts.serverUrl || opts.serverPattern) { + throw new Error('`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`'); + } + + if (opts.companionAllowedHosts) { + var pattern = opts.companionAllowedHosts; // validate companionAllowedHosts param + + if (typeof pattern !== 'string' && !Array.isArray(pattern) && !(pattern instanceof RegExp)) { + throw new TypeError(plugin.id + ": the option \"companionAllowedHosts\" must be one of string, Array, RegExp"); + } + + plugin.opts.companionAllowedHosts = pattern; + } else { + // does not start with https:// + if (/^(?!https?:\/\/).*$/i.test(opts.companionUrl)) { + plugin.opts.companionAllowedHosts = "https://" + opts.companionUrl.replace(/^\/\//, ''); + } else { + plugin.opts.companionAllowedHosts = new URL(opts.companionUrl).origin; + } + } + + plugin.storage = plugin.opts.storage || tokenStorage; + }; + + return Provider; +}(RequestClient); +},{"./RequestClient":72,"./tokenStorage":76,"qs-stringify":40,"url-parse":59}],72:[function(require,module,exports){ +'use strict'; + +var _class, _temp; + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var AuthError = require('./AuthError'); + +var fetchWithNetworkError = require('@uppy/utils/lib/fetchWithNetworkError'); // Remove the trailing slash so we can always safely append /xyz. + + +function stripSlash(url) { + return url.replace(/\/$/, ''); +} + +module.exports = (_temp = _class = /*#__PURE__*/function () { + function RequestClient(uppy, opts) { + this.uppy = uppy; + this.opts = opts; + this.onReceiveResponse = this.onReceiveResponse.bind(this); + this.allowedHeaders = ['accept', 'content-type', 'uppy-auth-token']; + this.preflightDone = false; + } + + var _proto = RequestClient.prototype; + + _proto.headers = function headers() { + var userHeaders = this.opts.companionHeaders || this.opts.serverHeaders || {}; + return Promise.resolve(_extends({}, this.defaultHeaders, userHeaders)); + }; + + _proto._getPostResponseFunc = function _getPostResponseFunc(skip) { + var _this = this; + + return function (response) { + if (!skip) { + return _this.onReceiveResponse(response); + } + + return response; + }; + }; + + _proto.onReceiveResponse = function onReceiveResponse(response) { + var state = this.uppy.getState(); + var companion = state.companion || {}; + var host = this.opts.companionUrl; + var headers = response.headers; // Store the self-identified domain name for the Companion instance we just hit. + + if (headers.has('i-am') && headers.get('i-am') !== companion[host]) { + var _extends2; + + this.uppy.setState({ + companion: _extends({}, companion, (_extends2 = {}, _extends2[host] = headers.get('i-am'), _extends2)) + }); + } + + return response; + }; + + _proto._getUrl = function _getUrl(url) { + if (/^(https?:|)\/\//.test(url)) { + return url; + } + + return this.hostname + "/" + url; + }; + + _proto._json = function _json(res) { + if (res.status === 401) { + throw new AuthError(); + } + + if (res.status < 200 || res.status > 300) { + var errMsg = "Failed request with status: " + res.status + ". " + res.statusText; + return res.json().then(function (errData) { + errMsg = errData.message ? errMsg + " message: " + errData.message : errMsg; + errMsg = errData.requestId ? errMsg + " request-Id: " + errData.requestId : errMsg; + throw new Error(errMsg); + }).catch(function () { + throw new Error(errMsg); + }); + } + + return res.json(); + }; + + _proto.preflight = function preflight(path) { + var _this2 = this; + + if (this.preflightDone) { + return Promise.resolve(this.allowedHeaders.slice()); + } + + return fetch(this._getUrl(path), { + method: 'OPTIONS' + }).then(function (response) { + if (response.headers.has('access-control-allow-headers')) { + _this2.allowedHeaders = response.headers.get('access-control-allow-headers').split(',').map(function (headerName) { + return headerName.trim().toLowerCase(); + }); + } + + _this2.preflightDone = true; + return _this2.allowedHeaders.slice(); + }).catch(function (err) { + _this2.uppy.log("[CompanionClient] unable to make preflight request " + err, 'warning'); + + _this2.preflightDone = true; + return _this2.allowedHeaders.slice(); + }); + }; + + _proto.preflightAndHeaders = function preflightAndHeaders(path) { + var _this3 = this; + + return Promise.all([this.preflight(path), this.headers()]).then(function (_ref) { + var allowedHeaders = _ref[0], + headers = _ref[1]; + // filter to keep only allowed Headers + Object.keys(headers).forEach(function (header) { + if (allowedHeaders.indexOf(header.toLowerCase()) === -1) { + _this3.uppy.log("[CompanionClient] excluding unallowed header " + header); + + delete headers[header]; + } + }); + return headers; + }); + }; + + _proto.get = function get(path, skipPostResponse) { + var _this4 = this; + + return this.preflightAndHeaders(path).then(function (headers) { + return fetchWithNetworkError(_this4._getUrl(path), { + method: 'get', + headers: headers, + credentials: _this4.opts.companionCookiesRule || 'same-origin' + }); + }).then(this._getPostResponseFunc(skipPostResponse)).then(function (res) { + return _this4._json(res); + }).catch(function (err) { + if (!err.isAuthError) { + err.message = "Could not get " + _this4._getUrl(path) + ". " + err.message; + } + + return Promise.reject(err); + }); + }; + + _proto.post = function post(path, data, skipPostResponse) { + var _this5 = this; + + return this.preflightAndHeaders(path).then(function (headers) { + return fetchWithNetworkError(_this5._getUrl(path), { + method: 'post', + headers: headers, + credentials: _this5.opts.companionCookiesRule || 'same-origin', + body: JSON.stringify(data) + }); + }).then(this._getPostResponseFunc(skipPostResponse)).then(function (res) { + return _this5._json(res); + }).catch(function (err) { + if (!err.isAuthError) { + err.message = "Could not post " + _this5._getUrl(path) + ". " + err.message; + } + + return Promise.reject(err); + }); + }; + + _proto.delete = function _delete(path, data, skipPostResponse) { + var _this6 = this; + + return this.preflightAndHeaders(path).then(function (headers) { + return fetchWithNetworkError(_this6.hostname + "/" + path, { + method: 'delete', + headers: headers, + credentials: _this6.opts.companionCookiesRule || 'same-origin', + body: data ? JSON.stringify(data) : null + }); + }).then(this._getPostResponseFunc(skipPostResponse)).then(function (res) { + return _this6._json(res); + }).catch(function (err) { + if (!err.isAuthError) { + err.message = "Could not delete " + _this6._getUrl(path) + ". " + err.message; + } + + return Promise.reject(err); + }); + }; + + _createClass(RequestClient, [{ + key: "hostname", + get: function get() { + var _this$uppy$getState = this.uppy.getState(), + companion = _this$uppy$getState.companion; + + var host = this.opts.companionUrl; + return stripSlash(companion && companion[host] ? companion[host] : host); + } + }, { + key: "defaultHeaders", + get: function get() { + return { + Accept: 'application/json', + 'Content-Type': 'application/json', + 'Uppy-Versions': "@uppy/companion-client=" + RequestClient.VERSION + }; + } + }]); + + return RequestClient; +}(), _class.VERSION = "1.10.2", _temp); +},{"./AuthError":70,"@uppy/utils/lib/fetchWithNetworkError":223}],73:[function(require,module,exports){ +'use strict'; + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +var RequestClient = require('./RequestClient'); + +var _getName = function _getName(id) { + return id.split('-').map(function (s) { + return s.charAt(0).toUpperCase() + s.slice(1); + }).join(' '); +}; + +module.exports = /*#__PURE__*/function (_RequestClient) { + _inheritsLoose(SearchProvider, _RequestClient); + + function SearchProvider(uppy, opts) { + var _this; + + _this = _RequestClient.call(this, uppy, opts) || this; + _this.provider = opts.provider; + _this.id = _this.provider; + _this.name = _this.opts.name || _getName(_this.id); + _this.pluginId = _this.opts.pluginId; + return _this; + } + + var _proto = SearchProvider.prototype; + + _proto.fileUrl = function fileUrl(id) { + return this.hostname + "/search/" + this.id + "/get/" + id; + }; + + _proto.search = function search(text, queries) { + queries = queries ? "&" + queries : ''; + return this.get("search/" + this.id + "/list?q=" + encodeURIComponent(text) + queries); + }; + + return SearchProvider; +}(RequestClient); +},{"./RequestClient":72}],74:[function(require,module,exports){ +var ee = require('namespace-emitter'); + +module.exports = /*#__PURE__*/function () { + function UppySocket(opts) { + this.opts = opts; + this._queued = []; + this.isOpen = false; + this.emitter = ee(); + this._handleMessage = this._handleMessage.bind(this); + this.close = this.close.bind(this); + this.emit = this.emit.bind(this); + this.on = this.on.bind(this); + this.once = this.once.bind(this); + this.send = this.send.bind(this); + + if (!opts || opts.autoOpen !== false) { + this.open(); + } + } + + var _proto = UppySocket.prototype; + + _proto.open = function open() { + var _this = this; + + this.socket = new WebSocket(this.opts.target); + + this.socket.onopen = function (e) { + _this.isOpen = true; + + while (_this._queued.length > 0 && _this.isOpen) { + var first = _this._queued[0]; + + _this.send(first.action, first.payload); + + _this._queued = _this._queued.slice(1); + } + }; + + this.socket.onclose = function (e) { + _this.isOpen = false; + }; + + this.socket.onmessage = this._handleMessage; + }; + + _proto.close = function close() { + if (this.socket) { + this.socket.close(); + } + }; + + _proto.send = function send(action, payload) { + // attach uuid + if (!this.isOpen) { + this._queued.push({ + action: action, + payload: payload + }); + + return; + } + + this.socket.send(JSON.stringify({ + action: action, + payload: payload + })); + }; + + _proto.on = function on(action, handler) { + this.emitter.on(action, handler); + }; + + _proto.emit = function emit(action, payload) { + this.emitter.emit(action, payload); + }; + + _proto.once = function once(action, handler) { + this.emitter.once(action, handler); + }; + + _proto._handleMessage = function _handleMessage(e) { + try { + var message = JSON.parse(e.data); + this.emit(message.action, message.payload); + } catch (err) { + console.log(err); + } + }; + + return UppySocket; +}(); +},{"namespace-emitter":38}],75:[function(require,module,exports){ +'use strict'; +/** + * Manages communications with Companion + */ + +var RequestClient = require('./RequestClient'); + +var Provider = require('./Provider'); + +var SearchProvider = require('./SearchProvider'); + +var Socket = require('./Socket'); + +module.exports = { + RequestClient: RequestClient, + Provider: Provider, + SearchProvider: SearchProvider, + Socket: Socket +}; +},{"./Provider":71,"./RequestClient":72,"./SearchProvider":73,"./Socket":74}],76:[function(require,module,exports){ +'use strict'; +/** + * This module serves as an Async wrapper for LocalStorage + */ + +module.exports.setItem = function (key, value) { + return new Promise(function (resolve) { + localStorage.setItem(key, value); + resolve(); + }); +}; + +module.exports.getItem = function (key) { + return Promise.resolve(localStorage.getItem(key)); +}; + +module.exports.removeItem = function (key) { + return new Promise(function (resolve) { + localStorage.removeItem(key); + resolve(); + }); +}; +},{}],77:[function(require,module,exports){ +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +var preact = require('preact'); + +var findDOMElement = require('@uppy/utils/lib/findDOMElement'); +/** + * Defer a frequent call to the microtask queue. + */ + + +function debounce(fn) { + var calling = null; + var latestArgs = null; + return function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + latestArgs = args; + + if (!calling) { + calling = Promise.resolve().then(function () { + calling = null; // At this point `args` may be different from the most + // recent state, if multiple calls happened since this task + // was queued. So we use the `latestArgs`, which definitely + // is the most recent call. + + return fn.apply(void 0, latestArgs); + }); + } + + return calling; + }; +} +/** + * Boilerplate that all Plugins share - and should not be used + * directly. It also shows which methods final plugins should implement/override, + * this deciding on structure. + * + * @param {object} main Uppy core object + * @param {object} object with plugin options + * @returns {Array|string} files or success/fail message + */ + + +module.exports = /*#__PURE__*/function () { + function Plugin(uppy, opts) { + this.uppy = uppy; + this.opts = opts || {}; + this.update = this.update.bind(this); + this.mount = this.mount.bind(this); + this.install = this.install.bind(this); + this.uninstall = this.uninstall.bind(this); + } + + var _proto = Plugin.prototype; + + _proto.getPluginState = function getPluginState() { + var _this$uppy$getState = this.uppy.getState(), + plugins = _this$uppy$getState.plugins; + + return plugins[this.id] || {}; + }; + + _proto.setPluginState = function setPluginState(update) { + var _extends2; + + var _this$uppy$getState2 = this.uppy.getState(), + plugins = _this$uppy$getState2.plugins; + + this.uppy.setState({ + plugins: _extends({}, plugins, (_extends2 = {}, _extends2[this.id] = _extends({}, plugins[this.id], update), _extends2)) + }); + }; + + _proto.setOptions = function setOptions(newOpts) { + this.opts = _extends({}, this.opts, newOpts); + this.setPluginState(); // so that UI re-renders with new options + }; + + _proto.update = function update(state) { + if (typeof this.el === 'undefined') { + return; + } + + if (this._updateUI) { + this._updateUI(state); + } + } // Called after every state update, after everything's mounted. Debounced. + ; + + _proto.afterUpdate = function afterUpdate() {} + /** + * Called when plugin is mounted, whether in DOM or into another plugin. + * Needed because sometimes plugins are mounted separately/after `install`, + * so this.el and this.parent might not be available in `install`. + * This is the case with @uppy/react plugins, for example. + */ + ; + + _proto.onMount = function onMount() {} + /** + * Check if supplied `target` is a DOM element or an `object`. + * If it’s an object — target is a plugin, and we search `plugins` + * for a plugin with same name and return its target. + * + * @param {string|object} target + * + */ + ; + + _proto.mount = function mount(target, plugin) { + var _this = this; + + var callerPluginName = plugin.id; + var targetElement = findDOMElement(target); + + if (targetElement) { + this.isTargetDOMEl = true; // API for plugins that require a synchronous rerender. + + this.rerender = function (state) { + // plugin could be removed, but this.rerender is debounced below, + // so it could still be called even after uppy.removePlugin or uppy.close + // hence the check + if (!_this.uppy.getPlugin(_this.id)) return; + _this.el = preact.render(_this.render(state), targetElement, _this.el); + + _this.afterUpdate(); + }; + + this._updateUI = debounce(this.rerender); + this.uppy.log("Installing " + callerPluginName + " to a DOM element '" + target + "'"); // clear everything inside the target container + + if (this.opts.replaceTargetContent) { + targetElement.innerHTML = ''; + } + + this.el = preact.render(this.render(this.uppy.getState()), targetElement); + this.onMount(); + return this.el; + } + + var targetPlugin; + + if (typeof target === 'object' && target instanceof Plugin) { + // Targeting a plugin *instance* + targetPlugin = target; + } else if (typeof target === 'function') { + // Targeting a plugin type + var Target = target; // Find the target plugin instance. + + this.uppy.iteratePlugins(function (plugin) { + if (plugin instanceof Target) { + targetPlugin = plugin; + return false; + } + }); + } + + if (targetPlugin) { + this.uppy.log("Installing " + callerPluginName + " to " + targetPlugin.id); + this.parent = targetPlugin; + this.el = targetPlugin.addTarget(plugin); + this.onMount(); + return this.el; + } + + this.uppy.log("Not installing " + callerPluginName); + var message = "Invalid target option given to " + callerPluginName + "."; + + if (typeof target === 'function') { + message += ' The given target is not a Plugin class. ' + 'Please check that you\'re not specifying a React Component instead of a plugin. ' + 'If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: ' + 'run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.'; + } else { + message += 'If you meant to target an HTML element, please make sure that the element exists. ' + 'Check that the