├── .gitignore ├── LICENSE ├── README.md ├── README_zh.md ├── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── src ├── main ├── kotlin │ └── io │ │ └── vlinx │ │ └── infinite │ │ ├── InfiniteApplication.kt │ │ ├── constants │ │ ├── AIModels.kt │ │ ├── App.kt │ │ ├── InfoModes.kt │ │ ├── SearchEngines.kt │ │ └── Urls.kt │ │ ├── controller │ │ └── SearchController.kt │ │ ├── exception │ │ ├── HttpRequestException.kt │ │ └── SearchException.kt │ │ ├── props │ │ └── Settings.kt │ │ ├── rag │ │ └── RAG.kt │ │ ├── search │ │ ├── Google.kt │ │ ├── SearchEngine.kt │ │ └── SearchResult.kt │ │ └── utils │ │ ├── ExceptionUtils.kt │ │ ├── HttpUtils.kt │ │ ├── JSONUtils.kt │ │ └── ResponseUtils.kt └── resources │ ├── application-dev.properties │ ├── application-prod.properties │ ├── application.properties │ ├── static │ ├── 404.html │ ├── _next │ │ └── static │ │ │ ├── 30hMvc9DJmbDwwUOsyKJQ │ │ │ ├── _buildManifest.js │ │ │ └── _ssgManifest.js │ │ │ ├── N-5UyoExv-FkxfM34QRsr │ │ │ ├── _buildManifest.js │ │ │ └── _ssgManifest.js │ │ │ ├── chunks │ │ │ ├── 52-55f735e72b5930e8.js │ │ │ ├── 938-2f30378ec0aa5d75.js │ │ │ ├── app │ │ │ │ ├── _not-found-4b4acadd4cddffa9.js │ │ │ │ ├── layout-01e766d681438518.js │ │ │ │ ├── layout-e8949822955e989d.js │ │ │ │ ├── page-2f488ec93b0d782d.js │ │ │ │ ├── page-4ae9f92b94267d88.js │ │ │ │ └── search │ │ │ │ │ └── page-5b5448c0ec358638.js │ │ │ ├── fd9d1056-7fda3e9b28bca7f7.js │ │ │ ├── framework-8883d1e9be70c3da.js │ │ │ ├── main-9bc0557f2675187a.js │ │ │ ├── main-app-dd32906684d8c53d.js │ │ │ ├── pages │ │ │ │ ├── _app-98cb51ec6f9f135f.js │ │ │ │ └── _error-e87e5963ec1b8011.js │ │ │ ├── polyfills-c67a75d1b6f99dc8.js │ │ │ ├── webpack-17c49b7293d83f0e.js │ │ │ └── webpack-ba7c826cedf2cb85.js │ │ │ ├── css │ │ │ ├── 0ce0d2fa18a9dc25.css │ │ │ └── 118bd211991061b8.css │ │ │ └── media │ │ │ ├── 05a31a2ca4975f99-s.woff2 │ │ │ ├── 513657b02c5c193f-s.woff2 │ │ │ ├── 51ed15f9841b9f9d-s.woff2 │ │ │ ├── c9a5bc6a7c948fb0-s.p.woff2 │ │ │ ├── d6b16ce4a6175f26-s.woff2 │ │ │ ├── ec159349637c90ad-s.woff2 │ │ │ └── fd4db3eb5472fc27-s.woff2 │ ├── bg.svg │ ├── favicon.ico │ ├── index.html │ ├── index.txt │ ├── logo.png │ ├── search.html │ └── search.txt │ └── templates │ └── index.html └── test └── kotlin └── io └── vlinx └── infinite └── InfiniteApplicationTests.kt /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | .gradle 3 | build/ 4 | !gradle/wrapper/gradle-wrapper.jar 5 | !**/src/main/**/build/ 6 | !**/src/test/**/build/ 7 | 8 | ### STS ### 9 | .apt_generated 10 | .classpath 11 | .factorypath 12 | .project 13 | .settings 14 | .springBeans 15 | .sts4-cache 16 | bin/ 17 | !**/src/main/**/bin/ 18 | !**/src/test/**/bin/ 19 | 20 | ### IntelliJ IDEA ### 21 | .idea 22 | *.iws 23 | *.iml 24 | *.ipr 25 | out/ 26 | !**/src/main/**/out/ 27 | !**/src/test/**/out/ 28 | 29 | ### NetBeans ### 30 | /nbproject/private/ 31 | /nbbuild/ 32 | /dist/ 33 | /nbdist/ 34 | /.nb-gradle/ 35 | 36 | ### VS Code ### 37 | .vscode/ 38 | 39 | ### Custom ### 40 | .DS_Store 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Infinite Search 2 | 3 | [中文说明](./README_zh.md) 4 | 5 | [Demo](https://search.vlinx.io) 6 | 7 | ## Overview 8 | 9 | An AI Search Engine inspired by [Search with Lepton](https://github.com/leptonai/search_with_lepton). 10 | Replaced the backend with SpringBoot + LangChain4J, and made some adjustments to the information processing flow. 11 | 12 | Thanks to the great work of [Lepton](https://www.lepton.ai/) for demystifying RAG search, enabling open-source version of [Perplexity](https://www.perplexity.ai/) 13 | 14 | ## Information Processing Flow 15 | 16 | Compared with Search With Lepton, we provide two information processing flows. 17 | 18 | ### Brief Mode 19 | 1. Search keywords with search engine APIs and obtain search results. 20 | 2. Aggregate the snippets of the search results as context and integrate it into the prompt. 21 | 3. Submit the prompt to the LLM and obtain the results. 22 | 23 | ### Detail Mode 24 | 1. Search keywords with search engine APIs and obtain search results. 25 | 2. Store the webpage content of the top two search results and the snippets of the remaining search results in a vector database. 26 | 3. Retrieve the most similar texts from the vector database and integrate them into the prompt as contextual information. 27 | 4. Submit the prompt to the LLM and obtain the results. 28 | 29 | ## The keys for the improvement of AI Search 30 | 31 | 1. How to convert users' search keywords or even language to obtain higher-quality search results 32 | 2. How to exclude the interference of other irrelevant content in HTML and extract the most accurate content of the main text 33 | 3. How to retrieve more relevant and accurate content from the vector database 34 | 4. How to allow the LLM to handle more contextual information 35 | 36 | ## Open Documentation 37 | We believe open-source is not just about open source code, but also about open documentation. We are planning a series of documentations to explain the principles of machine learning and RAG development used in this project, 38 | 39 | Below is the first article: 40 | 41 | [How AI Search Engine Works](https://vlinx.io/blog/how-ai-search-works) 42 | 43 | If you are interested in this, please follow us on Twitter to receive the latest information. 44 | 45 | https://twitter.com/vlinx_soft 46 | 47 | ## Build and run this project 48 | 49 | ### Prerequisites 50 | 1. OpenAI API 51 | 2. Google Search API 52 | 3. Java 21 53 | 54 | Fill in the corresponding information in `application-dev.properties` 55 | 56 | 57 | ### Build 58 | 59 | ```shell 60 | ./gradlew build -x test 61 | ``` 62 | 63 | ### Run 64 | 65 | ```shell 66 | java -jar build/libs/infinite-search-$version.jar 67 | ``` 68 | 69 | Open browser and visit http://localhost:8605 70 | -------------------------------------------------------------------------------- /README_zh.md: -------------------------------------------------------------------------------- 1 | # Infinite Search 2 | 3 | [Demo](https://search.vlinx.io) 4 | 5 | ## 项目介绍 6 | 7 | AI搜索引擎,基于[Search with Lepton](https://github.com/leptonai/search_with_lepton)项目, 8 | 将后端替换为了SpringBoot + LangChain4J,同时对信息处理流程做了一些调整。 9 | 10 | 感谢[Lepton](https://www.lepton.ai/)团队的杰出工作,揭开了RAG搜索的神秘面纱,实现了开源版的[Plexarity](https://www.perplexity.ai/) 11 | 12 | ## 信息处理流程 13 | 14 | 与Search Wth Lepton相比,我们提供了两种信息处理流程 15 | 16 | ### Brief模式 17 | 1. 使用搜索引擎API(如Google)搜索关键词,获取搜索结果 18 | 2. 将所有搜索结果的摘要信息合并为上下文整合入prompt 19 | 3. 将prompt提交给大语言模型,获取结果 20 | 21 | ### Detail模式 22 | 1. 使用搜索引擎API(如Google)搜索关键词,获取搜索结果 23 | 2. 将最前面两项搜索结果的网页内容和其余搜索结果的摘要内容存入向量数据库 24 | 3. 从向量数据库中检索出最相似的文本内容,作为上下文信息整合入prompt 25 | 4. 将prompt提交给大语言模型,获取结果 26 | 27 | 出于速度原因,默认采用的是Brief模式,如果需要更为详细的搜索结果,可以在配置文件中修改为Detail模式。 28 | 29 | ## 提升的关键 30 | 31 | 目前来看AI搜索已经有了一定效果,要进一步提升的话,我认为关键在于以下几点: 32 | 33 | 1. 如何转换用户的搜索关键词甚至语言以获取更为优质的搜索结果 34 | 2. 如何排除HTML中其他无关内容的干扰,提取出最准确的正文内容 35 | 3. 如何从向量数据库中检索出更为贴近和准确的内容 36 | 4. 如何让大语言模型处理更多的上下文信息 37 | 38 | ## 构建项目与运行项目 39 | 40 | ### 前置准备 41 | 1. OpenAI API 42 | 2. Google Search API 43 | 3. Java 21 44 | 45 | 把相应的信息填入到 `application-dev.properties` 46 | 47 | 48 | ### Build 49 | 50 | ```shell 51 | ./gradlew build -x test 52 | ``` 53 | 54 | ### Run 55 | 56 | ```shell 57 | java -jar build/libs/infinite-search-$version.jar 58 | ``` 59 | 60 | 打开浏览器访问 http://localhost:8605 -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile 2 | 3 | plugins { 4 | id 'java' 5 | id 'org.springframework.boot' version '3.2.2' 6 | id 'io.spring.dependency-management' version '1.1.4' 7 | id 'org.hibernate.orm' version '6.4.1.Final' 8 | id 'org.graalvm.buildtools.native' version '0.9.28' 9 | id 'org.jetbrains.kotlin.jvm' version '1.9.22' 10 | id 'org.jetbrains.kotlin.plugin.spring' version '1.9.22' 11 | id 'org.jetbrains.kotlin.plugin.jpa' version '1.9.22' 12 | } 13 | 14 | group = 'io.vlinx' 15 | version = '0.0.1' 16 | 17 | java { 18 | sourceCompatibility = '21' 19 | } 20 | 21 | repositories { 22 | mavenLocal() 23 | mavenCentral() 24 | } 25 | 26 | dependencies { 27 | implementation 'org.jsoup:jsoup:1.17.2' 28 | implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' 29 | implementation 'org.springframework.boot:spring-boot-starter-web' 30 | implementation 'com.fasterxml.jackson.module:jackson-module-kotlin' 31 | implementation 'dev.langchain4j:langchain4j:0.25.0' 32 | implementation 'dev.langchain4j:langchain4j-open-ai-spring-boot-starter:0.25.0' 33 | implementation 'dev.langchain4j:langchain4j-embeddings-all-minilm-l6-v2:0.25.0' 34 | implementation 'dev.langchain4j:langchain4j-vertex-ai-gemini:0.25.0' 35 | implementation 'org.jetbrains.kotlin:kotlin-reflect' 36 | developmentOnly 'org.springframework.boot:spring-boot-devtools' 37 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 38 | } 39 | 40 | tasks.withType(KotlinCompile) { 41 | kotlinOptions { 42 | freeCompilerArgs += '-Xjsr305=strict' 43 | jvmTarget = '21' 44 | } 45 | } 46 | 47 | tasks.named('test') { 48 | useJUnitPlatform() 49 | } 50 | 51 | hibernate { 52 | enhancement { 53 | enableAssociationManagement = true 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vlinx-io/infinite-search/2234a59160edee74a1b39f775a74e300ff3ded17/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | # 21 | # Gradle start up script for POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | # This is normally unused 84 | # shellcheck disable=SC2034 85 | APP_BASE_NAME=${0##*/} 86 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) 87 | APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit 88 | 89 | # Use the maximum available, or set MAX_FD != -1 to use that value. 90 | MAX_FD=maximum 91 | 92 | warn () { 93 | echo "$*" 94 | } >&2 95 | 96 | die () { 97 | echo 98 | echo "$*" 99 | echo 100 | exit 1 101 | } >&2 102 | 103 | # OS specific support (must be 'true' or 'false'). 104 | cygwin=false 105 | msys=false 106 | darwin=false 107 | nonstop=false 108 | case "$( uname )" in #( 109 | CYGWIN* ) cygwin=true ;; #( 110 | Darwin* ) darwin=true ;; #( 111 | MSYS* | MINGW* ) msys=true ;; #( 112 | NONSTOP* ) nonstop=true ;; 113 | esac 114 | 115 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 116 | 117 | 118 | # Determine the Java command to use to start the JVM. 119 | if [ -n "$JAVA_HOME" ] ; then 120 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 121 | # IBM's JDK on AIX uses strange locations for the executables 122 | JAVACMD=$JAVA_HOME/jre/sh/java 123 | else 124 | JAVACMD=$JAVA_HOME/bin/java 125 | fi 126 | if [ ! -x "$JAVACMD" ] ; then 127 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 128 | 129 | Please set the JAVA_HOME variable in your environment to match the 130 | location of your Java installation." 131 | fi 132 | else 133 | JAVACMD=java 134 | if ! command -v java >/dev/null 2>&1 135 | then 136 | die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 | 138 | Please set the JAVA_HOME variable in your environment to match the 139 | location of your Java installation." 140 | fi 141 | fi 142 | 143 | # Increase the maximum file descriptors if we can. 144 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 145 | case $MAX_FD in #( 146 | max*) 147 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. 148 | # shellcheck disable=SC2039,SC3045 149 | MAX_FD=$( ulimit -H -n ) || 150 | warn "Could not query maximum file descriptor limit" 151 | esac 152 | case $MAX_FD in #( 153 | '' | soft) :;; #( 154 | *) 155 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. 156 | # shellcheck disable=SC2039,SC3045 157 | ulimit -n "$MAX_FD" || 158 | warn "Could not set maximum file descriptor limit to $MAX_FD" 159 | esac 160 | fi 161 | 162 | # Collect all arguments for the java command, stacking in reverse order: 163 | # * args from the command line 164 | # * the main class name 165 | # * -classpath 166 | # * -D...appname settings 167 | # * --module-path (only if needed) 168 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 169 | 170 | # For Cygwin or MSYS, switch paths to Windows format before running java 171 | if "$cygwin" || "$msys" ; then 172 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 173 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 174 | 175 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 176 | 177 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 178 | for arg do 179 | if 180 | case $arg in #( 181 | -*) false ;; # don't mess with options #( 182 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 183 | [ -e "$t" ] ;; #( 184 | *) false ;; 185 | esac 186 | then 187 | arg=$( cygpath --path --ignore --mixed "$arg" ) 188 | fi 189 | # Roll the args list around exactly as many times as the number of 190 | # args, so each arg winds up back in the position where it started, but 191 | # possibly modified. 192 | # 193 | # NB: a `for` loop captures its iteration list before it begins, so 194 | # changing the positional parameters here affects neither the number of 195 | # iterations, nor the values presented in `arg`. 196 | shift # remove old arg 197 | set -- "$@" "$arg" # push replacement arg 198 | done 199 | fi 200 | 201 | 202 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 203 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 204 | 205 | # Collect all arguments for the java command: 206 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, 207 | # and any embedded shellness will be escaped. 208 | # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be 209 | # treated as '${Hostname}' itself on the command line. 210 | 211 | set -- \ 212 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 213 | -classpath "$CLASSPATH" \ 214 | org.gradle.wrapper.GradleWrapperMain \ 215 | "$@" 216 | 217 | # Stop when "xargs" is not available. 218 | if ! command -v xargs >/dev/null 2>&1 219 | then 220 | die "xargs is not available" 221 | fi 222 | 223 | # Use "xargs" to parse quoted args. 224 | # 225 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 226 | # 227 | # In Bash we could simply go: 228 | # 229 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 230 | # set -- "${ARGS[@]}" "$@" 231 | # 232 | # but POSIX shell has neither arrays nor command substitution, so instead we 233 | # post-process each arg (as a line of input to sed) to backslash-escape any 234 | # character that might be a shell metacharacter, then use eval to reverse 235 | # that process (while maintaining the separation between arguments), and wrap 236 | # the whole thing up as a single "set" statement. 237 | # 238 | # This will of course break if any of these variables contains a newline or 239 | # an unmatched quote. 240 | # 241 | 242 | eval "set -- $( 243 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 244 | xargs -n1 | 245 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 246 | tr '\n' ' ' 247 | )" '"$@"' 248 | 249 | exec "$JAVACMD" "$@" 250 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%"=="" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%"=="" set DIRNAME=. 29 | @rem This is normally unused 30 | set APP_BASE_NAME=%~n0 31 | set APP_HOME=%DIRNAME% 32 | 33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 35 | 36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 38 | 39 | @rem Find java.exe 40 | if defined JAVA_HOME goto findJavaFromJavaHome 41 | 42 | set JAVA_EXE=java.exe 43 | %JAVA_EXE% -version >NUL 2>&1 44 | if %ERRORLEVEL% equ 0 goto execute 45 | 46 | echo. 47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 48 | echo. 49 | echo Please set the JAVA_HOME variable in your environment to match the 50 | echo location of your Java installation. 51 | 52 | goto fail 53 | 54 | :findJavaFromJavaHome 55 | set JAVA_HOME=%JAVA_HOME:"=% 56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 57 | 58 | if exist "%JAVA_EXE%" goto execute 59 | 60 | echo. 61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 62 | echo. 63 | echo Please set the JAVA_HOME variable in your environment to match the 64 | echo location of your Java installation. 65 | 66 | goto fail 67 | 68 | :execute 69 | @rem Setup the command line 70 | 71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 72 | 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if %ERRORLEVEL% equ 0 goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | set EXIT_CODE=%ERRORLEVEL% 85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 87 | exit /b %EXIT_CODE% 88 | 89 | :mainEnd 90 | if "%OS%"=="Windows_NT" endlocal 91 | 92 | :omega 93 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'infinite-search' 2 | -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/InfiniteApplication.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite 2 | 3 | 4 | import io.vlinx.infinite.constants.App 5 | import io.vlinx.infinite.props.Settings 6 | import io.vlinx.infinite.rag.RAG 7 | import org.slf4j.LoggerFactory 8 | import org.springframework.beans.factory.annotation.Autowired 9 | import org.springframework.boot.CommandLineRunner 10 | import org.springframework.boot.autoconfigure.SpringBootApplication 11 | import org.springframework.boot.runApplication 12 | 13 | 14 | private val logger = LoggerFactory.getLogger(InfiniteApplication::class.java) 15 | 16 | 17 | @SpringBootApplication 18 | class InfiniteApplication : CommandLineRunner { 19 | 20 | @Autowired 21 | private lateinit var settings: Settings 22 | 23 | override fun run(vararg args: String?) { 24 | logger.info("${App.NAME} ${App.VERSION} Started") 25 | logger.info("Search Info Mode: ${settings.infoMode}") 26 | } 27 | } 28 | 29 | fun main(args: Array) { 30 | runApplication(*args) 31 | } 32 | -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/constants/AIModels.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.constants 2 | 3 | 4 | /** 5 | * @author: vlinx (vlinx@vlinx.io) 6 | * @date: 2024/1/28 7 | */ 8 | 9 | object AIModels { 10 | 11 | const val OPENAI = "openai" 12 | const val GEMINI = "gemini" 13 | 14 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/constants/App.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.constants 2 | 3 | 4 | /** 5 | * @author: vlinx (vlinx@vlinx.io) 6 | * @date: 2024/1/27 7 | */ 8 | 9 | object App { 10 | const val NAME = "Infinite-Search" 11 | const val VERSION = "0.0.1" 12 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/constants/InfoModes.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.constants 2 | 3 | 4 | /** 5 | * @author: vlinx (vlinx@vlinx.io) 6 | * @date: 2024/1/30 7 | */ 8 | 9 | object InfoModes { 10 | const val BRIEF = "brief" 11 | const val DETAIL = "detail" 12 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/constants/SearchEngines.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.constants 2 | 3 | 4 | /** 5 | * @author: vlinx (vlinx@vlinx.io) 6 | * @date: 2024/1/28 7 | */ 8 | 9 | object SearchEngines { 10 | const val GOOGLE = "google" 11 | const val BING = "bing" 12 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/constants/Urls.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.constants 2 | 3 | 4 | /** 5 | * @author: vlinx (vlinx@vlinx.io) 6 | * @date: 2024/1/28 7 | */ 8 | 9 | object Urls { 10 | 11 | const val API = "/api" 12 | const val SEARCH = "$API/search" 13 | 14 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/controller/SearchController.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.controller 2 | 3 | import io.vlinx.infinite.constants.InfoModes 4 | import io.vlinx.infinite.constants.Urls 5 | import io.vlinx.infinite.exception.SearchException 6 | import io.vlinx.infinite.props.Settings 7 | import io.vlinx.infinite.rag.RAG 8 | import io.vlinx.infinite.search.Google 9 | import io.vlinx.infinite.search.SearchResult 10 | import io.vlinx.infinite.utils.ExceptionUtils 11 | import io.vlinx.infinite.utils.JSONUtils 12 | import jakarta.servlet.ServletOutputStream 13 | import jakarta.servlet.http.HttpServletResponse 14 | import org.slf4j.LoggerFactory 15 | import org.springframework.beans.factory.annotation.Autowired 16 | import org.springframework.web.bind.annotation.CrossOrigin 17 | import org.springframework.web.bind.annotation.PostMapping 18 | import org.springframework.web.bind.annotation.RequestBody 19 | import org.springframework.web.bind.annotation.RequestMapping 20 | import org.springframework.web.bind.annotation.RestController 21 | import java.io.IOException 22 | 23 | 24 | /** 25 | * @author: vlinx (vlinx@vlinx.io) 26 | * @date: 2024/1/28 27 | */ 28 | 29 | @RestController 30 | class SearchController { 31 | 32 | @Autowired 33 | private lateinit var google: Google 34 | 35 | @Autowired 36 | private lateinit var rag: RAG 37 | 38 | @Autowired 39 | private lateinit var settings: Settings 40 | 41 | private val logger = LoggerFactory.getLogger(SearchController::class.java) 42 | 43 | private val LLM_SPLIT = "\n\n__LLM_RESPONSE__\n\n" 44 | private val RELATED_SPLIT = "\n\n__RELATED_QUESTIONS__\n\n" 45 | 46 | @CrossOrigin(origins = ["*"]) 47 | @PostMapping(Urls.SEARCH) 48 | fun search(@RequestBody payload: String, response: HttpServletResponse) { 49 | 50 | val writer = response.outputStream.writer() 51 | try { 52 | val map = JSONUtils.fromJson>(payload)!! 53 | val query = map["query"]!! 54 | if (query.isBlank()) { 55 | throw SearchException("query is blank") 56 | } 57 | logger.info("RAG Search: $query") 58 | 59 | response.setHeader("Content-Type", "text/event-stream") 60 | response.contentType = "text/event-stream" 61 | response.characterEncoding = "UTF-8" 62 | response.setHeader("Pragma", "no-cache") 63 | 64 | val searchResults = google.search(query) 65 | 66 | writer.write(searchResultsToContexts(searchResults)) 67 | writer.write(LLM_SPLIT) 68 | writer.flush() 69 | if(settings.infoMode == InfoModes.DETAIL) { 70 | writer.write("Waiting to load documents...\n\n") 71 | writer.flush() 72 | } 73 | 74 | val related = rag.search(query, searchResults, writer) 75 | val questions = related.split("\n") 76 | try { 77 | val list = mutableListOf>() 78 | for (question in questions) { 79 | val map = HashMap() 80 | map["question"] = question.replaceFirst("^\\d+\\.".toRegex(), "").trim() 81 | list.add(map) 82 | } 83 | writer.write(RELATED_SPLIT) 84 | writer.write(JSONUtils.toJson(list)) 85 | writer.flush() 86 | } catch (t: Throwable) { 87 | logger.error("error when generate related questions: ${t.message}") 88 | } 89 | } catch (t: Throwable) { 90 | logger.error(ExceptionUtils.getStackTrace(t)) 91 | response.status = HttpServletResponse.SC_INTERNAL_SERVER_ERROR 92 | writer.write(t.message ?: "error") 93 | writer.flush() 94 | } finally { 95 | writer.close() 96 | } 97 | 98 | } 99 | 100 | private fun searchResultsToContexts(searchResults: List): String { 101 | 102 | val list = mutableListOf>() 103 | 104 | for ((index, result) in searchResults.withIndex()) { 105 | val map = HashMap() 106 | map["id"] = index.toString() 107 | map["name"] = result.title 108 | map["url"] = result.link 109 | list.add(map) 110 | } 111 | 112 | 113 | return JSONUtils.toJson(list.subList(0, settings.relatedQuestionsLimit)) 114 | } 115 | 116 | 117 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/exception/HttpRequestException.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.exception 2 | 3 | 4 | /** 5 | * @author: vlinx (vlinx@vlinx.io) 6 | * @date: 2023/11/26 7 | */ 8 | 9 | class HttpRequestException(message: String) : Exception(message) { 10 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/exception/SearchException.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.exception 2 | 3 | 4 | /** 5 | * @author: vlinx (vlinx@vlinx.io) 6 | * @date: 2024/1/28 7 | */ 8 | 9 | class SearchException(message: String) : Exception(message) { 10 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/props/Settings.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.props 2 | 3 | import io.vlinx.infinite.constants.InfoModes 4 | import org.springframework.boot.context.properties.ConfigurationProperties 5 | import org.springframework.stereotype.Component 6 | 7 | 8 | /** 9 | * @author: vlinx (vlinx@vlinx.io) 10 | * @date: 2024/1/27 11 | */ 12 | 13 | @Component 14 | @ConfigurationProperties("search-settings") 15 | class Settings { 16 | var googleSearchApiKey = "" 17 | var googleSearchEngineId = "" 18 | var googleSearchEndpoint = "https://www.googleapis.com/customsearch/v1" 19 | 20 | var bingSearchApiKey = "" 21 | var bingSearchEndpoint = "https://api.bing.microsoft.com/v7.0/search" 22 | 23 | var openAiApiKey = "" 24 | 25 | var searchItemsLimit = 8 26 | var relatedQuestionsLimit = 5 27 | 28 | var aiModel = "openai" 29 | var searchEngine = "google" 30 | 31 | var infoMode = InfoModes.BRIEF 32 | 33 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/rag/RAG.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.rag 2 | 3 | import dev.langchain4j.data.document.Document 4 | import dev.langchain4j.data.document.splitter.DocumentSplitters 5 | import dev.langchain4j.data.message.AiMessage 6 | import dev.langchain4j.data.message.UserMessage 7 | import dev.langchain4j.data.segment.TextSegment 8 | import dev.langchain4j.model.StreamingResponseHandler 9 | import dev.langchain4j.model.chat.ChatLanguageModel 10 | import dev.langchain4j.model.chat.StreamingChatLanguageModel 11 | import dev.langchain4j.model.embedding.AllMiniLmL6V2EmbeddingModel 12 | import dev.langchain4j.model.input.PromptTemplate 13 | import dev.langchain4j.model.openai.OpenAiChatModel 14 | import dev.langchain4j.model.openai.OpenAiModelName 15 | import dev.langchain4j.model.openai.OpenAiStreamingChatModel 16 | import dev.langchain4j.model.openai.OpenAiTokenizer 17 | import dev.langchain4j.model.output.Response 18 | import dev.langchain4j.store.embedding.EmbeddingMatch 19 | import dev.langchain4j.store.embedding.inmemory.InMemoryEmbeddingStore 20 | import io.vlinx.infinite.constants.AIModels 21 | import io.vlinx.infinite.constants.InfoModes 22 | import io.vlinx.infinite.exception.SearchException 23 | import io.vlinx.infinite.props.Settings 24 | import io.vlinx.infinite.search.Google 25 | import io.vlinx.infinite.search.SearchEngine 26 | import io.vlinx.infinite.search.SearchResult 27 | import io.vlinx.infinite.utils.HttpUtils 28 | import okhttp3.internal.wait 29 | import org.jsoup.Jsoup 30 | import org.slf4j.LoggerFactory 31 | import org.springframework.beans.factory.annotation.Autowired 32 | import org.springframework.stereotype.Component 33 | import java.io.StringWriter 34 | import java.io.Writer 35 | import java.net.URLEncoder 36 | import java.nio.charset.StandardCharsets 37 | import java.util.concurrent.CountDownLatch 38 | import java.util.concurrent.Executors 39 | import java.util.stream.Collectors.joining 40 | 41 | 42 | /** 43 | * @author: vlinx (vlinx@vlinx.io) 44 | * @date: 2024/1/27 45 | */ 46 | 47 | @Component 48 | class RAG { 49 | 50 | @Autowired 51 | lateinit var google: Google 52 | 53 | @Autowired 54 | lateinit var settings: Settings 55 | 56 | private val logger = LoggerFactory.getLogger(RAG::class.java) 57 | 58 | private val ragText = """ 59 | You are a large language AI assistant built by VLINX Software. You are given a user question, and please write clean, concise and accurate answer to the question. You will be given a set of related contexts to the question. 60 | 61 | Your answer must be correct, accurate and written by an expert using an unbiased and professional tone. Please limit to 1024 tokens. Do not give any information that is not related to the question, and do not repeat. Say "information is missing on" followed by the related topic, if the given context do not provide sufficient information. 62 | 63 | your answer must be written in the same language as the question. 64 | 65 | Here are the set of contexts: 66 | 67 | {{context}} 68 | 69 | Remember, don't blindly repeat the contexts verbatim. And here is the user question: 70 | """.trimIndent() 71 | 72 | private val moreQuestionsText = """ 73 | You are a helpful assistant that helps the user to ask related questions, based on user's original question and the related contexts. Please identify worthwhile topics that can be follow-ups, and write questions no longer than 20 words each. Please make sure that specifics, like events, names, locations, are included in follow up questions so they can be asked standalone. For example, if the original question asks about "the Manhattan project", in the follow up question, do not just say "the project", but use the full name "the Manhattan project". Your related questions must be in the same language as the original question. 74 | Here are the contexts of the question: 75 | 76 | Remember, based on the original question and related contexts, suggest three such further questions. Do NOT repeat the original question. Each related question should be no longer than 20 words. Here is the original question: 77 | """.trimIndent() 78 | 79 | fun search(question: String): String { 80 | val writer = StringWriter() 81 | search(question, writer) 82 | writer.close() 83 | return writer.toString() 84 | } 85 | 86 | fun search(question: String, writer: Writer) { 87 | val results = getSearchEngine().search(question) 88 | search(question, results, writer) 89 | } 90 | 91 | fun search(question: String, searchResults: List, writer: Writer): String { 92 | val question = question.replace(Regex("\\[/?INST\\]"), "") 93 | val promptTemplate = PromptTemplate.from( 94 | ragText 95 | ) 96 | 97 | val context = getContext(question, searchResults) 98 | val variables: MutableMap = HashMap() 99 | variables["context"] = context 100 | 101 | val prompt = promptTemplate.apply(variables) 102 | val chatModel = getStreamModel() 103 | 104 | val messages = listOf(prompt.toSystemMessage(), UserMessage(question)) 105 | 106 | var streamDone = false 107 | val streamHandler = object : StreamingResponseHandler { 108 | override fun onNext(token: String) { 109 | synchronized(writer) { 110 | writer.write(token) 111 | } 112 | } 113 | 114 | override fun onComplete(response: Response) { 115 | synchronized(writer) { 116 | writer.flush() 117 | streamDone = true 118 | } 119 | } 120 | 121 | override fun onError(error: Throwable) { 122 | synchronized(writer) { 123 | writer.write("Something went wrong: ${error.message}") 124 | writer.flush() 125 | streamDone = true 126 | } 127 | } 128 | } 129 | 130 | chatModel.generate(messages, streamHandler) 131 | 132 | while (!streamDone) { 133 | synchronized(writer) { 134 | try { 135 | writer.flush() 136 | } catch (t: Throwable) { 137 | //ignore 138 | } 139 | } 140 | Thread.sleep(100) 141 | } 142 | 143 | return moreQuestions(question, context) 144 | } 145 | 146 | private fun getContext(question: String, searchResults: List): String { 147 | return if (settings.infoMode == InfoModes.DETAIL) { 148 | getContextDetail(question, searchResults) 149 | } else { 150 | getContextBrief(question, searchResults) 151 | } 152 | } 153 | 154 | private fun getContextBrief(question: String, searchResults: List): String { 155 | val builder = StringBuilder() 156 | for (result in searchResults) { 157 | builder.append(result.snippet).append("\n\n") 158 | } 159 | return builder.toString() 160 | } 161 | 162 | private fun getContextDetail(question: String, searchResults: List): String { 163 | 164 | val documents = mutableListOf() 165 | val executor = Executors.newVirtualThreadPerTaskExecutor() 166 | val countDownLatch = CountDownLatch(searchResults.size) 167 | 168 | for ((index, result) in searchResults.withIndex()) { 169 | executor.submit { 170 | try { 171 | synchronized(documents) { 172 | val text = if (index < 2) { 173 | getContentFromSearchResultDetail(result) 174 | } else { 175 | getContentFromSearchResultBrief(result) 176 | } 177 | if (text.isNotBlank()) { 178 | documents.add(Document(text)) 179 | } else { 180 | logger.error("Empty text from ${result.link}") 181 | } 182 | } 183 | } catch (t: Throwable) { 184 | logger.error("Failed to load document from ${result.link}") 185 | } finally { 186 | countDownLatch.countDown() 187 | } 188 | } 189 | } 190 | executor.shutdown() 191 | countDownLatch.await() 192 | val segments = mutableListOf() 193 | 194 | for (document in documents) { 195 | try { 196 | val splitter = DocumentSplitters.recursive(100, 0, OpenAiTokenizer(OpenAiModelName.GPT_3_5_TURBO)) 197 | val segs = splitter.split(document) 198 | segments.addAll(segs) 199 | } catch (t: Throwable) { 200 | logger.error("Failed to split document: ${document.metadata()}") 201 | } 202 | } 203 | 204 | if (segments.isEmpty()) { 205 | throw SearchException("No segments found for question: $question") 206 | } 207 | 208 | val embeddingModel = AllMiniLmL6V2EmbeddingModel() 209 | val embeddings = embeddingModel.embedAll(segments).content() 210 | 211 | val embeddingStore = InMemoryEmbeddingStore() 212 | embeddingStore.addAll(embeddings, segments) 213 | 214 | val questionEmbedding = embeddingModel.embed(question).content() 215 | val maxResults = 30 216 | val minScore = 0.8 217 | val relevantEmbeddings = embeddingStore.findRelevant(questionEmbedding, maxResults, minScore) 218 | 219 | val context: String = relevantEmbeddings.stream() 220 | .map { match: EmbeddingMatch -> 221 | match.embedded().text() 222 | } 223 | .collect(joining("\n\n")) 224 | 225 | return URLEncoder.encode(context, StandardCharsets.UTF_8) 226 | } 227 | 228 | private fun getContentFromSearchResultDetail(searchResult: SearchResult): String { 229 | try { 230 | val link = searchResult.link 231 | logger.info("Loading document from $link") 232 | val html = HttpUtils.get(link) 233 | val doc = Jsoup.parse(html) 234 | val text = if (doc.getElementsByTag("main").size > 0) { 235 | doc.getElementsByTag("main")[0].text() 236 | } else { 237 | doc.body().text() 238 | } 239 | if (text.trim().isBlank()) { 240 | logger.error("Empty content from ${searchResult.link}, use snippet instead") 241 | return searchResult.snippet 242 | } 243 | 244 | return searchResult.snippet + "\n\n" + text 245 | } catch (t: Throwable) { 246 | logger.error("Failed to load document from ${searchResult.link}, use snippet instead") 247 | return searchResult.snippet 248 | } 249 | 250 | } 251 | 252 | private fun getContentFromSearchResultBrief(searchResult: SearchResult): String { 253 | return searchResult.snippet 254 | } 255 | 256 | private fun moreQuestions(question: String, context: String): String { 257 | val chatModel = getModel() 258 | val promptTemplate = PromptTemplate.from( 259 | moreQuestionsText 260 | ) 261 | val variables: MutableMap = HashMap() 262 | variables["context"] = context 263 | 264 | val prompt = promptTemplate.apply(variables) 265 | val messages = listOf(prompt.toSystemMessage(), UserMessage(question)) 266 | val response = chatModel.generate(messages) 267 | return response.content().text() 268 | } 269 | 270 | private fun getModel(): ChatLanguageModel { 271 | when (settings.aiModel) { 272 | AIModels.OPENAI -> { 273 | return OpenAiChatModel.withApiKey(settings.openAiApiKey) 274 | } 275 | 276 | else -> { 277 | throw IllegalArgumentException("Unsupported AI model: ${settings.aiModel}") 278 | } 279 | } 280 | } 281 | 282 | private fun getStreamModel(): StreamingChatLanguageModel { 283 | when (settings.aiModel) { 284 | AIModels.OPENAI -> { 285 | return OpenAiStreamingChatModel.withApiKey(settings.openAiApiKey) 286 | } 287 | 288 | else -> { 289 | throw IllegalArgumentException("Unsupported AI model: ${settings.aiModel}") 290 | } 291 | } 292 | } 293 | 294 | private fun getSearchEngine(): SearchEngine { 295 | when (settings.searchEngine) { 296 | "google" -> { 297 | return google 298 | } 299 | 300 | else -> { 301 | throw IllegalArgumentException("Unsupported search engine: ${settings.searchEngine}") 302 | } 303 | } 304 | } 305 | 306 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/search/Google.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.search 2 | 3 | import io.vlinx.infinite.exception.SearchException 4 | import io.vlinx.infinite.props.Settings 5 | import io.vlinx.infinite.utils.HttpUtils 6 | import io.vlinx.infinite.utils.JSONUtils 7 | import org.springframework.beans.factory.annotation.Autowired 8 | import org.springframework.stereotype.Component 9 | import java.net.URLEncoder 10 | 11 | 12 | /** 13 | * @author: vlinx (vlinx@vlinx.io) 14 | * @date: 2024/1/27 15 | */ 16 | 17 | @Component 18 | class Google : SearchEngine { 19 | 20 | @Autowired 21 | lateinit var settings: Settings 22 | 23 | override fun search(keyword: String): List { 24 | val url = makeSearchUrl(keyword) 25 | val content = HttpUtils.get(url) 26 | val map = JSONUtils.fromJson>(content)!! 27 | if (map["items"] == null) { 28 | throw SearchException("Google search error: $content") 29 | } 30 | 31 | var items = map["items"] as List> 32 | items = items.subList(0, settings.searchItemsLimit) 33 | 34 | val results = mutableListOf() 35 | 36 | for (item in items) { 37 | val result = SearchResult( 38 | item["title"]!!, 39 | item["link"]!!, 40 | item["snippet"]!! 41 | ) 42 | results.add(result) 43 | } 44 | 45 | return results 46 | } 47 | 48 | 49 | private fun makeSearchUrl(keyword: String): String { 50 | return "${settings.googleSearchEndpoint}?key=${settings.googleSearchApiKey}&cx=${settings.googleSearchEngineId}&q=${ 51 | URLEncoder.encode( 52 | keyword, "UTF-8" 53 | ) 54 | }" 55 | 56 | } 57 | 58 | 59 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/search/SearchEngine.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.search 2 | 3 | 4 | /** 5 | * @author: vlinx (vlinx@vlinx.io) 6 | * @date: 2024/1/27 7 | */ 8 | 9 | interface SearchEngine { 10 | // 输入关键字,返回搜索结果的摘要 11 | fun search(keyword: String): List 12 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/search/SearchResult.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.search 2 | 3 | 4 | /** 5 | * @author: vlinx (vlinx@vlinx.io) 6 | * @date: 2024/1/27 7 | */ 8 | 9 | class SearchResult(val title: String, val link: String, val snippet: String) { 10 | 11 | 12 | 13 | override fun toString(): String { 14 | return "SearchResult(title='$title', link='$link', snippet='$snippet')" 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/utils/ExceptionUtils.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.utils 2 | 3 | import java.io.PrintWriter 4 | import java.io.StringWriter 5 | 6 | 7 | /** 8 | * @author: vlinx (vlinx@vlinx.io) 9 | * @date: 2023/12/8 10 | */ 11 | 12 | object ExceptionUtils { 13 | 14 | fun getStackTrace(t: Throwable): String { 15 | val sw = StringWriter() 16 | val pw = PrintWriter(sw) 17 | t.printStackTrace(pw) 18 | pw.flush() 19 | return sw.toString() 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/utils/HttpUtils.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.utils 2 | 3 | import io.vlinx.infinite.exception.HttpRequestException 4 | import okhttp3.OkHttpClient 5 | import okhttp3.Request 6 | import okhttp3.RequestBody.Companion.toRequestBody 7 | import java.util.concurrent.TimeUnit 8 | 9 | 10 | /** 11 | * @author: vlinx (vlinx@vlinx.io) 12 | * @date: 2023/11/25 13 | */ 14 | 15 | object HttpUtils { 16 | 17 | const val DEFAULT_CONNECT_TIMEOUT = 30 18 | const val DEFAULT_READ_TIMEOUT = 30 19 | 20 | fun newClient(): OkHttpClient { 21 | return newClient(DEFAULT_CONNECT_TIMEOUT, DEFAULT_READ_TIMEOUT) 22 | } 23 | 24 | fun newClient(connectTimeout: Int, readTimeout: Int): OkHttpClient { 25 | return OkHttpClient.Builder().connectTimeout(connectTimeout.toLong(), TimeUnit.SECONDS) 26 | .readTimeout(readTimeout.toLong(), TimeUnit.SECONDS).build() 27 | } 28 | 29 | fun get(url: String): String { 30 | return get(url, DEFAULT_CONNECT_TIMEOUT, DEFAULT_READ_TIMEOUT) 31 | } 32 | 33 | fun get(url: String, connectTimeout: Int, readTimeout: Int): String { 34 | val request = Request.Builder().url(url).get().build() 35 | return submitRequest(request, connectTimeout, readTimeout) 36 | } 37 | 38 | fun post(url: String, payload: String): String { 39 | return post(url, payload, DEFAULT_CONNECT_TIMEOUT, DEFAULT_READ_TIMEOUT) 40 | } 41 | 42 | fun post(url: String, payload: String, connectTimeOut: Int, readTimeOut: Int): String { 43 | val request = Request.Builder().url(url).post(payload.toRequestBody()).build() 44 | return submitRequest(request, connectTimeOut, readTimeOut) 45 | } 46 | 47 | fun submitRequest(request: Request, connectTimeout: Int, readTimeout: Int): String { 48 | val response = newClient(connectTimeout, readTimeout).newCall(request).execute() 49 | 50 | val content = String(response.body!!.bytes()) 51 | response.close() 52 | 53 | if (!response.isSuccessful) { 54 | throw HttpRequestException("Visit: " + request.url.toString() + "\n " + content) 55 | } 56 | 57 | return content 58 | } 59 | 60 | fun submitRequest(request: Request): String { 61 | return submitRequest(request, DEFAULT_CONNECT_TIMEOUT, DEFAULT_READ_TIMEOUT) 62 | } 63 | 64 | 65 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/utils/JSONUtils.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.utils 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper 4 | 5 | 6 | /** 7 | * @author: vlinx (vlinx@vlinx.io) 8 | * @date: 2023/11/23 9 | */ 10 | 11 | object JSONUtils { 12 | 13 | val objectMapper = ObjectMapper() 14 | 15 | fun toJson(obj: Any?): String { 16 | return objectMapper.writeValueAsString(obj) 17 | } 18 | 19 | inline fun fromJson(json: String): T? { 20 | try { 21 | return objectMapper.readValue(json, T::class.java) 22 | } catch (t: Throwable) { 23 | throw Exception("Can't convert [$json] to ${T::class.java}") 24 | } 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/vlinx/infinite/utils/ResponseUtils.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite.utils 2 | 3 | import jakarta.servlet.http.HttpServletResponse 4 | import org.slf4j.LoggerFactory 5 | import org.springframework.http.HttpStatus 6 | 7 | 8 | /** 9 | * @author: vlinx (vlinx@vlinx.io) 10 | * @date: 2024/1/14 11 | */ 12 | 13 | object ResponseUtils { 14 | 15 | private val logger = LoggerFactory.getLogger(ResponseUtils::class.java) 16 | 17 | fun internalError(response: HttpServletResponse, t: Throwable) { 18 | logger.error(ExceptionUtils.getStackTrace(t)) 19 | response.status = HttpStatus.INTERNAL_SERVER_ERROR.value() 20 | response.writer.write(t.message ?: "error") 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /src/main/resources/application-dev.properties: -------------------------------------------------------------------------------- 1 | search-settings.google-search-api-key=${GOOGLE_API_KEY} 2 | search-settings.google-search-engine-id=${GOOGLE_SEARCH_ENGINE_ID} 3 | search-settings.open-ai-api-key=${OPENAI_API_KEY} 4 | # brief or detail 5 | search-settings.info_mode=brief 6 | -------------------------------------------------------------------------------- /src/main/resources/application-prod.properties: -------------------------------------------------------------------------------- 1 | search-settings.google-search-api-key=${GOOGLE_API_KEY} 2 | search-settings.google-search-engine-id=${GOOGLE_SEARCH_ENGINE_ID} 3 | search-settings.open-ai-api-key=${OPENAI_API_KEY} 4 | search-settings.info_mode=${INFO_MODE} -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8605 2 | spring.profiles.active=dev 3 | logging.level.io.vlinx=trace 4 | logging.pattern.console="%date{yyyy-MM-dd HH:mm:ss} [%-5level] %msg%n" -------------------------------------------------------------------------------- /src/main/resources/static/404.html: -------------------------------------------------------------------------------- 1 | 404: This page could not be found.Infinite Search

