From d81701b47ef1c8cd6048bdc92733815bc048ca01 Mon Sep 17 00:00:00 2001 From: aiueo-1234 <130837816+aiueo-1234@users.noreply.github.com> Date: Thu, 2 May 2024 02:16:23 +0900 Subject: [PATCH 1/5] =?UTF-8?q?#44=20=E3=82=AB=E3=83=90=E3=83=BC=E7=94=9F?= =?UTF-8?q?=E6=88=90=E3=81=AE=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9=E3=82=92?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Epub/KoeBook.Epub/Services/AnalyzerService.cs | 9 +++++---- KoeBook.Test/DiTestBase.cs | 7 ++++++- KoeBook.Test/MockCreateCoverFileService.cs | 13 +++++++++++++ .../MockCreateCoverFileService_CoverFileBytes.cs | 6 ++++++ KoeBook/App.xaml.cs | 1 + 5 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 KoeBook.Test/MockCreateCoverFileService.cs create mode 100644 KoeBook.Test/MockCreateCoverFileService_CoverFileBytes.cs diff --git a/Epub/KoeBook.Epub/Services/AnalyzerService.cs b/Epub/KoeBook.Epub/Services/AnalyzerService.cs index 044102c..a61f9b6 100644 --- a/Epub/KoeBook.Epub/Services/AnalyzerService.cs +++ b/Epub/KoeBook.Epub/Services/AnalyzerService.cs @@ -13,20 +13,19 @@ public partial class AnalyzerService( IScraperSelectorService scrapingService, IEpubDocumentStoreService epubDocumentStoreService, ILlmAnalyzerService llmAnalyzerService, - AiStoryAnalyzerService aiStoryAnalyzerService) : IAnalyzerService + AiStoryAnalyzerService aiStoryAnalyzerService, + ICreateCoverFileService createCoverFileService) : IAnalyzerService { private readonly IScraperSelectorService _scrapingService = scrapingService; private readonly IEpubDocumentStoreService _epubDocumentStoreService = epubDocumentStoreService; private readonly ILlmAnalyzerService _llmAnalyzerService = llmAnalyzerService; private readonly AiStoryAnalyzerService _aiStoryAnalyzerService = aiStoryAnalyzerService; + private readonly ICreateCoverFileService _createCoverFileService = createCoverFileService; public async ValueTask AnalyzeAsync(BookProperties bookProperties, string tempDirectory, CancellationToken cancellationToken) { Directory.CreateDirectory(tempDirectory); var coverFilePath = Path.Combine(tempDirectory, "Cover.png"); - using var fs = File.Create(coverFilePath); - await fs.WriteAsync(CoverFile.ToArray(), cancellationToken); - await fs.FlushAsync(cancellationToken); var rubyReplaced = false; EpubDocument document; @@ -44,6 +43,8 @@ public async ValueTask AnalyzeAsync(BookProperties bookProperties, default: throw new UnreachableException($"SourceType: {bookProperties.SourceType}, Source: {bookProperties.Source}"); } + + _createCoverFileService.Create(document.Title, document.Author, coverFilePath); } catch (EbookException) { throw; } catch (Exception ex) diff --git a/KoeBook.Test/DiTestBase.cs b/KoeBook.Test/DiTestBase.cs index ed79f9e..3f6349a 100644 --- a/KoeBook.Test/DiTestBase.cs +++ b/KoeBook.Test/DiTestBase.cs @@ -1,4 +1,5 @@ using KoeBook.Core; +using KoeBook.Core.Contracts.Services; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -17,6 +18,10 @@ protected static IHostBuilder CreateDefaultBuilder() { return Microsoft.Extensions.Hosting.Host .CreateDefaultBuilder() - .UseCoreStartup(); + .UseCoreStartup() + .ConfigureServices(services => + { + services.AddSingleton(); + }); } } diff --git a/KoeBook.Test/MockCreateCoverFileService.cs b/KoeBook.Test/MockCreateCoverFileService.cs new file mode 100644 index 0000000..e1dd5cd --- /dev/null +++ b/KoeBook.Test/MockCreateCoverFileService.cs @@ -0,0 +1,13 @@ +using KoeBook.Core.Contracts.Services; + +namespace KoeBook.Test; + +internal partial class MockCreateCoverFileService : ICreateCoverFileService +{ + public void Create(string title, string author, string coverFilePath) + { + using var fs = File.Create(coverFilePath); + fs.Write(CoverFile.ToArray()); + fs.Flush(); + } +} diff --git a/KoeBook.Test/MockCreateCoverFileService_CoverFileBytes.cs b/KoeBook.Test/MockCreateCoverFileService_CoverFileBytes.cs new file mode 100644 index 0000000..65e3339 --- /dev/null +++ b/KoeBook.Test/MockCreateCoverFileService_CoverFileBytes.cs @@ -0,0 +1,6 @@ +namespace KoeBook.Test; + +internal partial class MockCreateCoverFileService +{ + public static ReadOnlySpan CoverFile => [89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x1, 0x2c, 0x0, 0x0, 0x1, 0x90, 0x8, 0x6, 0x0, 0x0, 0x0, 0x14, 0x75, 0x5d, 0x7b, 0x0, 0x0, 0x0, 0x1, 0x73, 0x52, 0x47, 0x42, 0x0, 0xae, 0xce, 0x1c, 0xe9, 0x0, 0x0, 0x0, 0x4, 0x67, 0x41, 0x4d, 0x41, 0x0, 0x0, 0xb1, 0x8f, 0xb, 0xfc, 0x61, 0x5, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0x1d, 0x87, 0x0, 0x0, 0x1d, 0x87, 0x1, 0x8f, 0xe5, 0xf1, 0x65, 0x0, 0x0, 0x4, 0xfa, 0x49, 0x44, 0x41, 0x54, 0x78, 0x5e, 0xed, 0xd4, 0x1, 0xd, 0x0, 0x0, 0xc, 0xc3, 0xa0, 0xfb, 0x37, 0xbd, 0xeb, 0x68, 0x2, 0x22, 0xb8, 0x1, 0x44, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x22, 0xb6, 0x7, 0x7c, 0x3f, 0x1a, 0x75, 0x8a, 0x71, 0x90, 0x2f, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82]; +} diff --git a/KoeBook/App.xaml.cs b/KoeBook/App.xaml.cs index 2a60e96..3282c80 100644 --- a/KoeBook/App.xaml.cs +++ b/KoeBook/App.xaml.cs @@ -81,6 +81,7 @@ public App() services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); + services.AddSingleton(); // Views and ViewModels services.AddTransient(); From 4cb37ac2e6ffc322782a1a52c149cd95dc1f6149 Mon Sep 17 00:00:00 2001 From: aiueo-1234 <130837816+aiueo-1234@users.noreply.github.com> Date: Thu, 2 May 2024 02:36:53 +0900 Subject: [PATCH 2/5] =?UTF-8?q?#44=20LlmStoryGeneratorService=E3=82=92Stor?= =?UTF-8?q?yCreatorService=E3=81=AB=E7=B5=84=E3=81=BF=E8=BE=BC=E3=82=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Contracts/Services/ILlmStoryGeneratorService.cs | 2 +- KoeBook/App.xaml.cs | 1 + KoeBook/Services/StoryCreatorService.cs | 13 +++++++++++++ KoeBook/appsettings.json | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 KoeBook/Services/StoryCreatorService.cs diff --git a/KoeBook.Core/Contracts/Services/ILlmStoryGeneratorService.cs b/KoeBook.Core/Contracts/Services/ILlmStoryGeneratorService.cs index ea1ea9d..82baa65 100644 --- a/KoeBook.Core/Contracts/Services/ILlmStoryGeneratorService.cs +++ b/KoeBook.Core/Contracts/Services/ILlmStoryGeneratorService.cs @@ -2,7 +2,7 @@ namespace KoeBook.Core.Contracts.Services; -internal interface ILlmStoryGeneratorService +public interface ILlmStoryGeneratorService { ValueTask GenerateStoryAsync(StoryGenre storyGenre, string premise, CancellationToken cancellationToken); } diff --git a/KoeBook/App.xaml.cs b/KoeBook/App.xaml.cs index 3282c80..81b1069 100644 --- a/KoeBook/App.xaml.cs +++ b/KoeBook/App.xaml.cs @@ -82,6 +82,7 @@ public App() services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); + services.AddSingleton(); // Views and ViewModels services.AddTransient(); diff --git a/KoeBook/Services/StoryCreatorService.cs b/KoeBook/Services/StoryCreatorService.cs new file mode 100644 index 0000000..6c044f9 --- /dev/null +++ b/KoeBook/Services/StoryCreatorService.cs @@ -0,0 +1,13 @@ +using KoeBook.Core.Contracts.Services; +using KoeBook.Core.Models; + +namespace KoeBook.Services; + +public class StoryCreatorService(ILlmStoryGeneratorService llmStoryGeneratorService) : IStoryCreatorService +{ + private readonly ILlmStoryGeneratorService _llmStoryGeneratorService = llmStoryGeneratorService; + public async ValueTask CreateStoryAsync(StoryGenre genre, string instruction, CancellationToken cancellationToken) + { + return await _llmStoryGeneratorService.GenerateStoryAsync(genre, instruction, cancellationToken); + } +} diff --git a/KoeBook/appsettings.json b/KoeBook/appsettings.json index a14bec2..f333552 100644 --- a/KoeBook/appsettings.json +++ b/KoeBook/appsettings.json @@ -8,6 +8,6 @@ "IEpubGenerateService": false, "ISoundGenerationSelectorService": false, "ISoundGenerationService": false, - "IStoryCreaterService": true + "IStoryCreaterService": false } } From 02421d7839d32cd0dcc85e0d56e0127b81fa51cd Mon Sep 17 00:00:00 2001 From: aiueo-1234 <130837816+aiueo-1234@users.noreply.github.com> Date: Thu, 2 May 2024 02:41:54 +0900 Subject: [PATCH 3/5] =?UTF-8?q?#44=20=E3=83=86=E3=82=B9=E3=83=88=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KoeBook.Test/MockCreateCoverFileService.cs | 8 ++++---- KoeBook.Test/MockCreateCoverFileService_CoverFileBytes.cs | 6 ------ 2 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 KoeBook.Test/MockCreateCoverFileService_CoverFileBytes.cs diff --git a/KoeBook.Test/MockCreateCoverFileService.cs b/KoeBook.Test/MockCreateCoverFileService.cs index e1dd5cd..d948eb1 100644 --- a/KoeBook.Test/MockCreateCoverFileService.cs +++ b/KoeBook.Test/MockCreateCoverFileService.cs @@ -2,12 +2,12 @@ namespace KoeBook.Test; -internal partial class MockCreateCoverFileService : ICreateCoverFileService +internal class MockCreateCoverFileService : ICreateCoverFileService { + public static ReadOnlySpan CoverFile => [89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x1, 0x2c, 0x0, 0x0, 0x1, 0x90, 0x8, 0x6, 0x0, 0x0, 0x0, 0x14, 0x75, 0x5d, 0x7b, 0x0, 0x0, 0x0, 0x1, 0x73, 0x52, 0x47, 0x42, 0x0, 0xae, 0xce, 0x1c, 0xe9, 0x0, 0x0, 0x0, 0x4, 0x67, 0x41, 0x4d, 0x41, 0x0, 0x0, 0xb1, 0x8f, 0xb, 0xfc, 0x61, 0x5, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0x1d, 0x87, 0x0, 0x0, 0x1d, 0x87, 0x1, 0x8f, 0xe5, 0xf1, 0x65, 0x0, 0x0, 0x4, 0xfa, 0x49, 0x44, 0x41, 0x54, 0x78, 0x5e, 0xed, 0xd4, 0x1, 0xd, 0x0, 0x0, 0xc, 0xc3, 0xa0, 0xfb, 0x37, 0xbd, 0xeb, 0x68, 0x2, 0x22, 0xb8, 0x1, 0x44, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x22, 0xb6, 0x7, 0x7c, 0x3f, 0x1a, 0x75, 0x8a, 0x71, 0x90, 0x2f, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82]; + public void Create(string title, string author, string coverFilePath) { - using var fs = File.Create(coverFilePath); - fs.Write(CoverFile.ToArray()); - fs.Flush(); + File.WriteAllBytes(coverFilePath, CoverFile.ToArray()); } } diff --git a/KoeBook.Test/MockCreateCoverFileService_CoverFileBytes.cs b/KoeBook.Test/MockCreateCoverFileService_CoverFileBytes.cs deleted file mode 100644 index 65e3339..0000000 --- a/KoeBook.Test/MockCreateCoverFileService_CoverFileBytes.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace KoeBook.Test; - -internal partial class MockCreateCoverFileService -{ - public static ReadOnlySpan CoverFile => [89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x1, 0x2c, 0x0, 0x0, 0x1, 0x90, 0x8, 0x6, 0x0, 0x0, 0x0, 0x14, 0x75, 0x5d, 0x7b, 0x0, 0x0, 0x0, 0x1, 0x73, 0x52, 0x47, 0x42, 0x0, 0xae, 0xce, 0x1c, 0xe9, 0x0, 0x0, 0x0, 0x4, 0x67, 0x41, 0x4d, 0x41, 0x0, 0x0, 0xb1, 0x8f, 0xb, 0xfc, 0x61, 0x5, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0x1d, 0x87, 0x0, 0x0, 0x1d, 0x87, 0x1, 0x8f, 0xe5, 0xf1, 0x65, 0x0, 0x0, 0x4, 0xfa, 0x49, 0x44, 0x41, 0x54, 0x78, 0x5e, 0xed, 0xd4, 0x1, 0xd, 0x0, 0x0, 0xc, 0xc3, 0xa0, 0xfb, 0x37, 0xbd, 0xeb, 0x68, 0x2, 0x22, 0xb8, 0x1, 0x44, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x22, 0xb6, 0x7, 0x7c, 0x3f, 0x1a, 0x75, 0x8a, 0x71, 0x90, 0x2f, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82]; -} From b414cc38e585c5a4a450f8848b959e7fea3031bc Mon Sep 17 00:00:00 2001 From: miyaji255 <84168445+miyaji255@users.noreply.github.com> Date: Thu, 2 May 2024 08:56:53 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Contracts/Services/ILlmStoryGeneratorService.cs | 8 -------- .../Services/ClaudeStoryGeneratorService.cs | 4 ++-- KoeBook/App.xaml.cs | 4 ---- KoeBook/Services/StoryCreatorService.cs | 13 ------------- KoeBook/Startup.cs | 3 ++- 5 files changed, 4 insertions(+), 28 deletions(-) delete mode 100644 KoeBook.Core/Contracts/Services/ILlmStoryGeneratorService.cs delete mode 100644 KoeBook/Services/StoryCreatorService.cs diff --git a/KoeBook.Core/Contracts/Services/ILlmStoryGeneratorService.cs b/KoeBook.Core/Contracts/Services/ILlmStoryGeneratorService.cs deleted file mode 100644 index 82baa65..0000000 --- a/KoeBook.Core/Contracts/Services/ILlmStoryGeneratorService.cs +++ /dev/null @@ -1,8 +0,0 @@ -using KoeBook.Core.Models; - -namespace KoeBook.Core.Contracts.Services; - -public interface ILlmStoryGeneratorService -{ - ValueTask GenerateStoryAsync(StoryGenre storyGenre, string premise, CancellationToken cancellationToken); -} diff --git a/KoeBook.Core/Services/ClaudeStoryGeneratorService.cs b/KoeBook.Core/Services/ClaudeStoryGeneratorService.cs index 4e6a605..3abf6de 100644 --- a/KoeBook.Core/Services/ClaudeStoryGeneratorService.cs +++ b/KoeBook.Core/Services/ClaudeStoryGeneratorService.cs @@ -3,11 +3,11 @@ namespace KoeBook.Core.Services; -internal class ClaudeStoryGeneratorService(IClaudeService claudeService) : ILlmStoryGeneratorService +public class ClaudeStoryGeneratorService(IClaudeService claudeService) : IStoryCreatorService { private readonly IClaudeService _claudeService = claudeService; - public async ValueTask GenerateStoryAsync(StoryGenre storyGenre, string premise, CancellationToken cancellationToken) + public async ValueTask CreateStoryAsync(StoryGenre storyGenre, string premise, CancellationToken cancellationToken) { if (_claudeService.Messages is null) { diff --git a/KoeBook/App.xaml.cs b/KoeBook/App.xaml.cs index 81b1069..f7b88e1 100644 --- a/KoeBook/App.xaml.cs +++ b/KoeBook/App.xaml.cs @@ -4,10 +4,7 @@ using KoeBook.Contracts.Services; using KoeBook.Core; using KoeBook.Core.Contracts.Services; -using KoeBook.Core.Services; using KoeBook.Core.Services.Mocks; -using KoeBook.Epub.Contracts.Services; -using KoeBook.Epub.Services; using KoeBook.Models; using KoeBook.Notifications; using KoeBook.Services; @@ -82,7 +79,6 @@ public App() services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); - services.AddSingleton(); // Views and ViewModels services.AddTransient(); diff --git a/KoeBook/Services/StoryCreatorService.cs b/KoeBook/Services/StoryCreatorService.cs deleted file mode 100644 index 6c044f9..0000000 --- a/KoeBook/Services/StoryCreatorService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using KoeBook.Core.Contracts.Services; -using KoeBook.Core.Models; - -namespace KoeBook.Services; - -public class StoryCreatorService(ILlmStoryGeneratorService llmStoryGeneratorService) : IStoryCreatorService -{ - private readonly ILlmStoryGeneratorService _llmStoryGeneratorService = llmStoryGeneratorService; - public async ValueTask CreateStoryAsync(StoryGenre genre, string instruction, CancellationToken cancellationToken) - { - return await _llmStoryGeneratorService.GenerateStoryAsync(genre, instruction, cancellationToken); - } -} diff --git a/KoeBook/Startup.cs b/KoeBook/Startup.cs index 304dc32..750fcb3 100644 --- a/KoeBook/Startup.cs +++ b/KoeBook/Startup.cs @@ -43,7 +43,8 @@ public static IHostBuilder UseCoreStartup(this IHostBuilder builder) .AddSingleton() .AddSingleton() .AddSingleton() - .AddSingleton(); + .AddSingleton() + .AddSingleton(); services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); From de9626455108acdc7b6c3299bd39403329387693 Mon Sep 17 00:00:00 2001 From: miyaji255 <84168445+miyaji255@users.noreply.github.com> Date: Thu, 2 May 2024 08:59:18 +0900 Subject: [PATCH 5/5] =?UTF-8?q?AnalyzerService=5FCoverFile=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/AnalyzerService _CoverFileBytes.cs | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 Epub/KoeBook.Epub/Services/AnalyzerService _CoverFileBytes.cs diff --git a/Epub/KoeBook.Epub/Services/AnalyzerService _CoverFileBytes.cs b/Epub/KoeBook.Epub/Services/AnalyzerService _CoverFileBytes.cs deleted file mode 100644 index 6e0673c..0000000 --- a/Epub/KoeBook.Epub/Services/AnalyzerService _CoverFileBytes.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Text; -using System.Text.RegularExpressions; -using KoeBook.Core.Contracts.Services; -using KoeBook.Core.Models; -using KoeBook.Epub; -using KoeBook.Epub.Services; - -namespace KoeBook.Epub.Services; - -public partial class AnalyzerService -{ - public ReadOnlySpan CoverFile => [89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x1, 0x2c, 0x0, 0x0, 0x1, 0x90, 0x8, 0x6, 0x0, 0x0, 0x0, 0x14, 0x75, 0x5d, 0x7b, 0x0, 0x0, 0x0, 0x1, 0x73, 0x52, 0x47, 0x42, 0x0, 0xae, 0xce, 0x1c, 0xe9, 0x0, 0x0, 0x0, 0x4, 0x67, 0x41, 0x4d, 0x41, 0x0, 0x0, 0xb1, 0x8f, 0xb, 0xfc, 0x61, 0x5, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0x1d, 0x87, 0x0, 0x0, 0x1d, 0x87, 0x1, 0x8f, 0xe5, 0xf1, 0x65, 0x0, 0x0, 0x4, 0xfa, 0x49, 0x44, 0x41, 0x54, 0x78, 0x5e, 0xed, 0xd4, 0x1, 0xd, 0x0, 0x0, 0xc, 0xc3, 0xa0, 0xfb, 0x37, 0xbd, 0xeb, 0x68, 0x2, 0x22, 0xb8, 0x1, 0x44, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x32, 0x84, 0x5, 0x64, 0x8, 0xb, 0xc8, 0x10, 0x16, 0x90, 0x21, 0x2c, 0x20, 0x43, 0x58, 0x40, 0x86, 0xb0, 0x80, 0xc, 0x61, 0x1, 0x19, 0xc2, 0x2, 0x22, 0xb6, 0x7, 0x7c, 0x3f, 0x1a, 0x75, 0x8a, 0x71, 0x90, 0x2f, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82]; -}