404

This page could not be found.

-------------------------------------------------------------------------------- /src/main/resources/static/_next/static/30hMvc9DJmbDwwUOsyKJQ/_buildManifest.js: -------------------------------------------------------------------------------- 1 | self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/_error":["static/chunks/pages/_error-e87e5963ec1b8011.js"],sortedPages:["/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/30hMvc9DJmbDwwUOsyKJQ/_ssgManifest.js: -------------------------------------------------------------------------------- 1 | self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/N-5UyoExv-FkxfM34QRsr/_buildManifest.js: -------------------------------------------------------------------------------- 1 | self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/_error":["static/chunks/pages/_error-e87e5963ec1b8011.js"],sortedPages:["/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/N-5UyoExv-FkxfM34QRsr/_ssgManifest.js: -------------------------------------------------------------------------------- 1 | self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/chunks/app/_not-found-4b4acadd4cddffa9.js: -------------------------------------------------------------------------------- 1 | (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[165],{3155:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found",function(){return n(4032)}])},4032:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let l=n(1024)._(n(2265)),r={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};function o(){return l.default.createElement(l.default.Fragment,null,l.default.createElement("title",null,"404: This page could not be found."),l.default.createElement("div",{style:r.error},l.default.createElement("div",null,l.default.createElement("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),l.default.createElement("h1",{className:"next-error-h1",style:r.h1},"404"),l.default.createElement("div",{style:r.desc},l.default.createElement("h2",{style:r.h2},"This page could not be found.")))))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},function(e){e.O(0,[971,938,744],function(){return e(e.s=3155)}),_N_E=e.O()}]); -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/chunks/app/layout-01e766d681438518.js: -------------------------------------------------------------------------------- 1 | (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{6379:function(e,n,t){Promise.resolve().then(t.t.bind(t,9646,23)),Promise.resolve().then(t.t.bind(t,3385,23))},3385:function(){},9646:function(e){e.exports={style:{fontFamily:"'__Inter_e66fe9', '__Inter_Fallback_e66fe9'",fontStyle:"normal"},className:"__className_e66fe9"}}},function(e){e.O(0,[971,938,744],function(){return e(e.s=6379)}),_N_E=e.O()}]); -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/chunks/app/layout-e8949822955e989d.js: -------------------------------------------------------------------------------- 1 | (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{933:function(e,n,t){Promise.resolve().then(t.t.bind(t,3385,23)),Promise.resolve().then(t.t.bind(t,9646,23))},3385:function(){},9646:function(e){e.exports={style:{fontFamily:"'__Inter_e66fe9', '__Inter_Fallback_e66fe9'",fontStyle:"normal"},className:"__className_e66fe9"}}},function(e){e.O(0,[971,938,744],function(){return e(e.s=933)}),_N_E=e.O()}]); -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/chunks/app/page-2f488ec93b0d782d.js: -------------------------------------------------------------------------------- 1 | (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{2898:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(2265),i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 2 | * @license lucide-react v0.309.0 - ISC 3 | * 4 | * This source code is licensed under the ISC license. 5 | * See the LICENSE file in the root directory of this source tree. 6 | */let s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),c=(e,t)=>{let r=(0,n.forwardRef)(({color:r="currentColor",size:c=24,strokeWidth:o=2,absoluteStrokeWidth:l,className:a="",children:u,...d},h)=>(0,n.createElement)("svg",{ref:h,...i,width:c,height:c,stroke:r,strokeWidth:l?24*Number(o)/Number(c):o,className:["lucide",`lucide-${s(e)}`,a].join(" "),...d},[...t.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(u)?u:[u]]));return r.displayName=`${e}`,r}},8291:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});/** 7 | * @license lucide-react v0.309.0 - ISC 8 | * 9 | * This source code is licensed under the ISC license. 10 | * See the LICENSE file in the root directory of this source tree. 11 | */let n=(0,r(2898).Z)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},8179:function(e,t,r){Promise.resolve().then(r.bind(r,3249))},6498:function(e,t,r){"use strict";r.d(t,{o:function(){return a}});var n=r(7437),i=r(6882),s=r(8291),c=r(8481),o=r(4033),l=r(2265);let a=()=>{let[e,t]=(0,l.useState)(""),r=(0,o.useRouter)();return(0,n.jsx)("form",{onSubmit:n=>{n.preventDefault(),e&&(t(""),r.push((0,i.T)(encodeURIComponent(e),(0,c.x0)())))},children:(0,n.jsxs)("label",{className:"relative bg-white flex items-center justify-center border ring-8 ring-zinc-300/20 py-2 px-2 rounded-lg gap-2 focus-within:border-zinc-300",htmlFor:"search-bar",children:[(0,n.jsx)("input",{id:"search-bar",value:e,onChange:e=>t(e.target.value),autoFocus:!0,placeholder:"Ask anything ...",className:"px-2 pr-6 w-full rounded-md flex-1 outline-none bg-white"}),(0,n.jsx)("button",{type:"submit",className:"w-auto py-1 px-2 bg-black border-black text-white fill-white active:scale-95 border overflow-hidden relative rounded-xl",children:(0,n.jsx)(s.Z,{size:16})})]})})}},3249:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return l}});var n=r(7437);/** 12 | * @license lucide-react v0.309.0 - ISC 13 | * 14 | * This source code is licensed under the ISC license. 15 | * See the LICENSE file in the root directory of this source tree. 16 | */let i=(0,r(2898).Z)("Mails",[["rect",{width:"16",height:"13",x:"6",y:"4",rx:"2",key:"1drq3f"}],["path",{d:"m22 7-7.1 3.78c-.57.3-1.23.3-1.8 0L6 7",key:"xn252p"}],["path",{d:"M2 8v11c0 1.1.9 2 2 2h14",key:"n13cji"}]]),s=()=>(0,n.jsxs)("div",{className:"text-center flex flex-col items-center text-xs text-zinc-700 gap-1",children:[(0,n.jsxs)("div",{className:"flex gap-2 justify-center",children:[(0,n.jsx)("div",{children:(0,n.jsxs)("a",{className:"text-blue-500 font-medium inline-flex gap-1 items-center flex-nowrap text-nowrap text-md",href:"https://twitter.com/vlinx_soft",children:[(0,n.jsx)(i,{size:8}),"Follow us"]})}),(0,n.jsx)("div",{className:"text-md",children:"if you need to know how this project is made"})]}),(0,n.jsxs)("div",{className:"flex items-center justify-center flex-wrap gap-x-4 gap-y-2 mt-2 text-zinc-400 mt-5",children:[(0,n.jsx)("a",{className:"hover:text-zinc-950",href:"https://vlinx.io/",children:"VLINX Software"}),(0,n.jsx)("a",{className:"hover:text-zinc-950",href:"https://twitter.com/vlinx_soft",children:"Twitter"}),(0,n.jsx)("a",{className:"hover:text-zinc-950",href:"https://blog.vlinx.io/",children:"Blog"}),(0,n.jsx)("a",{className:"hover:text-zinc-950",href:"https://github.com/vlinx-io",children:"Github"}),(0,n.jsx)("a",{className:"hover:text-zinc-950",href:"https://www.youtube.com/@vlinxsoftware1719",children:"Youtube"})]})]});r(2265);let c=()=>(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex gap-4 items-center justify-center cursor-default select-none relative",children:[(0,n.jsx)("div",{className:"h-10 w-10",children:(0,n.jsx)("img",{src:"/logo.png",alt:"logo"})}),(0,n.jsx)("div",{className:"text-center font-medium text-2xl md:text-3xl text-zinc-950 relative text-nowrap",children:"Infinite Search"})]}),(0,n.jsx)("div",{className:"my-4 flex items-center justify-center gap-2",children:(0,n.jsx)("a",{href:"https://github.com/leptonai/search_with_lepton",target:"_blank",className:"text-sm underline text-zinc-500 hover:text-zinc-950",children:"Inspired by Lepton"})})]});var o=r(6498);function l(){return(0,n.jsx)("div",{className:"absolute inset-0 min-h-[500px] flex items-center justify-center",children:(0,n.jsxs)("div",{className:"relative flex flex-col gap-8 px-4 -mt-24 w-1/3 min-w-96",children:[(0,n.jsx)(c,{}),(0,n.jsx)(o.o,{}),(0,n.jsx)(s,{})]})})}},6882:function(e,t,r){"use strict";r.d(t,{T:function(){return n}});let n=(e,t)=>"".concat("/search.html","?q=").concat(encodeURIComponent(e),"&rid=").concat(t)},622:function(e,t,r){"use strict";var n=r(2265),i=Symbol.for("react.element"),s=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,r){var n,s={},a=null,u=null;for(n in void 0!==r&&(a=""+r),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(u=t.ref),t)c.call(t,n)&&!l.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===s[n]&&(s[n]=t[n]);return{$$typeof:i,type:e,key:a,ref:u,props:s,_owner:o.current}}t.Fragment=s,t.jsx=a,t.jsxs=a},7437:function(e,t,r){"use strict";e.exports=r(622)},4033:function(e,t,r){e.exports=r(5313)},8481:function(e,t,r){"use strict";r.d(t,{x0:function(){return n}});let n=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((e,t)=>((t&=63)<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"")}},function(e){e.O(0,[971,938,744],function(){return e(e.s=8179)}),_N_E=e.O()}]); -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/chunks/app/page-4ae9f92b94267d88.js: -------------------------------------------------------------------------------- 1 | (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{2898:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(2265),i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 2 | * @license lucide-react v0.309.0 - ISC 3 | * 4 | * This source code is licensed under the ISC license. 5 | * See the LICENSE file in the root directory of this source tree. 6 | */let s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),c=(e,t)=>{let r=(0,n.forwardRef)(({color:r="currentColor",size:c=24,strokeWidth:o=2,absoluteStrokeWidth:l,className:a="",children:u,...d},x)=>(0,n.createElement)("svg",{ref:x,...i,width:c,height:c,stroke:r,strokeWidth:l?24*Number(o)/Number(c):o,className:["lucide",`lucide-${s(e)}`,a].join(" "),...d},[...t.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(u)?u:[u]]));return r.displayName=`${e}`,r}},8291:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});/** 7 | * @license lucide-react v0.309.0 - ISC 8 | * 9 | * This source code is licensed under the ISC license. 10 | * See the LICENSE file in the root directory of this source tree. 11 | */let n=(0,r(2898).Z)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},8179:function(e,t,r){Promise.resolve().then(r.bind(r,3249))},6498:function(e,t,r){"use strict";r.d(t,{o:function(){return a}});var n=r(7437),i=r(6882),s=r(8291),c=r(8481),o=r(4033),l=r(2265);let a=()=>{let[e,t]=(0,l.useState)(""),r=(0,o.useRouter)();return(0,n.jsx)("form",{onSubmit:n=>{n.preventDefault(),e&&(t(""),r.push((0,i.T)(encodeURIComponent(e),(0,c.x0)())))},children:(0,n.jsxs)("label",{className:"relative bg-white flex items-center justify-center border ring-8 ring-zinc-300/20 py-2 px-2 rounded-lg gap-2 focus-within:border-zinc-300",htmlFor:"search-bar",children:[(0,n.jsx)("input",{id:"search-bar",value:e,onChange:e=>t(e.target.value),autoFocus:!0,placeholder:"Ask anything ...",className:"px-2 pr-6 w-full rounded-md flex-1 outline-none bg-white"}),(0,n.jsx)("button",{type:"submit",className:"w-auto py-1 px-2 bg-black border-black text-white fill-white active:scale-95 border overflow-hidden relative rounded-xl",children:(0,n.jsx)(s.Z,{size:16})})]})})}},3249:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return l}});var n=r(7437);/** 12 | * @license lucide-react v0.309.0 - ISC 13 | * 14 | * This source code is licensed under the ISC license. 15 | * See the LICENSE file in the root directory of this source tree. 16 | */let i=(0,r(2898).Z)("Mails",[["rect",{width:"16",height:"13",x:"6",y:"4",rx:"2",key:"1drq3f"}],["path",{d:"m22 7-7.1 3.78c-.57.3-1.23.3-1.8 0L6 7",key:"xn252p"}],["path",{d:"M2 8v11c0 1.1.9 2 2 2h14",key:"n13cji"}]]),s=()=>(0,n.jsxs)("div",{className:"text-center flex flex-col items-center text-xs text-zinc-700 gap-1",children:[(0,n.jsxs)("div",{className:"flex gap-2 justify-center",children:[(0,n.jsx)("div",{children:(0,n.jsxs)("a",{className:"text-blue-500 font-medium inline-flex gap-1 items-center flex-nowrap text-nowrap text-md",href:"mailto:vlinx@vlinx.io",children:[(0,n.jsx)(i,{size:8}),"Follow us"]})}),(0,n.jsx)("div",{className:"text-md",children:"if you need to know how this project is made"})]}),(0,n.jsxs)("div",{className:"flex items-center justify-center flex-wrap gap-x-4 gap-y-2 mt-2 text-zinc-400 mt-5",children:[(0,n.jsx)("a",{className:"hover:text-zinc-950",href:"https://vlinx.io/",children:"VLINX Software"}),(0,n.jsx)("a",{className:"hover:text-zinc-950",href:"https://twitter.com/vlinx_soft",children:"Twitter"}),(0,n.jsx)("a",{className:"hover:text-zinc-950",href:"https://blog.vlinx.io/",children:"Blog"}),(0,n.jsx)("a",{className:"hover:text-zinc-950",href:"https://github.com/vlinx-io",children:"Github"}),(0,n.jsx)("a",{className:"hover:text-zinc-950",href:"https://www.youtube.com/@vlinxsoftware1719",children:"Youtube"})]})]});r(2265);let c=()=>(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex gap-4 items-center justify-center cursor-default select-none relative",children:[(0,n.jsx)("div",{className:"h-10 w-10",children:(0,n.jsx)("img",{src:"/logo.png",alt:"logo"})}),(0,n.jsx)("div",{className:"text-center font-medium text-2xl md:text-3xl text-zinc-950 relative text-nowrap",children:"Infinite Search"})]}),(0,n.jsx)("div",{className:"my-4 flex items-center justify-center gap-2",children:(0,n.jsx)("a",{href:"https://github.com/leptonai/search_with_lepton",target:"_blank",className:"text-sm underline text-zinc-500 hover:text-zinc-950",children:"Inspired by Lepton"})})]});var o=r(6498);function l(){return(0,n.jsx)("div",{className:"absolute inset-0 min-h-[500px] flex items-center justify-center",children:(0,n.jsxs)("div",{className:"relative flex flex-col gap-8 px-4 -mt-24 w-1/3 min-w-96",children:[(0,n.jsx)(c,{}),(0,n.jsx)(o.o,{}),(0,n.jsx)(s,{})]})})}},6882:function(e,t,r){"use strict";r.d(t,{T:function(){return n}});let n=(e,t)=>"".concat("/search.html","?q=").concat(encodeURIComponent(e),"&rid=").concat(t)},622:function(e,t,r){"use strict";var n=r(2265),i=Symbol.for("react.element"),s=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,r){var n,s={},a=null,u=null;for(n in void 0!==r&&(a=""+r),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(u=t.ref),t)c.call(t,n)&&!l.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===s[n]&&(s[n]=t[n]);return{$$typeof:i,type:e,key:a,ref:u,props:s,_owner:o.current}}t.Fragment=s,t.jsx=a,t.jsxs=a},7437:function(e,t,r){"use strict";e.exports=r(622)},4033:function(e,t,r){e.exports=r(5313)},8481:function(e,t,r){"use strict";r.d(t,{x0:function(){return n}});let n=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((e,t)=>((t&=63)<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"")}},function(e){e.O(0,[971,938,744],function(){return e(e.s=8179)}),_N_E=e.O()}]); -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/chunks/app/search/page-5b5448c0ec358638.js: -------------------------------------------------------------------------------- 1 | (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[797],{1865:function(e,t,s){Promise.resolve().then(s.bind(s,2302))},6498:function(e,t,s){"use strict";s.d(t,{o:function(){return o}});var a=s(7437),l=s(6882),n=s(8291),r=s(8481),i=s(4033),c=s(2265);let o=()=>{let[e,t]=(0,c.useState)(""),s=(0,i.useRouter)();return(0,a.jsx)("form",{onSubmit:a=>{a.preventDefault(),e&&(t(""),s.push((0,l.T)(encodeURIComponent(e),(0,r.x0)())))},children:(0,a.jsxs)("label",{className:"relative bg-white flex items-center justify-center border ring-8 ring-zinc-300/20 py-2 px-2 rounded-lg gap-2 focus-within:border-zinc-300",htmlFor:"search-bar",children:[(0,a.jsx)("input",{id:"search-bar",value:e,onChange:e=>t(e.target.value),autoFocus:!0,placeholder:"Ask anything ...",className:"px-2 pr-6 w-full rounded-md flex-1 outline-none bg-white"}),(0,a.jsx)("button",{type:"submit",className:"w-auto py-1 px-2 bg-black border-black text-white fill-white active:scale-95 border overflow-hidden relative rounded-xl",children:(0,a.jsx)(n.Z,{size:16})})]})})}},2302:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return P}});var a=s(7437),l=s(2265),n=s(299),r=s(7042),i=s(4769);function c(){for(var e=arguments.length,t=Array(e),s=0;s{let{className:s,align:l="center",sideOffset:r=4,...i}=e;return(0,a.jsx)(n.h_,{children:(0,a.jsx)(n.VY,{ref:t,align:l,sideOffset:r,className:c("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...i})})});function m(e){let{className:t,...s}=e;return(0,a.jsx)("div",{className:c("animate-pulse rounded-md bg-muted",t),...s})}x.displayName=n.VY.displayName;let u=e=>{let{title:t,content:s}=e;return(0,a.jsxs)("div",{className:"flex flex-col gap-4 w-full",children:[(0,a.jsx)("div",{className:"flex gap-2 text-blue-500",children:t}),s]})};var h=s(7154),f=s(3881);let p=e=>{let{markdown:t,sources:s}=e;return(0,a.jsx)(u,{title:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h.Z,{})," Answer"]}),content:t?(0,a.jsx)("div",{className:"prose prose-sm max-w-full",children:(0,a.jsx)(f.U,{components:{a:e=>{var t,l,n,r;let{node:i,...c}=e;if(!c.href)return(0,a.jsx)(a.Fragment,{});let m=s[+c.href-1];return m?(0,a.jsx)("span",{className:"inline-block w-4",children:(0,a.jsxs)(o,{children:[(0,a.jsx)(d,{asChild:!0,children:(0,a.jsx)("span",{title:m.name,className:"inline-block cursor-pointer transform scale-[60%] no-underline font-medium bg-zinc-300 hover:bg-zinc-400 w-6 text-center h-6 rounded-full origin-top-left",children:c.href})}),(0,a.jsxs)(x,{align:"start",className:"max-w-screen-md flex flex-col gap-2 bg-white shadow-transparent ring-zinc-50 ring-4 text-xs",children:[(0,a.jsx)("div",{className:"text-ellipsis overflow-hidden whitespace-nowrap font-medium",children:m.name}),(0,a.jsxs)("div",{className:"flex gap-4",children:[(null===(t=m.primaryImageOfPage)||void 0===t?void 0:t.thumbnailUrl)&&(0,a.jsx)("div",{className:"flex-none",children:(0,a.jsx)("img",{className:"rounded h-16 w-16",width:null===(l=m.primaryImageOfPage)||void 0===l?void 0:l.width,height:null===(n=m.primaryImageOfPage)||void 0===n?void 0:n.height,src:null===(r=m.primaryImageOfPage)||void 0===r?void 0:r.thumbnailUrl})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)("div",{className:"line-clamp-4 text-zinc-500 break-words",children:m.snippet})})]}),(0,a.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,a.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,a.jsx)("div",{className:"text-ellipsis text-blue-500 overflow-hidden whitespace-nowrap",children:(0,a.jsx)("a",{title:m.name,href:m.url,target:"_blank",children:m.url})})}),(0,a.jsx)("div",{className:"flex-none flex items-center relative",children:(0,a.jsx)("img",{className:"h-3 w-3",alt:m.url,src:"https://www.google.com/s2/favicons?domain=".concat(m.url,"&sz=",16)})})]})]})]})}):(0,a.jsx)(a.Fragment,{})}},children:t})}):(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(m,{className:"max-w-sm h-4 bg-zinc-200"}),(0,a.jsx)(m,{className:"max-w-lg h-4 bg-zinc-200"}),(0,a.jsx)(m,{className:"max-w-2xl h-4 bg-zinc-200"}),(0,a.jsx)(m,{className:"max-w-lg h-4 bg-zinc-200"}),(0,a.jsx)(m,{className:"max-w-xl h-4 bg-zinc-200"})]})})};var g=s(6882),b=s(8481),j=s(1396),w=s.n(j);let v=e=>{let{query:t}=e,s=(0,l.useMemo)(()=>(0,b.x0)(),[t]);return(0,a.jsx)(w(),{prefetch:!1,title:t,href:(0,g.T)(t,s),className:"border border-zinc-200/50 text-ellipsis overflow-hidden text-nowrap items-center rounded-lg bg-zinc-100 hover:bg-zinc-200/80 hover:text-zinc-950 px-2 py-1 text-xs font-medium text-zinc-600",children:t})};var N=s(3598);let z=e=>{let{relates:t}=e;return(0,a.jsx)(u,{title:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(N.Z,{})," Related"]}),content:(0,a.jsx)("div",{className:"flex gap-2 flex-col",children:null!==t?t.length>0?t.map(e=>{let{question:t}=e;return(0,a.jsx)(v,{query:t},t)}):(0,a.jsx)("div",{className:"text-sm",children:"No related questions."}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m,{className:"w-full h-5 bg-zinc-200/80"}),(0,a.jsx)(m,{className:"w-full h-5 bg-zinc-200/80"}),(0,a.jsx)(m,{className:"w-full h-5 bg-zinc-200/80"})]})})})};var y=s(8468);let k=e=>{let{source:t,index:s}=e,{id:l,name:n,url:r}=t,i=new URL(r).hostname;return(0,a.jsxs)("div",{className:"relative text-xs py-3 px-3 bg-zinc-100 hover:bg-zinc-200 rounded-lg flex flex-col gap-2",children:[(0,a.jsx)("a",{href:r,target:"_blank",className:"absolute inset-0"}),(0,a.jsx)("div",{className:"font-medium text-zinc-950 text-ellipsis overflow-hidden whitespace-nowrap break-words",children:n}),(0,a.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,a.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,a.jsxs)("div",{className:"text-ellipsis whitespace-nowrap break-all text-zinc-400 overflow-hidden w-full",children:[s+1," - ",i]})}),(0,a.jsx)("div",{className:"flex-none flex items-center",children:(0,a.jsx)("img",{className:"h-3 w-3",alt:i,src:"https://www.google.com/s2/favicons?domain=".concat(i,"&sz=",16)})})]})]},l)},_=e=>{let{sources:t}=e;return(0,a.jsx)(u,{title:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y.Z,{})," Sources"]}),content:(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2",children:t.length>0?t.map((e,t)=>(0,a.jsx)(k,{index:t,source:e},e.id)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m,{className:"max-w-sm h-16 bg-zinc-200/80"}),(0,a.jsx)(m,{className:"max-w-sm h-16 bg-zinc-200/80"}),(0,a.jsx)(m,{className:"max-w-sm h-16 bg-zinc-200/80"}),(0,a.jsx)(m,{className:"max-w-sm h-16 bg-zinc-200/80"})]})})})};async function S(e,t,s,a){let{done:l,value:n}=await e.read();if(l){a&&a(),t.close();return}return s&&s(n),t.enqueue(n),S(e,t,s,a)}let C=(e,t,s)=>{let a=e.body.getReader();return new ReadableStream({start:e=>S(a,e,t,s)})},R="__LLM_RESPONSE__",O="__RELATED_QUESTIONS__",U=async(e,t,s,a,l,n,r)=>{let i=new TextDecoder,c=new Uint8Array,o="",d=!1,x=await fetch("/api/search",{method:"POST",headers:{"Content-Type":"application/json",Accept:"*./*"},signal:e.signal,body:JSON.stringify({query:t,search_uuid:s})});if(200!==x.status){null==r||r(x.status);return}let m=e=>{l(e.replace(/\[\[([cC])itation/g,"[citation").replace(/[cC]itation:(\d+)]]/g,"citation:$1]").replace(/\[\[([cC]itation:\d+)]](?!])/g,"[$1]").replace(/\[[cC]itation:(\d+)]/g,"[citation]($1)"))};C(x,e=>{if(c=new Uint8Array([...c,...e]),(o=i.decode(c,{stream:!0})).includes(R)){let[e,t]=o.split(R);if(!d)try{a(JSON.parse(e))}catch(e){a([])}if(d=!0,t.includes(O)){let[e]=t.split(O);m(e)}else m(t)}},()=>{let[e,t]=o.split(O);try{n(JSON.parse(t))}catch(e){n([])}})};var I=s(9208);let E=e=>{let{query:t,rid:s}=e,[n,r]=(0,l.useState)([]),[i,c]=(0,l.useState)(""),[o,d]=(0,l.useState)(null),[x,m]=(0,l.useState)(null);return(0,l.useEffect)(()=>{let e=new AbortController;return U(e,t,s,r,c,d,m),()=>{e.abort()}},[t]),(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(p,{markdown:i,sources:n}),(0,a.jsx)(_,{sources:n}),(0,a.jsx)(z,{relates:o}),x&&(0,a.jsx)("div",{className:"absolute inset-4 flex items-center justify-center bg-white/40 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"p-4 bg-white shadow-2xl rounded text-blue-500 font-medium flex gap-4",children:[(0,a.jsx)(I.Z,{}),429===x?"Sorry, you have made too many requests recently, try again later.":"Sorry, we might be overloaded, try again later."]})})]})};var F=s(6498),T=s(3116),q=s(4033);let A=e=>{let{query:t}=e,s=(0,q.useRouter)();return(0,a.jsxs)("div",{className:"flex items-center pb-4 mb-6 border-b gap-4",children:[(0,a.jsx)("div",{className:"flex-1 text-lg sm:text-xl text-black text-ellipsis overflow-hidden whitespace-nowrap",title:t,children:t}),(0,a.jsx)("div",{className:"flex-none",children:(0,a.jsxs)("button",{onClick:()=>{s.push((0,g.T)(encodeURIComponent(t),(0,b.x0)()))},type:"button",className:"rounded flex gap-2 items-center bg-transparent px-2 py-1 text-xs font-semibold text-blue-500 hover:bg-zinc-100",children:[(0,a.jsx)(T.Z,{size:12}),"Rewrite"]})})]})};function P(){let e=(0,q.useSearchParams)(),t=decodeURIComponent(e.get("q")||""),s=decodeURIComponent(e.get("rid")||"");return(0,a.jsx)("div",{className:"absolute inset-0",children:(0,a.jsxs)("div",{className:"mx-auto max-w-3xl absolute inset-4 md:inset-8 bg-white",children:[(0,a.jsx)("div",{className:"h-20 pointer-events-none rounded-t-2xl w-full backdrop-filter absolute top-0 bg-gradient-to-t from-transparent to-white [mask-image:linear-gradient(to_bottom,white,transparent)]"}),(0,a.jsxs)("div",{className:"px-4 md:px-8 pt-6 pb-24 rounded-2xl ring-8 ring-zinc-300/20 border border-zinc-200 h-full overflow-auto",children:[(0,a.jsx)(A,{query:t}),(0,a.jsx)(E,{query:t,rid:s},s)]}),(0,a.jsx)("div",{className:"h-80 pointer-events-none w-full rounded-b-2xl backdrop-filter absolute bottom-0 bg-gradient-to-b from-transparent to-white [mask-image:linear-gradient(to_top,white,transparent)]"}),(0,a.jsx)("div",{className:"absolute z-10 flex items-center justify-center bottom-6 px-4 md:px-8 w-full",children:(0,a.jsx)("div",{className:"w-full",children:(0,a.jsx)(F.o,{})})})]})})}},6882:function(e,t,s){"use strict";s.d(t,{T:function(){return a}});let a=(e,t)=>"".concat("/search.html","?q=").concat(encodeURIComponent(e),"&rid=").concat(t)}},function(e){e.O(0,[52,971,938,744],function(){return e(e.s=1865)}),_N_E=e.O()}]); -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/chunks/main-app-dd32906684d8c53d.js: -------------------------------------------------------------------------------- 1 | (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[744],{1263:function(e,n,t){Promise.resolve().then(t.t.bind(t,7690,23)),Promise.resolve().then(t.t.bind(t,8955,23)),Promise.resolve().then(t.t.bind(t,5613,23)),Promise.resolve().then(t.t.bind(t,1902,23)),Promise.resolve().then(t.t.bind(t,1778,23)),Promise.resolve().then(t.t.bind(t,7831,23))}},function(e){var n=function(n){return e(e.s=n)};e.O(0,[971,938],function(){return n(5317),n(1263)}),_N_E=e.O()}]); -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/chunks/pages/_app-98cb51ec6f9f135f.js: -------------------------------------------------------------------------------- 1 | (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{1597:function(n,_,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return u(5141)}])}},function(n){var _=function(_){return n(n.s=_)};n.O(0,[774,179],function(){return _(1597),_(3719)}),_N_E=n.O()}]); -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/chunks/pages/_error-e87e5963ec1b8011.js: -------------------------------------------------------------------------------- 1 | (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[820],{1981:function(n,_,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){return u(9049)}])}},function(n){n.O(0,[888,774,179],function(){return n(n.s=1981)}),_N_E=n.O()}]); -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/chunks/webpack-17c49b7293d83f0e.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";var e,t,n,r,o,u,i,c,f,a={},l={};function s(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}},r=!0;try{a[e].call(n.exports,n,n.exports,s),r=!1}finally{r&&delete l[e]}return n.exports}s.m=a,e=[],s.O=function(t,n,r,o){if(n){o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var i=1/0,u=0;u=o&&Object.keys(s.O).every(function(e){return s.O[e](n[f])})?n.splice(f--,1):(c=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var i=1/0,u=0;u=o&&Object.keys(s.O).every(function(e){return s.O[e](n[f])})?n.splice(f--,1):(c=!1,oli):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"\201C""\201D""\2018""\2019";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows)/10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows)/10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-kbd:#111827;--tw-prose-kbd-shadows:17 24 39;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:255 255 255;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:rgba(0,0,0,.5);--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-left:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-left:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding:.1428571em .3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding:.6666667em 1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-left:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:1em;padding-bottom:.6666667em;padding-left:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.6666667em 1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-4{inset:1rem}.bottom-0{bottom:0}.bottom-6{bottom:1.5rem}.top-0{top:0}.z-10{z-index:10}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.-mt-24{margin-top:-6rem}.mb-6{margin-bottom:1.5rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-10{height:2.5rem}.h-16{height:4rem}.h-20{height:5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-80{height:20rem}.h-full{height:100%}.min-h-\[500px\]{min-height:500px}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-16{width:4rem}.w-3{width:.75rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-72{width:18rem}.w-auto{width:auto}.w-full{width:100%}.min-w-96{min-width:24rem}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-screen-md{max-width:768px}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.origin-top-left{transform-origin:top left}.scale-\[60\%\]{--tw-scale-x:60%;--tw-scale-y:60%}.scale-\[60\%\],.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-2{row-gap:.5rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-nowrap{text-wrap:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-2xl{border-bottom-right-radius:1rem;border-bottom-left-radius:1rem}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity))}.border-zinc-200\/50{border-color:hsla(240,6%,90%,.5)}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-white\/40{background-color:hsla(0,0%,100%,.4)}.bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity))}.bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity))}.bg-zinc-200\/80{background-color:hsla(240,6%,90%,.8)}.bg-zinc-300{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-transparent{--tw-gradient-from:transparent var(--tw-gradient-from-position);--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-white{--tw-gradient-to:#fff var(--tw-gradient-to-position)}.fill-white{fill:#fff}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-24{padding-bottom:6rem}.pb-4{padding-bottom:1rem}.pr-6{padding-right:1.5rem}.pt-6{padding-top:1.5rem}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(47 128 237/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity))}.text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity))}.text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-2xl,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-transparent{--tw-shadow-color:transparent;--tw-shadow:var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-4,.ring-8{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-8{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-zinc-300\/20{--tw-ring-color:hsla(240,5%,84%,.2)}.ring-zinc-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 250 250/var(--tw-ring-opacity))}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px)}.backdrop-blur-sm,.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.\[mask-image\:linear-gradient\(to_bottom\2c white\2c transparent\)\]{-webkit-mask-image:linear-gradient(180deg,#fff,transparent);mask-image:linear-gradient(180deg,#fff,transparent)}.\[mask-image\:linear-gradient\(to_top\2c white\2c transparent\)\]{-webkit-mask-image:linear-gradient(0deg,#fff,transparent);mask-image:linear-gradient(0deg,#fff,transparent)}input:-webkit-autofill,input:-webkit-autofill:focus,input:-webkit-autofill:hover,select:-webkit-autofill,select:-webkit-autofill:focus,select:-webkit-autofill:hover,textarea:-webkit-autofill,textarea:-webkit-autofill:focus,textarea:-webkit-autofill:hover{-webkit-background-clip:text}.focus-within\:border-zinc-300:focus-within{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity))}.hover\:bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity))}.hover\:bg-zinc-200:hover{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity))}.hover\:bg-zinc-200\/80:hover{background-color:hsla(240,6%,90%,.8)}.hover\:bg-zinc-400:hover{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity))}.hover\:text-zinc-950:hover{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity))}.active\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:640px){.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\:inset-8{inset:2rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@font-face{font-family:__Inter_e66fe9;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/ec159349637c90ad-s.woff2) format("woff2");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-family:__Inter_e66fe9;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/513657b02c5c193f-s.woff2) format("woff2");unicode-range:U+0301,U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-family:__Inter_e66fe9;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/fd4db3eb5472fc27-s.woff2) format("woff2");unicode-range:U+1f??}@font-face{font-family:__Inter_e66fe9;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/51ed15f9841b9f9d-s.woff2) format("woff2");unicode-range:U+0370-03ff}@font-face{font-family:__Inter_e66fe9;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/05a31a2ca4975f99-s.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1ea0-1ef9,U+20ab}@font-face{font-family:__Inter_e66fe9;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/d6b16ce4a6175f26-s.woff2) format("woff2");unicode-range:U+0100-02af,U+0304,U+0308,U+0329,U+1e00-1e9f,U+1ef2-1eff,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-family:__Inter_e66fe9;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+0304,U+0308,U+0329,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-family:__Inter_Fallback_e66fe9;src:local("Arial");ascent-override:90.20%;descent-override:22.48%;line-gap-override:0.00%;size-adjust:107.40%}.__className_e66fe9{font-family:__Inter_e66fe9,__Inter_Fallback_e66fe9;font-style:normal} -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/css/118bd211991061b8.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:__Inter_e66fe9;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/ec159349637c90ad-s.woff2) format("woff2");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-family:__Inter_e66fe9;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/513657b02c5c193f-s.woff2) format("woff2");unicode-range:U+0301,U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-family:__Inter_e66fe9;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/fd4db3eb5472fc27-s.woff2) format("woff2");unicode-range:U+1f??}@font-face{font-family:__Inter_e66fe9;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/51ed15f9841b9f9d-s.woff2) format("woff2");unicode-range:U+0370-03ff}@font-face{font-family:__Inter_e66fe9;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/05a31a2ca4975f99-s.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1ea0-1ef9,U+20ab}@font-face{font-family:__Inter_e66fe9;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/d6b16ce4a6175f26-s.woff2) format("woff2");unicode-range:U+0100-02af,U+0304,U+0308,U+0329,U+1e00-1e9f,U+1ef2-1eff,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-family:__Inter_e66fe9;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+0304,U+0308,U+0329,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-family:__Inter_Fallback_e66fe9;src:local("Arial");ascent-override:90.20%;descent-override:22.48%;line-gap-override:0.00%;size-adjust:107.40%}.__className_e66fe9{font-family:__Inter_e66fe9,__Inter_Fallback_e66fe9;font-style:normal} 2 | 3 | /* 4 | ! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com 5 | */*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(47,128,237,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(47,128,237,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"\201C""\201D""\2018""\2019";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows)/10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows)/10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-kbd:#111827;--tw-prose-kbd-shadows:17 24 39;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:255 255 255;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:rgba(0,0,0,.5);--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-left:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-left:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding:.1428571em .3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding:.6666667em 1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-left:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:1em;padding-bottom:.6666667em;padding-left:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.6666667em 1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-4{inset:1rem}.bottom-0{bottom:0}.bottom-6{bottom:1.5rem}.top-0{top:0}.z-10{z-index:10}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.-mt-24{margin-top:-6rem}.mb-6{margin-bottom:1.5rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-10{height:2.5rem}.h-16{height:4rem}.h-20{height:5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-80{height:20rem}.h-full{height:100%}.min-h-\[500px\]{min-height:500px}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-16{width:4rem}.w-3{width:.75rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-72{width:18rem}.w-auto{width:auto}.w-full{width:100%}.min-w-96{min-width:24rem}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-screen-md{max-width:768px}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.origin-top-left{transform-origin:top left}.scale-\[60\%\]{--tw-scale-x:60%;--tw-scale-y:60%}.scale-\[60\%\],.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-2{row-gap:.5rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-nowrap{text-wrap:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-2xl{border-bottom-right-radius:1rem;border-bottom-left-radius:1rem}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity))}.border-zinc-200\/50{border-color:hsla(240,6%,90%,.5)}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-white\/40{background-color:hsla(0,0%,100%,.4)}.bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity))}.bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity))}.bg-zinc-200\/80{background-color:hsla(240,6%,90%,.8)}.bg-zinc-300{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-transparent{--tw-gradient-from:transparent var(--tw-gradient-from-position);--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-white{--tw-gradient-to:#fff var(--tw-gradient-to-position)}.fill-white{fill:#fff}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-24{padding-bottom:6rem}.pb-4{padding-bottom:1rem}.pr-6{padding-right:1.5rem}.pt-6{padding-top:1.5rem}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(47 128 237/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity))}.text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity))}.text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-2xl,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-transparent{--tw-shadow-color:transparent;--tw-shadow:var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-4,.ring-8{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-8{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-zinc-300\/20{--tw-ring-color:hsla(240,5%,84%,.2)}.ring-zinc-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 250 250/var(--tw-ring-opacity))}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px)}.backdrop-blur-sm,.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.\[mask-image\:linear-gradient\(to_bottom\2c white\2c transparent\)\]{-webkit-mask-image:linear-gradient(180deg,#fff,transparent);mask-image:linear-gradient(180deg,#fff,transparent)}.\[mask-image\:linear-gradient\(to_top\2c white\2c transparent\)\]{-webkit-mask-image:linear-gradient(0deg,#fff,transparent);mask-image:linear-gradient(0deg,#fff,transparent)}input:-webkit-autofill,input:-webkit-autofill:focus,input:-webkit-autofill:hover,select:-webkit-autofill,select:-webkit-autofill:focus,select:-webkit-autofill:hover,textarea:-webkit-autofill,textarea:-webkit-autofill:focus,textarea:-webkit-autofill:hover{-webkit-background-clip:text}.focus-within\:border-zinc-300:focus-within{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity))}.hover\:bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity))}.hover\:bg-zinc-200:hover{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity))}.hover\:bg-zinc-200\/80:hover{background-color:hsla(240,6%,90%,.8)}.hover\:bg-zinc-400:hover{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity))}.hover\:text-zinc-950:hover{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity))}.active\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:640px){.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\:inset-8{inset:2rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}} -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/media/05a31a2ca4975f99-s.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vlinx-io/infinite-search/2234a59160edee74a1b39f775a74e300ff3ded17/src/main/resources/static/_next/static/media/05a31a2ca4975f99-s.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/media/513657b02c5c193f-s.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vlinx-io/infinite-search/2234a59160edee74a1b39f775a74e300ff3ded17/src/main/resources/static/_next/static/media/513657b02c5c193f-s.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/media/51ed15f9841b9f9d-s.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vlinx-io/infinite-search/2234a59160edee74a1b39f775a74e300ff3ded17/src/main/resources/static/_next/static/media/51ed15f9841b9f9d-s.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vlinx-io/infinite-search/2234a59160edee74a1b39f775a74e300ff3ded17/src/main/resources/static/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/media/d6b16ce4a6175f26-s.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vlinx-io/infinite-search/2234a59160edee74a1b39f775a74e300ff3ded17/src/main/resources/static/_next/static/media/d6b16ce4a6175f26-s.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/media/ec159349637c90ad-s.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vlinx-io/infinite-search/2234a59160edee74a1b39f775a74e300ff3ded17/src/main/resources/static/_next/static/media/ec159349637c90ad-s.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/_next/static/media/fd4db3eb5472fc27-s.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vlinx-io/infinite-search/2234a59160edee74a1b39f775a74e300ff3ded17/src/main/resources/static/_next/static/media/fd4db3eb5472fc27-s.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/bg.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vlinx-io/infinite-search/2234a59160edee74a1b39f775a74e300ff3ded17/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | Infinite Search
logo
Infinite Search
if you need to know how this project is made
-------------------------------------------------------------------------------- /src/main/resources/static/index.txt: -------------------------------------------------------------------------------- 1 | 2:I[7831,[],""] 2 | 3:I[3249,["931","static/chunks/app/page-2f488ec93b0d782d.js"],""] 3 | 4:I[5613,[],""] 4 | 5:I[1778,[],""] 5 | 0:["30hMvc9DJmbDwwUOsyKJQ",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},["$L1",["$","$L2",null,{"propsForComponent":{"params":{}},"Component":"$3","isStaticGeneration":true}],null]]},[null,["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_e66fe9","children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}]}]}],null]],[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/0ce0d2fa18a9dc25.css","precedence":"next","crossOrigin":""}]],"$L6"]]]] 6 | 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Infinite Search"}],["$","meta","3",{"name":"description","content":"Answer generated by large language models (LLMs). Double check for correctness."}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","meta","5",{"name":"next-size-adjust"}]] 7 | 1:null 8 | -------------------------------------------------------------------------------- /src/main/resources/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vlinx-io/infinite-search/2234a59160edee74a1b39f775a74e300ff3ded17/src/main/resources/static/logo.png -------------------------------------------------------------------------------- /src/main/resources/static/search.html: -------------------------------------------------------------------------------- 1 | Infinite Search -------------------------------------------------------------------------------- /src/main/resources/static/search.txt: -------------------------------------------------------------------------------- 1 | 2:I[7831,[],""] 2 | 3:I[2302,["52","static/chunks/52-55f735e72b5930e8.js","797","static/chunks/app/search/page-5b5448c0ec358638.js"],""] 3 | 4:I[5613,[],""] 4 | 5:I[1778,[],""] 5 | 0:["30hMvc9DJmbDwwUOsyKJQ",[[["",{"children":["search",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["search",{"children":["__PAGE__",{},["$L1",["$","$L2",null,{"propsForComponent":{"params":{}},"Component":"$3","isStaticGeneration":true}],null]]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","search","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}]]},[null,["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_e66fe9","children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}]}]}],null]],[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/0ce0d2fa18a9dc25.css","precedence":"next","crossOrigin":""}]],"$L6"]]]] 6 | 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Infinite Search"}],["$","meta","3",{"name":"description","content":"Answer generated by large language models (LLMs). Double check for correctness."}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","meta","5",{"name":"next-size-adjust"}]] 7 | 1:null 8 | -------------------------------------------------------------------------------- /src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | Infinite Search
Logo
Infinite Search
if you need to know how this project is made
-------------------------------------------------------------------------------- /src/test/kotlin/io/vlinx/infinite/InfiniteApplicationTests.kt: -------------------------------------------------------------------------------- 1 | package io.vlinx.infinite 2 | 3 | import dev.langchain4j.data.message.AiMessage 4 | import dev.langchain4j.model.StreamingResponseHandler 5 | import dev.langchain4j.model.openai.OpenAiStreamingChatModel 6 | import dev.langchain4j.model.output.Response 7 | import io.vlinx.infinite.props.Settings 8 | import io.vlinx.infinite.rag.RAG 9 | import io.vlinx.infinite.search.Google 10 | import okhttp3.internal.wait 11 | import org.junit.jupiter.api.Test 12 | import org.springframework.beans.factory.annotation.Autowired 13 | import org.springframework.boot.test.context.SpringBootTest 14 | import java.io.StringWriter 15 | 16 | 17 | @SpringBootTest 18 | class InfiniteApplicationTests { 19 | 20 | @Autowired 21 | private lateinit var google: Google 22 | 23 | @Autowired 24 | private lateinit var rag: RAG 25 | 26 | @Autowired 27 | private lateinit var settings: Settings 28 | 29 | @Test 30 | fun contextLoads() { 31 | } 32 | 33 | @Test 34 | fun googleSearch() { 35 | val result = google.search("How to protect java code with Protector4J") 36 | println(result) 37 | } 38 | 39 | } 40 | --------------------------------------------------------------------------------