diff --git a/.gitignore b/.gitignore index 246bdb6..c98433c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,6 @@ fileutil/unzip/* fileutil/tempdir/* slice/testdata/* cryptor/*.pem -test \ No newline at end of file +test +docs/node_modules +docs/.vitepress/cache \ No newline at end of file diff --git a/docs/.vitepress/common.ts b/docs/.vitepress/common.ts new file mode 100644 index 0000000..8e5e9e8 --- /dev/null +++ b/docs/.vitepress/common.ts @@ -0,0 +1,89 @@ +import { defineConfig, HeadConfig } from 'vitepress' + +export const META_IMAGE = '/lancet_logo.png' +export const isProduction = process.env.NETLIFY && process.env.CONTEXT === 'production' + +if (process.env.NETLIFY) { + console.log('Netlify build', process.env.CONTEXT) +} + +const productionHead: HeadConfig[] = [ + [ + 'script', + { + src: 'https://unpkg.com/thesemetrics@latest', + async: '', + type: 'text/javascript', + }, + ], +] + +const rControl = /[\u0000-\u001f]/g +const rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g +const rCombining = /[\u0300-\u036F]/g + +/** + * Default slugification function + */ +export const slugify = (str: string): string => + str + .normalize('NFKD') + // Remove accents + .replace(rCombining, '') + // Remove control characters + .replace(rControl, '') + // Replace special characters + .replace(rSpecial, '-') + // ensure it doesn't start with a number + .replace(/^(\d)/, '_$1') + +export const commonConfig = defineConfig({ + title: 'Lancet', + appearance: 'dark', + + markdown: { + theme: { + dark: 'dracula-soft', + light: 'vitesse-light', + }, + + attrs: { + leftDelimiter: '%{', + rightDelimiter: '}%', + }, + + anchor: { + slugify, + }, + }, + + head: [ + // ['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }], + ['link', { rel: 'icon', type: 'image/png', href: '/lancet_logo_mini.png' }], + ['meta', { name: 'theme-color', content: '#5f67ee' }], + ['meta', { name: 'og:type', content: 'website' }], + ['meta', { name: 'og:locale', content: 'zh' }], + + ...(isProduction ? productionHead : []), + ], + + themeConfig: { + logo: { src: '/lancet_logo_mini.png', width: 24, height: 24 }, + outline: [2, 3], + + search: { + provider: 'local', + }, + socialLinks: [ + { + icon: 'github', + link: 'https://github.com/duke-git/lancet', + }, + ], + + footer: { + copyright: 'Copyright © 2023-present Duke Du', + message: 'Released under the MIT License.', + }, + }, +}) diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts new file mode 100644 index 0000000..aad6c3d --- /dev/null +++ b/docs/.vitepress/config.mts @@ -0,0 +1,14 @@ +import { defineConfig } from 'vitepress' +import { commonConfig } from './common' +import { zhConfig } from './zh' +import { enConfig } from './en' + +// https://vitepress.dev/reference/site-config +export default defineConfig({ + ...commonConfig, + + locales: { + root: { label: '简体中文', lang: 'zh-CN', link: '/', ...zhConfig }, + en: { label: 'English', lang: 'en-US', link: '/en/', ...enConfig }, + }, +}) diff --git a/docs/.vitepress/en.ts b/docs/.vitepress/en.ts new file mode 100644 index 0000000..d5c1b1b --- /dev/null +++ b/docs/.vitepress/en.ts @@ -0,0 +1,73 @@ +import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress' + +export const META_URL = 'https://lancet.go.dev' +export const META_TITLE = 'Lancet' +export const META_DESCRIPTION = 'A powerful util function library of Go' + +export const enConfig: LocaleSpecificConfig = { + description: META_DESCRIPTION, + + head: [ + ['meta', { property: 'og:url', content: META_URL }], + ['meta', { property: 'og:description', content: META_DESCRIPTION }], + ['meta', { property: 'twitter:url', content: META_URL }], + ['meta', { property: 'twitter:title', content: META_TITLE }], + ['meta', { property: 'twitter:description', content: META_DESCRIPTION }], + ], + + themeConfig: { + nav: [ + { + text: 'Home', + link: '/en/', + activeMatch: '^/en/', + }, + { + text: 'Guide', + link: '/en/guide/introduction', + activeMatch: '^/en/guide/', + }, + { text: 'API', link: '/en/api/overview', activeMatch: '^/en/api/' }, + { + text: 'Links', + items: [ + { + text: 'Releaselog', + link: 'https://github.com/duke-git/lancet/releases', + }, + ], + }, + ], + + sidebar: { + '/en/': [ + { + text: 'Introduction', + items: [ + { + text: 'What is Lancet?', + link: '/en/guide/introduction', + }, + { + text: 'getting started', + link: '/en/guide/getting_started', + }, + ], + }, + ], + '/en/api/': [ + { + text: 'overview', + items: [{ text: 'overview of API', link: '/en/api/overview' }], + }, + { + text: 'packages', + items: [ + { text: 'algorithm', link: '/en/api/packages/algorithm' }, + { text: 'compare', link: '/en/api/packages/compare' }, + ], + }, + ], + }, + }, +} diff --git a/docs/.vitepress/zh.ts b/docs/.vitepress/zh.ts new file mode 100644 index 0000000..f740d4d --- /dev/null +++ b/docs/.vitepress/zh.ts @@ -0,0 +1,83 @@ +import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress' + +export const META_URL = 'https://lancet.go.dev' +export const META_TITLE = 'Lancet' +export const META_DESCRIPTION = '一个强大的Go语言工具函数库' + +export const zhConfig: LocaleSpecificConfig = { + description: META_DESCRIPTION, + + head: [ + ['meta', { property: 'og:url', content: META_URL }], + ['meta', { property: 'og:description', content: META_DESCRIPTION }], + ['meta', { property: 'twitter:url', content: META_URL }], + ['meta', { property: 'twitter:title', content: META_TITLE }], + ['meta', { property: 'twitter:description', content: META_DESCRIPTION }], + ], + + themeConfig: { + outline: { + label: '本页内容', + }, + + docFooter: { + prev: '上一页', + next: '下一页', + }, + + nav: [ + { + text: '首页', + link: '/', + activeMatch: '^/', + }, + { + text: '指南', + link: '/guide/introduction', + activeMatch: '^/guide/', + }, + { text: 'API', link: '/api/overview', activeMatch: '^/api/' }, + { + text: '相关链接', + items: [ + { + text: '更新日志', + link: 'https://github.com/duke-git/lancet/releases', + }, + ], + }, + ], + + sidebar: { + '/': [ + { + text: '介绍', + items: [ + { + text: 'Lancet是什么?', + link: '/guide/introduction', + }, + { + text: '开始', + link: '/guide/getting_started', + }, + ], + }, + ], + + '/api/': [ + { + text: '概览', + items: [{ text: 'API概述', link: '/api/overview' }], + }, + { + text: 'API文档', + items: [ + { text: '算法', link: '/api/packages/algorithm' }, + { text: '比较器', link: '/api/packages/compare' }, + ], + }, + ], + }, + }, +} diff --git a/docs/api/overview.md b/docs/api/overview.md new file mode 100644 index 0000000..0ee0c0b --- /dev/null +++ b/docs/api/overview.md @@ -0,0 +1,69 @@ +--- +outline: deep +--- + +# API概述 + +lancet(柳叶刀)是一个强大、全面、高效、可复用的go语言工具函数库。包含25个包,超过600个工具函数。功能涵盖字符串处理、切片处理、网络、并发、加解密、文件处理、时间/日期、流处理、迭代器等等。 + + + + +
+

lancet功能模块

+
+
algorithm
+
compare
+
concurrency
+
condition
+
convertor
+
cryptor
+
datastructure
+
datetime
+
fileutil
+
formatter
+
function
+
iterator
+
maputil
+
mathutil
+
netutil
+
pointer
+
random
+
retry
+
slice
+
stream
+
structs
+
strutil
+
system
+
tuple
+
validator
+
xerror
+
+
\ No newline at end of file diff --git a/docs/api/packages/algorithm.md b/docs/api/packages/algorithm.md new file mode 100644 index 0000000..3f3b7de --- /dev/null +++ b/docs/api/packages/algorithm.md @@ -0,0 +1,636 @@ +# Algorithm + +algorithm 算法包实现一些基本算法,sort,search,lrucache。 + +
+ +## 源码 + +- [https://github.com/duke-git/lancet/blob/main/algorithm/sort.go](https://github.com/duke-git/lancet/blob/main/algorithm/sort.go) +- [https://github.com/duke-git/lancet/blob/main/algorithm/search.go](https://github.com/duke-git/lancet/blob/main/algorithm/search.go) +- [https://github.com/duke-git/lancet/blob/main/algorithm/lru_cache.go](https://github.com/duke-git/lancet/blob/main/algorithm/lru_cache.go) + +
+ +## 用法 + +```go +import ( + "github.com/duke-git/lancet/v2/algorithm" +) +``` + +
+ +## 目录 + +- [BubbleSort](#BubbleSort) +- [InsertionSort](#InsertionSort) +- [SelectionSort](#SelectionSort) +- [ShellSort](#ShellSort) +- [QuickSort](#QuickSort) +- [HeapSort](#HeapSort) +- [MergeSort](#MergeSort) +- [CountSort](#CountSort) +- [BinarySearch](#BinarySearch) +- [BinaryIterativeSearch](#BinaryIterativeSearch) +- [LinearSearch](#LinearSearch) +- [LRUCache](#LRUCache) + +
+ +## 文档 + +### BubbleSort + +

冒泡排序,参数comparator需要实现包lancetconstraints.Comparator。

+ +函数签名: + +```go +func BubbleSort[T any](slice []T, comparator lancetconstraints.Comparator) +``` + +示例:[运行](https://go.dev/play/p/GNdv7Jg2Taj) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{2, 1, 5, 3, 6, 4} + comparator := &intComparator{} + + algorithm.BubbleSort(numbers, comparator) + + fmt.Println(numbers) + + // Output: + // [1 2 3 4 5 6] +} +``` + +### InsertionSort + +

插入排序,参数comparator需要实现包lancetconstraints.Comparator。

+ +函数签名: + +```go +func InsertionSort[T any](slice []T, comparator lancetconstraints.Comparator) +``` + +示例:[运行](https://go.dev/play/p/G5LJiWgJJW6) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type people struct { + Name string + Age int +} + +// PeopleAageComparator sort people slice by age field +type peopleAgeComparator struct{} + +// Compare implements github.com/duke-git/lancet/lancetconstraints/constraints.go/Comparator +func (pc *peopleAgeComparator) Compare(v1 any, v2 any) int { + p1, _ := v1.(people) + p2, _ := v2.(people) + + //ascending order + if p1.Age < p2.Age { + return -1 + } else if p1.Age > p2.Age { + return 1 + } + + return 0 +} + +func main() { + peoples := []people{ + {Name: "a", Age: 20}, + {Name: "b", Age: 10}, + {Name: "c", Age: 17}, + {Name: "d", Age: 8}, + {Name: "e", Age: 28}, + } + + comparator := &peopleAgeComparator{} + + algorithm.InsertionSort(peoples, comparator) + + fmt.Println(peoples) + + // Output: + // [{d 8} {b 10} {c 17} {a 20} {e 28}] +} +``` + +### SelectionSort + +

选择排序,参数comparator需要实现包lancetconstraints.Comparator。

+ +函数签名: + +```go +func SelectionSort[T any](slice []T, comparator lancetconstraints.Comparator) +``` + +示例:[运行](https://go.dev/play/p/oXovbkekayS) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{2, 1, 5, 3, 6, 4} + comparator := &intComparator{} + + algorithm.SelectionSort(numbers, comparator) + + fmt.Println(numbers) + + // Output: + // [1 2 3 4 5 6] +} +``` + +### ShellSort + +

希尔排序,参数comparator需要实现包lancetconstraints.Comparator。

+ +函数签名: + +```go +func ShellSort[T any](slice []T, comparator lancetconstraints.Comparator) +``` + +示例:[运行](https://go.dev/play/p/3ibkszpJEu3) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{2, 1, 5, 3, 6, 4} + comparator := &intComparator{} + + algorithm.ShellSort(numbers, comparator) + + fmt.Println(numbers) + + // Output: + // [1 2 3 4 5 6] +} +``` + +### QuickSort + +

快速排序,参数comparator需要实现包lancetconstraints.Comparator。

+ +函数签名: + +```go +func QuickSort[T any](slice []T comparator lancetconstraints.Comparator) +``` + +示例:[运行](https://go.dev/play/p/7Y7c1Elk3ax) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{2, 1, 5, 3, 6, 4} + comparator := &intComparator{} + + algorithm.QuickSort(numbers, comparator) + + fmt.Println(numbers) + + // Output: + // [1 2 3 4 5 6] +} +``` + +### HeapSort + +

堆排序,参数comparator需要实现包lancetconstraints.Comparator。

+ +函数签名: + +```go +func HeapSort[T any](slice []T, comparator lancetconstraints.Comparator) +``` + +示例:[运行](https://go.dev/play/p/u6Iwa1VZS_f) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{2, 1, 5, 3, 6, 4} + comparator := &intComparator{} + + algorithm.HeapSort(numbers, comparator) + + fmt.Println(numbers) + + // Output: + // [1 2 3 4 5 6] +} +``` + +### MergeSort + +

归并排序,参数comparator需要实现包lancetconstraints.Comparator。

+ +函数签名: + +```go +func MergeSort[T any](slice []T, comparator lancetconstraints.Comparator) +``` + +示例:[运行](https://go.dev/play/p/ydinn9YzUJn) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{2, 1, 5, 3, 6, 4} + comparator := &intComparator{} + + algorithm.MergeSort(numbers, comparator) + + fmt.Println(numbers) + + // Output: + // [1 2 3 4 5 6] +} +``` + +### CountSort + +

计数排序,参数comparator需要实现包lancetconstraints.Comparator。

+ +函数签名: + +```go +func CountSort[T any](slice []T, comparator lancetconstraints.Comparator) []T +``` + +示例:[运行](https://go.dev/play/p/tB-Umgm0DrP) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{2, 1, 5, 3, 6, 4} + comparator := &intComparator{} + + sortedNums := algorithm.CountSort(numbers, comparator) + + fmt.Println(sortedNums) + + // Output: + // [1 2 3 4 5 6] +} +``` + +### BinarySearch + +

二分递归查找,返回元素索引,未找到元素返回-1,参数comparator需要实现包lancetconstraints.Comparator。

+ +函数签名: + +```go +func BinarySearch[T any](sortedSlice []T, target T, lowIndex, highIndex int, comparator lancetconstraints.Comparator) int +``` + +示例: [运行](https://go.dev/play/p/t6MeGiUSN47) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{1, 2, 3, 4, 5, 6, 7, 8} + comparator := &intComparator{} + + result1 := algorithm.BinarySearch(numbers, 5, 0, len(numbers)-1, comparator) + result2 := algorithm.BinarySearch(numbers, 9, 0, len(numbers)-1, comparator) + + fmt.Println(result1) + fmt.Println(result2) + + // Output: + // 4 + // -1 +} +``` + +### BinaryIterativeSearch + +

二分迭代查找,返回元素索引,未找到元素返回-1,参数comparator需要实现包lancetconstraints.Comparator。

+ +函数签名: + +```go +func BinaryIterativeSearch[T any](sortedSlice []T, target T, lowIndex, highIndex int, comparator lancetconstraints.Comparator) int +``` + +示例: [运行](https://go.dev/play/p/Anozfr8ZLH3) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{1, 2, 3, 4, 5, 6, 7, 8} + comparator := &intComparator{} + + result1 := algorithm.BinaryIterativeSearch(numbers, 5, 0, len(numbers)-1, comparator) + result2 := algorithm.BinaryIterativeSearch(numbers, 9, 0, len(numbers)-1, comparator) + + fmt.Println(result1) + fmt.Println(result2) + + // Output: + // 4 + // -1 +} +``` + +### LinearSearch + +

基于传入的相等函数线性查找元素,返回元素索引,未找到元素返回-1。

+ +函数签名: + +```go +func LinearSearch[T any](slice []T, target T, equal func(a, b T) bool) int +``` + +示例: [运行](https://go.dev/play/p/IsS7rgn5s3x) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +func main() { + numbers := []int{3, 4, 5, 3, 2, 1} + + equalFunc := func(a, b int) bool { + return a == b + } + + result1 := algorithm.LinearSearch(numbers, 3, equalFunc) + result2 := algorithm.LinearSearch(numbers, 6, equalFunc) + + fmt.Println(result1) + fmt.Println(result2) + + // Output: + // 0 + // -1 +} +``` + +### LRUCache + +

lru算法实现缓存。

+ +函数签名: + +```go +func NewLRUCache[K comparable, V any](capacity int) *LRUCache[K, V] +func (l *LRUCache[K, V]) Get(key K) (V, bool) +func (l *LRUCache[K, V]) Put(key K, value V) +func (l *LRUCache[K, V]) Delete(key K) bool +func (l *LRUCache[K, V]) Len() int +``` + +示例:[运行](https://go.dev/play/p/-EZjgOURufP) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +func main() { + cache := algorithm.NewLRUCache[int, int](2) + + cache.Put(1, 1) + cache.Put(2, 2) + + result1, ok1 := cache.Get(1) + result2, ok2 := cache.Get(2) + result3, ok3 := cache.Get(3) + + fmt.Println(result1, ok1) + fmt.Println(result2, ok2) + fmt.Println(result3, ok3) + + fmt.Println(cache.Len()) + + ok := cache.Delete(2) + fmt.Println(ok) + + + // Output: + // 1 true + // 2 true + // 0 false + // 2 + // true +} +``` diff --git a/docs/api/packages/compare.md b/docs/api/packages/compare.md new file mode 100644 index 0000000..aa15604 --- /dev/null +++ b/docs/api/packages/compare.md @@ -0,0 +1,375 @@ +# Compare + +compare包提供几个轻量级的类型比较函数。 + +
+ +## 源码: + +- [https://github.com/duke-git/lancet/blob/main/compare/compare.go](https://github.com/duke-git/lancet/blob/main/compare/compare.go) + +- [https://github.com/duke-git/lancet/blob/main/compare/compare_internal.go](https://github.com/duke-git/lancet/blob/main/compare/compare_internal.go) + +
+ +## 用法: + +```go +import ( + "github.com/duke-git/lancet/v2/condition" +) +``` + +
+ +## 目录 + +- [Equal](#Equal) +- [EqualValue](#EqualValue) +- [LessThan](#LessThan) +- [GreaterThan](#GreaterThan) +- [LessOrEqual](#LessOrEqual) +- [GreaterOrEqual](#GreaterOrEqual) +- [InDelta](#InDelta) + + +
+ +## 文档 + +### Equal + +

检查两个值是否相等(检查类型和值)

+ +函数签名: + +```go +func Equal(left, right any) bool +``` + +示例: [运行](https://go.dev/play/p/wmVxR-to4lz) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/compare" +) + +func main() { + result1 := compare.Equal(1, 1) + result2 := compare.Equal("1", "1") + result3 := compare.Equal([]int{1, 2, 3}, []int{1, 2, 3}) + result4 := compare.Equal(map[int]string{1: "a", 2: "b"}, map[int]string{1: "a", 2: "b"}) + + result5 := compare.Equal(1, "1") + result6 := compare.Equal(1, int64(1)) + result7 := compare.Equal([]int{1, 2}, []int{1, 2, 3}) + + fmt.Println(result1) + fmt.Println(result2) + fmt.Println(result3) + fmt.Println(result4) + fmt.Println(result5) + fmt.Println(result6) + fmt.Println(result7) + + // Output: + // true + // true + // true + // true + // false + // false + // false +} +``` + +### EqualValue + +

检查两个值是否相等(只检查值)

+ +函数签名: + +```go +func EqualValue(left, right any) bool +``` + +示例: [运行](https://go.dev/play/p/fxnna_LLD9u) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/compare" +) + +func main() { + result1 := compare.EqualValue(1, 1) + result2 := compare.EqualValue(int(1), int64(1)) + result3 := compare.EqualValue(1, "1") + result4 := compare.EqualValue(1, "2") + + fmt.Println(result1) + fmt.Println(result2) + fmt.Println(result3) + fmt.Println(result4) + + // Output: + // true + // true + // true + // false +} +``` + +### LessThan + +

验证参数`left`的值是否小于参数`right`的值。

+ +函数签名: + +```go +func LessThan(left, right any) bool +``` + +示例: [运行](https://go.dev/play/p/cYh7FQQj0ne) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/compare" +) + +func main() { + result1 := compare.LessThan(1, 2) + result2 := compare.LessThan(1.1, 2.2) + result3 := compare.LessThan("a", "b") + + time1 := time.Now() + time2 := time1.Add(time.Second) + result4 := compare.LessThan(time1, time2) + + result5 := compare.LessThan(2, 1) + result6 := compare.LessThan(1, int64(2)) + + fmt.Println(result1) + fmt.Println(result2) + fmt.Println(result3) + fmt.Println(result4) + fmt.Println(result5) + fmt.Println(result6) + + // Output: + // true + // true + // true + // true + // false + // false +} +``` + +### GreaterThan + +

验证参数`left`的值是否大于参数`right`的值。

+ +函数签名: + +```go +func GreaterThan(left, right any) bool +``` + +示例: [运行](https://go.dev/play/p/9-NYDFZmIMp) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/compare" +) + +func main() { + result1 := compare.GreaterThan(2, 1) + result2 := compare.GreaterThan(2.2, 1.1) + result3 := compare.GreaterThan("b", "a") + + time1 := time.Now() + time2 := time1.Add(time.Second) + result4 := compare.GreaterThan(time2, time1) + + result5 := compare.GreaterThan(1, 2) + result6 := compare.GreaterThan(int64(2), 1) + result7 := compare.GreaterThan("b", "c") + + fmt.Println(result1) + fmt.Println(result2) + fmt.Println(result3) + fmt.Println(result4) + fmt.Println(result5) + fmt.Println(result6) + fmt.Println(result7) + + // Output: + // true + // true + // true + // true + // false + // false + // false +} +``` + +### LessOrEqual + +

验证参数`left`的值是否小于或等于参数`right`的值。

+ +函数签名: + +```go +func LessOrEqual(left, right any) bool +``` + +示例: [运行](https://go.dev/play/p/e4T_scwoQzp) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/compare" +) + +func main() { + result1 := compare.LessOrEqual(1, 1) + result2 := compare.LessOrEqual(1.1, 2.2) + result3 := compare.LessOrEqual("a", "b") + + time1 := time.Now() + time2 := time1.Add(time.Second) + result4 := compare.LessOrEqual(time1, time2) + + result5 := compare.LessOrEqual(2, 1) + result6 := compare.LessOrEqual(1, int64(2)) + + fmt.Println(result1) + fmt.Println(result2) + fmt.Println(result3) + fmt.Println(result4) + fmt.Println(result5) + fmt.Println(result6) + + // Output: + // true + // true + // true + // true + // false + // false +} +``` + +### GreaterOrEqual + +

验证参数`left`的值是否大于或参数`right`的值。

+ +函数签名: + +```go +func GreaterOrEqual(left, right any) bool +``` + +示例: [运行](https://go.dev/play/p/vx8mP0U8DFk) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/compare" +) + +func main() { + result1 := compare.GreaterOrEqual(1, 1) + result2 := compare.GreaterOrEqual(2.2, 1.1) + result3 := compare.GreaterOrEqual("b", "b") + + time1 := time.Now() + time2 := time1.Add(time.Second) + result4 := compare.GreaterOrEqual(time2, time1) + + result5 := compare.GreaterOrEqual(1, 2) + result6 := compare.GreaterOrEqual(int64(2), 1) + result7 := compare.GreaterOrEqual("b", "c") + + fmt.Println(result1) + fmt.Println(result2) + fmt.Println(result3) + fmt.Println(result4) + fmt.Println(result5) + fmt.Println(result6) + fmt.Println(result7) + + // Output: + // true + // true + // true + // true + // false + // false + // false +} +``` + +### InDelta + +

检查增量内两个值是否相等。

+ +函数签名: + +```go +func InDelta[T constraints.Integer | constraints.Float](left, right T, delta float64) bool +``` + +示例: [运行](https://go.dev/play/p/TuDdcNtMkjo) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/compare" +) + +func main() { + result1 := InDelta(1, 1, 0) + result2 := InDelta(1, 2, 0) + + result3 := InDelta(2.0/3.0, 0.66667, 0.001) + result4 := InDelta(2.0/3.0, 0.0, 0.001) + + result5 := InDelta(float64(74.96)-float64(20.48), 54.48, 0) + result6 := InDelta(float64(74.96)-float64(20.48), 54.48, 1e-14) + + fmt.Println(result1) + fmt.Println(result2) + fmt.Println(result3) + fmt.Println(result4) + fmt.Println(result5) + fmt.Println(result6) + + // Output: + // true + // false + // true + // false + // false + // true +} +``` diff --git a/docs/en/api/overview.md b/docs/en/api/overview.md new file mode 100644 index 0000000..782f777 --- /dev/null +++ b/docs/en/api/overview.md @@ -0,0 +1,70 @@ +--- +outline: deep +--- + +# API Overview + +Lancet (Lancet) is a powerful, comprehensive, efficient and reusable go language tool function library. Contains 25 packages, more than 600 utility functions. Functions cover string processing, slice processing, network, concurrency, encryption and decryption, file processing, time/date, stream processing, iterators, and more. + + + + +
+

lancet function module

+
+
algorithm
+
compare
+
concurrency
+
condition
+
convertor
+
cryptor
+
datastructure
+
datetime
+
fileutil
+
formatter
+
function
+
iterator
+
maputil
+
mathutil
+
netutil
+
pointer
+
random
+
retry
+
slice
+
stream
+
structs
+
strutil
+
system
+
tuple
+
validator
+
xerror
+
+
+ diff --git a/docs/en/api/packages/algorithm.md b/docs/en/api/packages/algorithm.md new file mode 100644 index 0000000..0a6437b --- /dev/null +++ b/docs/en/api/packages/algorithm.md @@ -0,0 +1,636 @@ +# Algorithm + +Package algorithm implements some basic algorithm. eg. sort, search. + +
+ +## Source + +- [https://github.com/duke-git/lancet/blob/main/algorithm/sort.go](https://github.com/duke-git/lancet/blob/main/algorithm/sort.go) +- [https://github.com/duke-git/lancet/blob/main/algorithm/search.go](https://github.com/duke-git/lancet/blob/main/algorithm/search.go) +- [https://github.com/duke-git/lancet/blob/main/algorithm/lru_cache.go](https://github.com/duke-git/lancet/blob/main/algorithm/lru_cache.go) + +
+ +## Usage + +```go +import ( + "github.com/duke-git/lancet/v2/algorithm" +) +``` + +
+ +## Index + +- [BubbleSort](#BubbleSort) +- [InsertionSort](#InsertionSort) +- [SelectionSort](#SelectionSort) +- [ShellSort](#ShellSort) +- [QuickSort](#QuickSort) +- [HeapSort](#HeapSort) +- [MergeSort](#MergeSort) +- [CountSort](#CountSort) +- [BinarySearch](#BinarySearch) +- [BinaryIterativeSearch](#BinaryIterativeSearch) +- [LinearSearch](#LinearSearch) +- [LRUCache](#LRUCache) + +
+ +## Documentation + +### BubbleSort + +

Sort slice with bubble sort algorithm. Param comparator should implements lancetconstraints.Comparator.

+ +Signature: + +```go +func BubbleSort[T any](slice []T, comparator lancetconstraints.Comparator) +``` + +Example: [Run](https://go.dev/play/p/GNdv7Jg2Taj) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{2, 1, 5, 3, 6, 4} + comparator := &intComparator{} + + algorithm.BubbleSort(numbers, comparator) + + fmt.Println(numbers) + + // Output: + // [1 2 3 4 5 6] +} +``` + +### InsertionSort + +

Sort slice with insertion sort algorithm. Param comparator should implements lancetconstraints.Comparator.

+ +Signature: + +```go +func InsertionSort[T any](slice []T, comparator lancetconstraints.Comparator) +``` + +Example: [Run](https://go.dev/play/p/G5LJiWgJJW6) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type people struct { + Name string + Age int +} + +// PeopleAageComparator sort people slice by age field +type peopleAgeComparator struct{} + +// Compare implements github.com/duke-git/lancet/lancetconstraints/constraints.go/Comparator +func (pc *peopleAgeComparator) Compare(v1 any, v2 any) int { + p1, _ := v1.(people) + p2, _ := v2.(people) + + //ascending order + if p1.Age < p2.Age { + return -1 + } else if p1.Age > p2.Age { + return 1 + } + + return 0 +} + +func main() { + peoples := []people{ + {Name: "a", Age: 20}, + {Name: "b", Age: 10}, + {Name: "c", Age: 17}, + {Name: "d", Age: 8}, + {Name: "e", Age: 28}, + } + + comparator := &peopleAgeComparator{} + + algorithm.InsertionSort(peoples, comparator) + + fmt.Println(peoples) + + // Output: + // [{d 8} {b 10} {c 17} {a 20} {e 28}] +} +``` + +### SelectionSort + +

Sort slice with selection sort algorithm. Param comparator should implements lancetconstraints.Comparator.

+ +Signature: + +```go +func SelectionSort[T any](slice []T, comparator lancetconstraints.Comparator) +``` + +Example: [Run](https://go.dev/play/p/oXovbkekayS) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{2, 1, 5, 3, 6, 4} + comparator := &intComparator{} + + algorithm.SelectionSort(numbers, comparator) + + fmt.Println(numbers) + + // Output: + // [1 2 3 4 5 6] +} +``` + +### ShellSort + +

Sort slice with shell sort algorithm. Param comparator should implements lancetconstraints.Comparator.

+ +Signature: + +```go +func ShellSort[T any](slice []T, comparator lancetconstraints.Comparator) +``` + +Example: [Run](https://go.dev/play/p/3ibkszpJEu3) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{2, 1, 5, 3, 6, 4} + comparator := &intComparator{} + + algorithm.ShellSort(numbers, comparator) + + fmt.Println(numbers) + + // Output: + // [1 2 3 4 5 6] +} +``` + +### QuickSort + +

Sort slice with quick sort algorithm. Param comparator should implements lancetconstraints.Comparator.

+ +Signature: + +```go +func QuickSort[T any](slice []T comparator lancetconstraints.Comparator) +``` + +Example:[Run](https://go.dev/play/p/7Y7c1Elk3ax) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{2, 1, 5, 3, 6, 4} + comparator := &intComparator{} + + algorithm.QuickSort(numbers, comparator) + + fmt.Println(numbers) + + // Output: + // [1 2 3 4 5 6] +} +``` + +### HeapSort + +

Sort slice with heap sort algorithm. Param comparator should implements lancetconstraints.Comparator.

+ +Signature: + +```go +func HeapSort[T any](slice []T, comparator lancetconstraints.Comparator) +``` + +Example: [Run](https://go.dev/play/p/u6Iwa1VZS_f) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{2, 1, 5, 3, 6, 4} + comparator := &intComparator{} + + algorithm.HeapSort(numbers, comparator) + + fmt.Println(numbers) + + // Output: + // [1 2 3 4 5 6] +} +``` + +### MergeSort + +

Sort slice with merge sort algorithm. Param comparator should implements lancetconstraints.Comparator.

+ +Signature: + +```go +func MergeSort[T any](slice []T, comparator lancetconstraints.Comparator) +``` + +Example: [Run](https://go.dev/play/p/ydinn9YzUJn) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{2, 1, 5, 3, 6, 4} + comparator := &intComparator{} + + algorithm.MergeSort(numbers, comparator) + + fmt.Println(numbers) + + // Output: + // [1 2 3 4 5 6] +} +``` + +### CountSort + +

Sort slice with count sort algorithm. Param comparator should implements lancetconstraints.Comparator.

+ +Signature: + +```go +func CountSort[T any](slice []T, comparator lancetconstraints.Comparator) []T +``` + +Example: [Run](https://go.dev/play/p/tB-Umgm0DrP) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{2, 1, 5, 3, 6, 4} + comparator := &intComparator{} + + sortedNums := algorithm.CountSort(numbers, comparator) + + fmt.Println(sortedNums) + + // Output: + // [1 2 3 4 5 6] +} +``` + +### BinarySearch + +

BinarySearch search for target within a sorted slice, recursive call itself. If a target is found, the index of the target is returned. Else the function return -1.

+ +Signature: + +```go +func BinarySearch[T any](sortedSlice []T, target T, lowIndex, highIndex int, comparator lancetconstraints.Comparator) int +``` + +Example: [Run](https://go.dev/play/p/t6MeGiUSN47) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{1, 2, 3, 4, 5, 6, 7, 8} + comparator := &intComparator{} + + result1 := algorithm.BinarySearch(numbers, 5, 0, len(numbers)-1, comparator) + result2 := algorithm.BinarySearch(numbers, 9, 0, len(numbers)-1, comparator) + + fmt.Println(result1) + fmt.Println(result2) + + // Output: + // 4 + // -1 +} +``` + +### BinaryIterativeSearch + +

BinaryIterativeSearch search for target within a sorted slice, recursive call itself. If a target is found, the index of the target is returned. Else the function return -1.

+ +Signature: + +```go +func BinaryIterativeSearch[T any](sortedSlice []T, target T, lowIndex, highIndex int, comparator lancetconstraints.Comparator) int +``` + +Example: [Run](https://go.dev/play/p/Anozfr8ZLH3) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +type intComparator struct{} + +func (c *intComparator) Compare(v1 any, v2 any) int { + val1, _ := v1.(int) + val2, _ := v2.(int) + + //ascending order + if val1 < val2 { + return -1 + } else if val1 > val2 { + return 1 + } + return 0 +} + +func main() { + numbers := []int{1, 2, 3, 4, 5, 6, 7, 8} + comparator := &intComparator{} + + result1 := algorithm.BinaryIterativeSearch(numbers, 5, 0, len(numbers)-1, comparator) + result2 := algorithm.BinaryIterativeSearch(numbers, 9, 0, len(numbers)-1, comparator) + + fmt.Println(result1) + fmt.Println(result2) + + // Output: + // 4 + // -1 +} +``` + +### LinearSearch + +

return the index of target in slice base on equal function.If a target is found, the index of the target is returned. Else the function return -1.

+ +Signature: + +```go +func LinearSearch[T any](slice []T, target T, equal func(a, b T) bool) int +``` + +Example: [Run](https://go.dev/play/p/IsS7rgn5s3x) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +func main() { + numbers := []int{3, 4, 5, 3, 2, 1} + + equalFunc := func(a, b int) bool { + return a == b + } + + result1 := algorithm.LinearSearch(numbers, 3, equalFunc) + result2 := algorithm.LinearSearch(numbers, 6, equalFunc) + + fmt.Println(result1) + fmt.Println(result2) + + // Output: + // 0 + // -1 +} +``` + +### LRUCache + +

LRUCache implements mem cache with lru.

+ +Signature: + +```go +func NewLRUCache[K comparable, V any](capacity int) *LRUCache[K, V] +func (l *LRUCache[K, V]) Get(key K) (V, bool) +func (l *LRUCache[K, V]) Put(key K, value V) +func (l *LRUCache[K, V]) Delete(key K) bool +func (l *LRUCache[K, V]) Len() int +``` + +Example: [Run](https://go.dev/play/p/IsS7rgn5s3x) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/algorithm" +) + +func main() { + cache := algorithm.NewLRUCache[int, int](2) + + cache.Put(1, 1) + cache.Put(2, 2) + + result1, ok1 := cache.Get(1) + result2, ok2 := cache.Get(2) + result3, ok3 := cache.Get(3) + + fmt.Println(result1, ok1) + fmt.Println(result2, ok2) + fmt.Println(result3, ok3) + + fmt.Println(cache.Len()) + + ok := cache.Delete(2) + fmt.Println(ok) + + + // Output: + // 1 true + // 2 true + // 0 false + // 2 + // true +} +``` diff --git a/docs/en/api/packages/compare.md b/docs/en/api/packages/compare.md new file mode 100644 index 0000000..026e008 --- /dev/null +++ b/docs/en/api/packages/compare.md @@ -0,0 +1,374 @@ +# Compare + +Package compare provides a lightweight comparison function on any type. + +
+ +## Source: + +- [https://github.com/duke-git/lancet/blob/main/compare/compare.go](https://github.com/duke-git/lancet/blob/main/compare/compare.go) + +- [https://github.com/duke-git/lancet/blob/main/compare/compare_internal.go](https://github.com/duke-git/lancet/blob/main/compare/compare_internal.go) + +
+ +## Usage: + +```go +import ( + "github.com/duke-git/lancet/v2/condition" +) +``` + +
+ +## Index + +- [Equal](#Equal) +- [EqualValue](#EqualValue) +- [LessThan](#LessThan) +- [GreaterThan](#GreaterThan) +- [LessOrEqual](#LessOrEqual) +- [GreaterOrEqual](#GreaterOrEqual) +- [InDelta](#InDelta) + +
+ +## Documentation + +### Equal + +

Checks if two values are equal or not. (check both type and value)

+ +Signature: [Run](https://go.dev/play/p/wmVxR-to4lz) + +```go +func Equal(left, right any) bool +``` + +Example: + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/compare" +) + +func main() { + result1 := compare.Equal(1, 1) + result2 := compare.Equal("1", "1") + result3 := compare.Equal([]int{1, 2, 3}, []int{1, 2, 3}) + result4 := compare.Equal(map[int]string{1: "a", 2: "b"}, map[int]string{1: "a", 2: "b"}) + + result5 := compare.Equal(1, "1") + result6 := compare.Equal(1, int64(1)) + result7 := compare.Equal([]int{1, 2}, []int{1, 2, 3}) + + fmt.Println(result1) + fmt.Println(result2) + fmt.Println(result3) + fmt.Println(result4) + fmt.Println(result5) + fmt.Println(result6) + fmt.Println(result7) + + // Output: + // true + // true + // true + // true + // false + // false + // false +} +``` + +### EqualValue + +

Checks if two values are equal or not. (check value only)

+ +Signature: [Run](https://go.dev/play/p/fxnna_LLD9u) + +```go +func EqualValue(left, right any) bool +``` + +Example: + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/compare" +) + +func main() { + result1 := compare.EqualValue(1, 1) + result2 := compare.EqualValue(int(1), int64(1)) + result3 := compare.EqualValue(1, "1") + result4 := compare.EqualValue(1, "2") + + fmt.Println(result1) + fmt.Println(result2) + fmt.Println(result3) + fmt.Println(result4) + + // Output: + // true + // true + // true + // false +} +``` + +### LessThan + +

Checks if value `left` less than value `right`.

+ +Signature: [Run](https://go.dev/play/p/cYh7FQQj0ne) + +```go +func LessThan(left, right any) bool +``` + +Example: + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/compare" +) + +func main() { + result1 := compare.LessThan(1, 2) + result2 := compare.LessThan(1.1, 2.2) + result3 := compare.LessThan("a", "b") + + time1 := time.Now() + time2 := time1.Add(time.Second) + result4 := compare.LessThan(time1, time2) + + result5 := compare.LessThan(2, 1) + result6 := compare.LessThan(1, int64(2)) + + fmt.Println(result1) + fmt.Println(result2) + fmt.Println(result3) + fmt.Println(result4) + fmt.Println(result5) + fmt.Println(result6) + + // Output: + // true + // true + // true + // true + // false + // false +} +``` + +### GreaterThan + +

Checks if value `left` greater than value `right`.

+ +Signature: + +```go +func GreaterThan(left, right any) bool +``` + +Example: [Run](https://go.dev/play/p/9-NYDFZmIMp) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/compare" +) + +func main() { + result1 := compare.GreaterThan(2, 1) + result2 := compare.GreaterThan(2.2, 1.1) + result3 := compare.GreaterThan("b", "a") + + time1 := time.Now() + time2 := time1.Add(time.Second) + result4 := compare.GreaterThan(time2, time1) + + result5 := compare.GreaterThan(1, 2) + result6 := compare.GreaterThan(int64(2), 1) + result7 := compare.GreaterThan("b", "c") + + fmt.Println(result1) + fmt.Println(result2) + fmt.Println(result3) + fmt.Println(result4) + fmt.Println(result5) + fmt.Println(result6) + fmt.Println(result7) + + // Output: + // true + // true + // true + // true + // false + // false + // false +} +``` + +### LessOrEqual + +

Checks if value `left` less than or equal than value `right`.

+ +Signature: + +```go +func LessOrEqual(left, right any) bool +``` + +Example: [Run](https://go.dev/play/p/e4T_scwoQzp) + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/compare" +) + +func main() { + result1 := compare.LessOrEqual(1, 1) + result2 := compare.LessOrEqual(1.1, 2.2) + result3 := compare.LessOrEqual("a", "b") + + time1 := time.Now() + time2 := time1.Add(time.Second) + result4 := compare.LessOrEqual(time1, time2) + + result5 := compare.LessOrEqual(2, 1) + result6 := compare.LessOrEqual(1, int64(2)) + + fmt.Println(result1) + fmt.Println(result2) + fmt.Println(result3) + fmt.Println(result4) + fmt.Println(result5) + fmt.Println(result6) + + // Output: + // true + // true + // true + // true + // false + // false +} +``` + +### GreaterOrEqual + +

Checks if value `left` less greater or equal than value `right`.

+ +Signature: [Run](https://go.dev/play/p/vx8mP0U8DFk) + +```go +func GreaterOrEqual(left, right any) bool +``` + +Example: + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/compare" +) + +func main() { + result1 := compare.GreaterOrEqual(1, 1) + result2 := compare.GreaterOrEqual(2.2, 1.1) + result3 := compare.GreaterOrEqual("b", "b") + + time1 := time.Now() + time2 := time1.Add(time.Second) + result4 := compare.GreaterOrEqual(time2, time1) + + result5 := compare.GreaterOrEqual(1, 2) + result6 := compare.GreaterOrEqual(int64(2), 1) + result7 := compare.GreaterOrEqual("b", "c") + + fmt.Println(result1) + fmt.Println(result2) + fmt.Println(result3) + fmt.Println(result4) + fmt.Println(result5) + fmt.Println(result6) + fmt.Println(result7) + + // Output: + // true + // true + // true + // true + // false + // false + // false +} +``` + +### InDelta + +

Checks if two values are equal or not within a delta.

+ +Signature: [Run](https://go.dev/play/p/TuDdcNtMkjo) + +```go +func InDelta[T constraints.Integer | constraints.Float](left, right T, delta float64) bool +``` + +Example: + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/compare" +) + +func main() { + result1 := InDelta(1, 1, 0) + result2 := InDelta(1, 2, 0) + + result3 := InDelta(2.0/3.0, 0.66667, 0.001) + result4 := InDelta(2.0/3.0, 0.0, 0.001) + + result5 := InDelta(float64(74.96)-float64(20.48), 54.48, 0) + result6 := InDelta(float64(74.96)-float64(20.48), 54.48, 1e-14) + + fmt.Println(result1) + fmt.Println(result2) + fmt.Println(result3) + fmt.Println(result4) + fmt.Println(result5) + fmt.Println(result6) + + // Output: + // true + // false + // true + // false + // false + // true +} +``` diff --git a/docs/en/guide/getting_started.md b/docs/en/guide/getting_started.md new file mode 100644 index 0000000..bdd0c72 --- /dev/null +++ b/docs/en/guide/getting_started.md @@ -0,0 +1,50 @@ +--- +outline: deep +--- + +# Installation + +1. For users who use go1.18 and above, it is recommended to install lancet v2.x.x. Cause in v2.x.x all functions was rewriten with generics of go1.18. + +```go +go get github.com/duke-git/lancet/v2 // will install latest version of v2.x.x +``` + +2. For users who use version below go1.18, you should install v1.x.x. The latest of v1.x.x is v1.4.1. + +```go +go get github.com/duke-git/lancet // below go1.18, install latest version of v1.x.x +``` + + +## Usage + +Lancet organizes the code into package structure, and you need to import the corresponding package name when use it. For example, if you use string-related functions, just import the strutil package like below: + +```go +import "github.com/duke-git/lancet/v2/strutil" +``` + +## Example + +Here takes the string function `Reverse` (reverse order string) as an example, and the strutil package needs to be imported. + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/strutil" +) + +func main() { + s := "hello" + rs := strutil.Reverse(s) + fmt.Println(rs) //olleh +} +``` + + +## More + +Check out the [APIs]([API](https://lancet.go.dev/api/overview.html)) for details. diff --git a/docs/en/guide/introduction.md b/docs/en/guide/introduction.md new file mode 100644 index 0000000..b82e12a --- /dev/null +++ b/docs/en/guide/introduction.md @@ -0,0 +1,18 @@ +--- +outline: deep +--- + +# What is lancet? + +Lancet is a powerful, efficient, and reusable util function library of go. Inspired by the java apache common package and lodash.js. + + +## Why lancet? + +Lancet makes Go dev easier by taking the hassle out of working with concurrency, net, math, slice, string, etc. +Lancet's utility methods are great for: + +- Iterating slice and array. +- Manipulating strings. +- Work with net and http. +- Other tools, eg. random, crypto, stream, retry, etc. diff --git a/docs/en/index.md b/docs/en/index.md new file mode 100644 index 0000000..02b603e --- /dev/null +++ b/docs/en/index.md @@ -0,0 +1,36 @@ +--- +# https://vitepress.dev/reference/default-theme-home-page +layout: home + +hero: + name: "Lancet" + text: "A powerful util function library of Go" + tagline: Simple, powerful, and efficient. + actions: + - theme: brand + text: Get Started + link: /en/guide/getting_started + - theme: alt + text: View on GitHub + link: https://github.com/duke-git/lancet + # - theme: alt + # text: API Examples + # link: /api-examples + image: + src: /lancet_logo.png + alt: lancet + +features: + - title: Powerful + icon: 💪 + details: support 600+ go util functions. eg. string, slice, datetime, net, crypto, concurrency... + - title: Modular by design + icon: 🏗 + details: Each module is designed as a package with no coupling between modules. + - title: Pure + icon: 💅 + details: Only depends on two kinds of libraries, go standard library and golang.org/x. + - title: Simple + icon: 👏 + details: Well structure, test for every exported function. +--- diff --git a/docs/guide/getting_started.md b/docs/guide/getting_started.md new file mode 100644 index 0000000..8d64812 --- /dev/null +++ b/docs/guide/getting_started.md @@ -0,0 +1,48 @@ +--- +outline: deep +--- + +# 安装 + +1. 使用 go1.18 及以上版本的用户,建议安装 v2.x.x。 因为 v2.x.x 应用 go1.18 的泛型重写了大部分函数。 + +```go +go get github.com/duke-git/lancet/v2 // will install latest version of v2.x.x +``` + +2. 使用 go1.18 以下版本的用户,必须安装 v1.x.x。目前最新的 v1 版本是 v1.4.1。 + +```go +go get github.com/duke-git/lancet // below go1.18, install latest version of v1.x.x +``` + +## 用法 + +lancet 是以包的结构组织代码的,使用时需要导入相应的包名。例如:如果使用字符串相关函数,需要导入 strutil 包: + +```go +import "github.com/duke-git/lancet/v2/strutil" +``` + +## 示例 + +此处以字符串工具函数 Reverse(逆序字符串)为例,需要导入 strutil 包: + +```go +package main + +import ( + "fmt" + "github.com/duke-git/lancet/v2/strutil" +) + +func main() { + s := "hello" + rs := strutil.Reverse(s) + fmt.Println(rs) //olleh +} +``` + +## More + +其他特性请参考[API](https://lancet.go.dev/api/overview.html). diff --git a/docs/guide/introduction.md b/docs/guide/introduction.md new file mode 100644 index 0000000..26f931f --- /dev/null +++ b/docs/guide/introduction.md @@ -0,0 +1,18 @@ +--- +outline: deep +--- + +# lancet是什么? + +lancet(柳叶刀)是一个强大、全面、高效、可复用的go语言工具函数库。lancet受到了java apache common包和lodash.js的启发。 + + +## 为什么选择lancet? + +Lancet 消除了处理并发、网络、数学、切片、字符串等的麻烦,使 Go 开发变得更容易。 +Lancet 的实用方法非常适合: + +- 迭代切片和数组。 +- 操作字符串。 +- 处理网络和http请求。 +- 其他工具,例如。 随机、加密、流、重试等。 diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..ecbedb8 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,45 @@ +--- +# https://vitepress.dev/reference/default-theme-home-page +layout: home + +hero: + name: 'Lancet' + text: '一个强大的Go语言工具函数库' + tagline: '简洁, 强大, 高效' + actions: + - theme: brand + text: 开始使用 + link: /guide/getting_started + - theme: alt + text: 在GitHub中查看 + link: https://github.com/duke-git/lancet + + image: + src: /lancet_logo.png + alt: lancet + +features: + - title: 全面 + icon: 💪 + details: 特性丰富,支持600+ go util函数。字符串、切片、日期时间、网络、加密、并发... + - title: 模块化设计 + icon: 🏗 + details: 每个模块设计成一个包,模块之间无耦合。 + - title: 纯净 + icon: 💅 + details: 只依赖go标准库和golang.org/x。 + - title: 简洁 + icon: 👏 + details: 结构良好,测试每个导出的函数。 +--- + +

+ + + + + + +

diff --git a/docs/lancet_logo.png b/docs/lancet_logo.png new file mode 100644 index 0000000..481f890 Binary files /dev/null and b/docs/lancet_logo.png differ diff --git a/docs/lancet_logo_mini.png b/docs/lancet_logo_mini.png new file mode 100644 index 0000000..9c20d1d Binary files /dev/null and b/docs/lancet_logo_mini.png differ diff --git a/docs/algorithm.md b/docs/olddocs/algorithm.md similarity index 100% rename from docs/algorithm.md rename to docs/olddocs/algorithm.md diff --git a/docs/algorithm_zh-CN.md b/docs/olddocs/algorithm_zh-CN.md similarity index 100% rename from docs/algorithm_zh-CN.md rename to docs/olddocs/algorithm_zh-CN.md diff --git a/docs/compare.md b/docs/olddocs/compare.md similarity index 100% rename from docs/compare.md rename to docs/olddocs/compare.md diff --git a/docs/compare_zh-CN.md b/docs/olddocs/compare_zh-CN.md similarity index 100% rename from docs/compare_zh-CN.md rename to docs/olddocs/compare_zh-CN.md diff --git a/docs/concurrency.md b/docs/olddocs/concurrency.md similarity index 100% rename from docs/concurrency.md rename to docs/olddocs/concurrency.md diff --git a/docs/concurrency_zh-CN.md b/docs/olddocs/concurrency_zh-CN.md similarity index 100% rename from docs/concurrency_zh-CN.md rename to docs/olddocs/concurrency_zh-CN.md diff --git a/docs/condition.md b/docs/olddocs/condition.md similarity index 100% rename from docs/condition.md rename to docs/olddocs/condition.md diff --git a/docs/condition_zh-CN.md b/docs/olddocs/condition_zh-CN.md similarity index 100% rename from docs/condition_zh-CN.md rename to docs/olddocs/condition_zh-CN.md diff --git a/docs/convertor.md b/docs/olddocs/convertor.md similarity index 100% rename from docs/convertor.md rename to docs/olddocs/convertor.md diff --git a/docs/convertor_zh-CN.md b/docs/olddocs/convertor_zh-CN.md similarity index 100% rename from docs/convertor_zh-CN.md rename to docs/olddocs/convertor_zh-CN.md diff --git a/docs/cryptor.md b/docs/olddocs/cryptor.md similarity index 100% rename from docs/cryptor.md rename to docs/olddocs/cryptor.md diff --git a/docs/cryptor_zh-CN.md b/docs/olddocs/cryptor_zh-CN.md similarity index 100% rename from docs/cryptor_zh-CN.md rename to docs/olddocs/cryptor_zh-CN.md diff --git a/docs/datastructure/copyonwritelist.md b/docs/olddocs/datastructure/copyonwritelist.md similarity index 100% rename from docs/datastructure/copyonwritelist.md rename to docs/olddocs/datastructure/copyonwritelist.md diff --git a/docs/datastructure/copyonwritelist_zh-CN.md b/docs/olddocs/datastructure/copyonwritelist_zh-CN.md similarity index 100% rename from docs/datastructure/copyonwritelist_zh-CN.md rename to docs/olddocs/datastructure/copyonwritelist_zh-CN.md diff --git a/docs/datastructure/hashmap.md b/docs/olddocs/datastructure/hashmap.md similarity index 100% rename from docs/datastructure/hashmap.md rename to docs/olddocs/datastructure/hashmap.md diff --git a/docs/datastructure/hashmap_zh-CN.md b/docs/olddocs/datastructure/hashmap_zh-CN.md similarity index 100% rename from docs/datastructure/hashmap_zh-CN.md rename to docs/olddocs/datastructure/hashmap_zh-CN.md diff --git a/docs/datastructure/heap.md b/docs/olddocs/datastructure/heap.md similarity index 100% rename from docs/datastructure/heap.md rename to docs/olddocs/datastructure/heap.md diff --git a/docs/datastructure/heap_zh-CN.md b/docs/olddocs/datastructure/heap_zh-CN.md similarity index 100% rename from docs/datastructure/heap_zh-CN.md rename to docs/olddocs/datastructure/heap_zh-CN.md diff --git a/docs/datastructure/link.md b/docs/olddocs/datastructure/link.md similarity index 100% rename from docs/datastructure/link.md rename to docs/olddocs/datastructure/link.md diff --git a/docs/datastructure/link_zh-CN.md b/docs/olddocs/datastructure/link_zh-CN.md similarity index 100% rename from docs/datastructure/link_zh-CN.md rename to docs/olddocs/datastructure/link_zh-CN.md diff --git a/docs/datastructure/list.md b/docs/olddocs/datastructure/list.md similarity index 100% rename from docs/datastructure/list.md rename to docs/olddocs/datastructure/list.md diff --git a/docs/datastructure/list_zh-CN.md b/docs/olddocs/datastructure/list_zh-CN.md similarity index 100% rename from docs/datastructure/list_zh-CN.md rename to docs/olddocs/datastructure/list_zh-CN.md diff --git a/docs/datastructure/queue.md b/docs/olddocs/datastructure/queue.md similarity index 100% rename from docs/datastructure/queue.md rename to docs/olddocs/datastructure/queue.md diff --git a/docs/datastructure/queue_zh-CN.md b/docs/olddocs/datastructure/queue_zh-CN.md similarity index 100% rename from docs/datastructure/queue_zh-CN.md rename to docs/olddocs/datastructure/queue_zh-CN.md diff --git a/docs/datastructure/set.md b/docs/olddocs/datastructure/set.md similarity index 100% rename from docs/datastructure/set.md rename to docs/olddocs/datastructure/set.md diff --git a/docs/datastructure/set_zh-CN.md b/docs/olddocs/datastructure/set_zh-CN.md similarity index 100% rename from docs/datastructure/set_zh-CN.md rename to docs/olddocs/datastructure/set_zh-CN.md diff --git a/docs/datastructure/stack.md b/docs/olddocs/datastructure/stack.md similarity index 100% rename from docs/datastructure/stack.md rename to docs/olddocs/datastructure/stack.md diff --git a/docs/datastructure/stack_zh-CN.md b/docs/olddocs/datastructure/stack_zh-CN.md similarity index 100% rename from docs/datastructure/stack_zh-CN.md rename to docs/olddocs/datastructure/stack_zh-CN.md diff --git a/docs/datastructure/tree.md b/docs/olddocs/datastructure/tree.md similarity index 100% rename from docs/datastructure/tree.md rename to docs/olddocs/datastructure/tree.md diff --git a/docs/datastructure/tree_zh-CN.md b/docs/olddocs/datastructure/tree_zh-CN.md similarity index 100% rename from docs/datastructure/tree_zh-CN.md rename to docs/olddocs/datastructure/tree_zh-CN.md diff --git a/docs/datetime.md b/docs/olddocs/datetime.md similarity index 100% rename from docs/datetime.md rename to docs/olddocs/datetime.md diff --git a/docs/datetime_zh-CN.md b/docs/olddocs/datetime_zh-CN.md similarity index 100% rename from docs/datetime_zh-CN.md rename to docs/olddocs/datetime_zh-CN.md diff --git a/docs/fileutil.md b/docs/olddocs/fileutil.md similarity index 100% rename from docs/fileutil.md rename to docs/olddocs/fileutil.md diff --git a/docs/fileutil_zh-CN.md b/docs/olddocs/fileutil_zh-CN.md similarity index 100% rename from docs/fileutil_zh-CN.md rename to docs/olddocs/fileutil_zh-CN.md diff --git a/docs/formatter.md b/docs/olddocs/formatter.md similarity index 100% rename from docs/formatter.md rename to docs/olddocs/formatter.md diff --git a/docs/formatter_zh-CN.md b/docs/olddocs/formatter_zh-CN.md similarity index 100% rename from docs/formatter_zh-CN.md rename to docs/olddocs/formatter_zh-CN.md diff --git a/docs/function.md b/docs/olddocs/function.md similarity index 100% rename from docs/function.md rename to docs/olddocs/function.md diff --git a/docs/function_zh-CN.md b/docs/olddocs/function_zh-CN.md similarity index 100% rename from docs/function_zh-CN.md rename to docs/olddocs/function_zh-CN.md diff --git a/docs/maputil.md b/docs/olddocs/maputil.md similarity index 100% rename from docs/maputil.md rename to docs/olddocs/maputil.md diff --git a/docs/maputil_zh-CN.md b/docs/olddocs/maputil_zh-CN.md similarity index 100% rename from docs/maputil_zh-CN.md rename to docs/olddocs/maputil_zh-CN.md diff --git a/docs/mathutil.md b/docs/olddocs/mathutil.md similarity index 100% rename from docs/mathutil.md rename to docs/olddocs/mathutil.md diff --git a/docs/mathutil_zh-CN.md b/docs/olddocs/mathutil_zh-CN.md similarity index 100% rename from docs/mathutil_zh-CN.md rename to docs/olddocs/mathutil_zh-CN.md diff --git a/docs/netutil.md b/docs/olddocs/netutil.md similarity index 100% rename from docs/netutil.md rename to docs/olddocs/netutil.md diff --git a/docs/netutil_zh-CN.md b/docs/olddocs/netutil_zh-CN.md similarity index 100% rename from docs/netutil_zh-CN.md rename to docs/olddocs/netutil_zh-CN.md diff --git a/docs/pointer.md b/docs/olddocs/pointer.md similarity index 100% rename from docs/pointer.md rename to docs/olddocs/pointer.md diff --git a/docs/pointer_zh-CN.md b/docs/olddocs/pointer_zh-CN.md similarity index 100% rename from docs/pointer_zh-CN.md rename to docs/olddocs/pointer_zh-CN.md diff --git a/docs/random.md b/docs/olddocs/random.md similarity index 100% rename from docs/random.md rename to docs/olddocs/random.md diff --git a/docs/random_zh-CN.md b/docs/olddocs/random_zh-CN.md similarity index 100% rename from docs/random_zh-CN.md rename to docs/olddocs/random_zh-CN.md diff --git a/docs/retry.md b/docs/olddocs/retry.md similarity index 100% rename from docs/retry.md rename to docs/olddocs/retry.md diff --git a/docs/retry_zh-CN.md b/docs/olddocs/retry_zh-CN.md similarity index 100% rename from docs/retry_zh-CN.md rename to docs/olddocs/retry_zh-CN.md diff --git a/docs/slice.md b/docs/olddocs/slice.md similarity index 100% rename from docs/slice.md rename to docs/olddocs/slice.md diff --git a/docs/slice_zh-CN.md b/docs/olddocs/slice_zh-CN.md similarity index 100% rename from docs/slice_zh-CN.md rename to docs/olddocs/slice_zh-CN.md diff --git a/docs/stream.md b/docs/olddocs/stream.md similarity index 100% rename from docs/stream.md rename to docs/olddocs/stream.md diff --git a/docs/stream_zh-CN.md b/docs/olddocs/stream_zh-CN.md similarity index 100% rename from docs/stream_zh-CN.md rename to docs/olddocs/stream_zh-CN.md diff --git a/docs/structs/field.md b/docs/olddocs/structs/field.md similarity index 100% rename from docs/structs/field.md rename to docs/olddocs/structs/field.md diff --git a/docs/structs/field_zh-CN.md b/docs/olddocs/structs/field_zh-CN.md similarity index 100% rename from docs/structs/field_zh-CN.md rename to docs/olddocs/structs/field_zh-CN.md diff --git a/docs/structs/struct.md b/docs/olddocs/structs/struct.md similarity index 100% rename from docs/structs/struct.md rename to docs/olddocs/structs/struct.md diff --git a/docs/structs/struct_zh-CN.md b/docs/olddocs/structs/struct_zh-CN.md similarity index 100% rename from docs/structs/struct_zh-CN.md rename to docs/olddocs/structs/struct_zh-CN.md diff --git a/docs/strutil.md b/docs/olddocs/strutil.md similarity index 100% rename from docs/strutil.md rename to docs/olddocs/strutil.md diff --git a/docs/strutil_zh-CN.md b/docs/olddocs/strutil_zh-CN.md similarity index 100% rename from docs/strutil_zh-CN.md rename to docs/olddocs/strutil_zh-CN.md diff --git a/docs/system.md b/docs/olddocs/system.md similarity index 100% rename from docs/system.md rename to docs/olddocs/system.md diff --git a/docs/system_zh-CN.md b/docs/olddocs/system_zh-CN.md similarity index 100% rename from docs/system_zh-CN.md rename to docs/olddocs/system_zh-CN.md diff --git a/docs/tuple.md b/docs/olddocs/tuple.md similarity index 100% rename from docs/tuple.md rename to docs/olddocs/tuple.md diff --git a/docs/tuple_zh-CN.md b/docs/olddocs/tuple_zh-CN.md similarity index 100% rename from docs/tuple_zh-CN.md rename to docs/olddocs/tuple_zh-CN.md diff --git a/docs/validator.md b/docs/olddocs/validator.md similarity index 100% rename from docs/validator.md rename to docs/olddocs/validator.md diff --git a/docs/validator_zh-CN.md b/docs/olddocs/validator_zh-CN.md similarity index 100% rename from docs/validator_zh-CN.md rename to docs/olddocs/validator_zh-CN.md diff --git a/docs/xerror.md b/docs/olddocs/xerror.md similarity index 100% rename from docs/xerror.md rename to docs/olddocs/xerror.md diff --git a/docs/xerror_zh-CN.md b/docs/olddocs/xerror_zh-CN.md similarity index 100% rename from docs/xerror_zh-CN.md rename to docs/olddocs/xerror_zh-CN.md diff --git a/docs/package-lock.json b/docs/package-lock.json new file mode 100644 index 0000000..854cba2 --- /dev/null +++ b/docs/package-lock.json @@ -0,0 +1,1277 @@ +{ + "name": "lancet-docs", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "lancet-docs", + "devDependencies": { + "vitepress": "^1.0.0-rc.4" + } + }, + "node_modules/@algolia/autocomplete-core": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", + "integrity": "sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-plugin-algolia-insights": "1.9.3", + "@algolia/autocomplete-shared": "1.9.3" + } + }, + "node_modules/@algolia/autocomplete-plugin-algolia-insights": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz", + "integrity": "sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-shared": "1.9.3" + }, + "peerDependencies": { + "search-insights": ">= 1 < 3" + } + }, + "node_modules/@algolia/autocomplete-preset-algolia": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.3.tgz", + "integrity": "sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-shared": "1.9.3" + }, + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } + }, + "node_modules/@algolia/autocomplete-shared": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz", + "integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==", + "dev": true, + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } + }, + "node_modules/@algolia/cache-browser-local-storage": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.19.1.tgz", + "integrity": "sha512-FYAZWcGsFTTaSAwj9Std8UML3Bu8dyWDncM7Ls8g+58UOe4XYdlgzXWbrIgjaguP63pCCbMoExKr61B+ztK3tw==", + "dev": true, + "dependencies": { + "@algolia/cache-common": "4.19.1" + } + }, + "node_modules/@algolia/cache-common": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.19.1.tgz", + "integrity": "sha512-XGghi3l0qA38HiqdoUY+wvGyBsGvKZ6U3vTiMBT4hArhP3fOGLXpIINgMiiGjTe4FVlTa5a/7Zf2bwlIHfRqqg==", + "dev": true + }, + "node_modules/@algolia/cache-in-memory": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.19.1.tgz", + "integrity": "sha512-+PDWL+XALGvIginigzu8oU6eWw+o76Z8zHbBovWYcrtWOEtinbl7a7UTt3x3lthv+wNuFr/YD1Gf+B+A9V8n5w==", + "dev": true, + "dependencies": { + "@algolia/cache-common": "4.19.1" + } + }, + "node_modules/@algolia/client-account": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.19.1.tgz", + "integrity": "sha512-Oy0ritA2k7AMxQ2JwNpfaEcgXEDgeyKu0V7E7xt/ZJRdXfEpZcwp9TOg4TJHC7Ia62gIeT2Y/ynzsxccPw92GA==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.19.1", + "@algolia/client-search": "4.19.1", + "@algolia/transporter": "4.19.1" + } + }, + "node_modules/@algolia/client-analytics": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.19.1.tgz", + "integrity": "sha512-5QCq2zmgdZLIQhHqwl55ZvKVpLM3DNWjFI4T+bHr3rGu23ew2bLO4YtyxaZeChmDb85jUdPDouDlCumGfk6wOg==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.19.1", + "@algolia/client-search": "4.19.1", + "@algolia/requester-common": "4.19.1", + "@algolia/transporter": "4.19.1" + } + }, + "node_modules/@algolia/client-common": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.19.1.tgz", + "integrity": "sha512-3kAIVqTcPrjfS389KQvKzliC559x+BDRxtWamVJt8IVp7LGnjq+aVAXg4Xogkur1MUrScTZ59/AaUd5EdpyXgA==", + "dev": true, + "dependencies": { + "@algolia/requester-common": "4.19.1", + "@algolia/transporter": "4.19.1" + } + }, + "node_modules/@algolia/client-personalization": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.19.1.tgz", + "integrity": "sha512-8CWz4/H5FA+krm9HMw2HUQenizC/DxUtsI5oYC0Jxxyce1vsr8cb1aEiSJArQT6IzMynrERif1RVWLac1m36xw==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.19.1", + "@algolia/requester-common": "4.19.1", + "@algolia/transporter": "4.19.1" + } + }, + "node_modules/@algolia/client-search": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.19.1.tgz", + "integrity": "sha512-mBecfMFS4N+yK/p0ZbK53vrZbL6OtWMk8YmnOv1i0LXx4pelY8TFhqKoTit3NPVPwoSNN0vdSN9dTu1xr1XOVw==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.19.1", + "@algolia/requester-common": "4.19.1", + "@algolia/transporter": "4.19.1" + } + }, + "node_modules/@algolia/logger-common": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.19.1.tgz", + "integrity": "sha512-i6pLPZW/+/YXKis8gpmSiNk1lOmYCmRI6+x6d2Qk1OdfvX051nRVdalRbEcVTpSQX6FQAoyeaui0cUfLYW5Elw==", + "dev": true + }, + "node_modules/@algolia/logger-console": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.19.1.tgz", + "integrity": "sha512-jj72k9GKb9W0c7TyC3cuZtTr0CngLBLmc8trzZlXdfvQiigpUdvTi1KoWIb2ZMcRBG7Tl8hSb81zEY3zI2RlXg==", + "dev": true, + "dependencies": { + "@algolia/logger-common": "4.19.1" + } + }, + "node_modules/@algolia/requester-browser-xhr": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.19.1.tgz", + "integrity": "sha512-09K/+t7lptsweRTueHnSnmPqIxbHMowejAkn9XIcJMLdseS3zl8ObnS5GWea86mu3vy4+8H+ZBKkUN82Zsq/zg==", + "dev": true, + "dependencies": { + "@algolia/requester-common": "4.19.1" + } + }, + "node_modules/@algolia/requester-common": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.19.1.tgz", + "integrity": "sha512-BisRkcWVxrDzF1YPhAckmi2CFYK+jdMT60q10d7z3PX+w6fPPukxHRnZwooiTUrzFe50UBmLItGizWHP5bDzVQ==", + "dev": true + }, + "node_modules/@algolia/requester-node-http": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.19.1.tgz", + "integrity": "sha512-6DK52DHviBHTG2BK/Vv2GIlEw7i+vxm7ypZW0Z7vybGCNDeWzADx+/TmxjkES2h15+FZOqVf/Ja677gePsVItA==", + "dev": true, + "dependencies": { + "@algolia/requester-common": "4.19.1" + } + }, + "node_modules/@algolia/transporter": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.19.1.tgz", + "integrity": "sha512-nkpvPWbpuzxo1flEYqNIbGz7xhfhGOKGAZS7tzC+TELgEmi7z99qRyTfNSUlW7LZmB3ACdnqAo+9A9KFBENviQ==", + "dev": true, + "dependencies": { + "@algolia/cache-common": "4.19.1", + "@algolia/logger-common": "4.19.1", + "@algolia/requester-common": "4.19.1" + } + }, + "node_modules/@babel/parser": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz", + "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@docsearch/css": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.5.2.tgz", + "integrity": "sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==", + "dev": true + }, + "node_modules/@docsearch/js": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.5.2.tgz", + "integrity": "sha512-p1YFTCDflk8ieHgFJYfmyHBki1D61+U9idwrLh+GQQMrBSP3DLGKpy0XUJtPjAOPltcVbqsTjiPFfH7JImjUNg==", + "dev": true, + "dependencies": { + "@docsearch/react": "3.5.2", + "preact": "^10.0.0" + } + }, + "node_modules/@docsearch/react": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.5.2.tgz", + "integrity": "sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-core": "1.9.3", + "@algolia/autocomplete-preset-algolia": "1.9.3", + "@docsearch/css": "3.5.2", + "algoliasearch": "^4.19.1" + }, + "peerDependencies": { + "@types/react": ">= 16.8.0 < 19.0.0", + "react": ">= 16.8.0 < 19.0.0", + "react-dom": ">= 16.8.0 < 19.0.0", + "search-insights": ">= 1 < 3" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "search-insights": { + "optional": true + } + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@types/web-bluetooth": { + "version": "0.0.17", + "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.17.tgz", + "integrity": "sha512-4p9vcSmxAayx72yn70joFoL44c9MO/0+iVEBIQXe3v2h2SiAsEIo/G5v6ObFWvNKRFjbrVadNf9LqEEZeQPzdA==", + "dev": true + }, + "node_modules/@vitejs/plugin-vue": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-4.3.3.tgz", + "integrity": "sha512-ssxyhIAZqB0TrpUg6R0cBpCuMk9jTIlO1GNSKKQD6S8VjnXi6JXKfUXjSsxey9IwQiaRGsO1WnW9Rkl1L6AJVw==", + "dev": true, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.4.tgz", + "integrity": "sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.21.3", + "@vue/shared": "3.3.4", + "estree-walker": "^2.0.2", + "source-map-js": "^1.0.2" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.4.tgz", + "integrity": "sha512-wyM+OjOVpuUukIq6p5+nwHYtj9cFroz9cwkfmP9O1nzH68BenTTv0u7/ndggT8cIQlnBeOo6sUT/gvHcIkLA5w==", + "dev": true, + "dependencies": { + "@vue/compiler-core": "3.3.4", + "@vue/shared": "3.3.4" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.4.tgz", + "integrity": "sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.15", + "@vue/compiler-core": "3.3.4", + "@vue/compiler-dom": "3.3.4", + "@vue/compiler-ssr": "3.3.4", + "@vue/reactivity-transform": "3.3.4", + "@vue/shared": "3.3.4", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.0", + "postcss": "^8.1.10", + "source-map-js": "^1.0.2" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.4.tgz", + "integrity": "sha512-m0v6oKpup2nMSehwA6Uuu+j+wEwcy7QmwMkVNVfrV9P2qE5KshC6RwOCq8fjGS/Eak/uNb8AaWekfiXxbBB6gQ==", + "dev": true, + "dependencies": { + "@vue/compiler-dom": "3.3.4", + "@vue/shared": "3.3.4" + } + }, + "node_modules/@vue/devtools-api": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.5.0.tgz", + "integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==", + "dev": true + }, + "node_modules/@vue/reactivity": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.4.tgz", + "integrity": "sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==", + "dev": true, + "dependencies": { + "@vue/shared": "3.3.4" + } + }, + "node_modules/@vue/reactivity-transform": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.4.tgz", + "integrity": "sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.15", + "@vue/compiler-core": "3.3.4", + "@vue/shared": "3.3.4", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.0" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.4.tgz", + "integrity": "sha512-R+bqxMN6pWO7zGI4OMlmvePOdP2c93GsHFM/siJI7O2nxFRzj55pLwkpCedEY+bTMgp5miZ8CxfIZo3S+gFqvA==", + "dev": true, + "dependencies": { + "@vue/reactivity": "3.3.4", + "@vue/shared": "3.3.4" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.4.tgz", + "integrity": "sha512-Aj5bTJ3u5sFsUckRghsNjVTtxZQ1OyMWCr5dZRAPijF/0Vy4xEoRCwLyHXcj4D0UFbJ4lbx3gPTgg06K/GnPnQ==", + "dev": true, + "dependencies": { + "@vue/runtime-core": "3.3.4", + "@vue/shared": "3.3.4", + "csstype": "^3.1.1" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.4.tgz", + "integrity": "sha512-Q6jDDzR23ViIb67v+vM1Dqntu+HUexQcsWKhhQa4ARVzxOY2HbC7QRW/ggkDBd5BU+uM1sV6XOAP0b216o34JQ==", + "dev": true, + "dependencies": { + "@vue/compiler-ssr": "3.3.4", + "@vue/shared": "3.3.4" + }, + "peerDependencies": { + "vue": "3.3.4" + } + }, + "node_modules/@vue/shared": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.4.tgz", + "integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==", + "dev": true + }, + "node_modules/@vueuse/core": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.3.0.tgz", + "integrity": "sha512-BEM5yxcFKb5btFjTSAFjTu5jmwoW66fyV9uJIP4wUXXU8aR5Hl44gndaaXp7dC5HSObmgbnR2RN+Un1p68Mf5Q==", + "dev": true, + "dependencies": { + "@types/web-bluetooth": "^0.0.17", + "@vueuse/metadata": "10.3.0", + "@vueuse/shared": "10.3.0", + "vue-demi": ">=0.14.5" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/core/node_modules/vue-demi": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.5.tgz", + "integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/@vueuse/integrations": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.3.0.tgz", + "integrity": "sha512-Jgiv7oFyIgC6BxmDtiyG/fxyGysIds00YaY7sefwbhCZ2/tjEx1W/1WcsISSJPNI30in28+HC2J4uuU8184ekg==", + "dev": true, + "dependencies": { + "@vueuse/core": "10.3.0", + "@vueuse/shared": "10.3.0", + "vue-demi": ">=0.14.5" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "async-validator": "*", + "axios": "*", + "change-case": "*", + "drauu": "*", + "focus-trap": "*", + "fuse.js": "*", + "idb-keyval": "*", + "jwt-decode": "*", + "nprogress": "*", + "qrcode": "*", + "sortablejs": "*", + "universal-cookie": "*" + }, + "peerDependenciesMeta": { + "async-validator": { + "optional": true + }, + "axios": { + "optional": true + }, + "change-case": { + "optional": true + }, + "drauu": { + "optional": true + }, + "focus-trap": { + "optional": true + }, + "fuse.js": { + "optional": true + }, + "idb-keyval": { + "optional": true + }, + "jwt-decode": { + "optional": true + }, + "nprogress": { + "optional": true + }, + "qrcode": { + "optional": true + }, + "sortablejs": { + "optional": true + }, + "universal-cookie": { + "optional": true + } + } + }, + "node_modules/@vueuse/integrations/node_modules/vue-demi": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.5.tgz", + "integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/@vueuse/metadata": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.3.0.tgz", + "integrity": "sha512-Ema3YhNOa4swDsV0V7CEY5JXvK19JI/o1szFO1iWxdFg3vhdFtCtSTP26PCvbUpnUtNHBY2wx5y3WDXND5Pvnw==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.3.0.tgz", + "integrity": "sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==", + "dev": true, + "dependencies": { + "vue-demi": ">=0.14.5" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared/node_modules/vue-demi": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.5.tgz", + "integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/algoliasearch": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.19.1.tgz", + "integrity": "sha512-IJF5b93b2MgAzcE/tuzW0yOPnuUyRgGAtaPv5UUywXM8kzqfdwZTO4sPJBzoGz1eOy6H9uEchsJsBFTELZSu+g==", + "dev": true, + "dependencies": { + "@algolia/cache-browser-local-storage": "4.19.1", + "@algolia/cache-common": "4.19.1", + "@algolia/cache-in-memory": "4.19.1", + "@algolia/client-account": "4.19.1", + "@algolia/client-analytics": "4.19.1", + "@algolia/client-common": "4.19.1", + "@algolia/client-personalization": "4.19.1", + "@algolia/client-search": "4.19.1", + "@algolia/logger-common": "4.19.1", + "@algolia/logger-console": "4.19.1", + "@algolia/requester-browser-xhr": "4.19.1", + "@algolia/requester-common": "4.19.1", + "@algolia/requester-node-http": "4.19.1", + "@algolia/transporter": "4.19.1" + } + }, + "node_modules/ansi-sequence-parser": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", + "dev": true + }, + "node_modules/body-scroll-lock": { + "version": "4.0.0-beta.0", + "resolved": "https://registry.npmjs.org/body-scroll-lock/-/body-scroll-lock-4.0.0-beta.0.tgz", + "integrity": "sha512-a7tP5+0Mw3YlUJcGAKUqIBkYYGlYxk2fnCasq/FUph1hadxlTRjF+gAcZksxANnaMnALjxEddmSi/H3OR8ugcQ==", + "dev": true + }, + "node_modules/csstype": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==", + "dev": true + }, + "node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, + "node_modules/focus-trap": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.5.2.tgz", + "integrity": "sha512-p6vGNNWLDGwJCiEjkSK6oERj/hEyI9ITsSwIUICBoKLlWiTWXJRfQibCwcoi50rTZdbi87qDtUlMCmQwsGSgPw==", + "dev": true, + "dependencies": { + "tabbable": "^6.2.0" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, + "node_modules/magic-string": { + "version": "0.30.3", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.3.tgz", + "integrity": "sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/mark.js": { + "version": "8.11.1", + "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", + "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==", + "dev": true + }, + "node_modules/minisearch": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/minisearch/-/minisearch-6.1.0.tgz", + "integrity": "sha512-PNxA/X8pWk+TiqPbsoIYH0GQ5Di7m6326/lwU/S4mlo4wGQddIcf/V//1f9TB0V4j59b57b+HZxt8h3iMROGvg==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/postcss": { + "version": "8.4.28", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.28.tgz", + "integrity": "sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/preact": { + "version": "10.17.1", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.17.1.tgz", + "integrity": "sha512-X9BODrvQ4Ekwv9GURm9AKAGaomqXmip7NQTZgY7gcNmr7XE83adOMJvd3N42id1tMFU7ojiynRsYnY6/BRFxLA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, + "node_modules/rollup": { + "version": "3.28.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.28.1.tgz", + "integrity": "sha512-R9OMQmIHJm9znrU3m3cpE8uhN0fGdXiawME7aZIpQqvpS/85+Vt1Hq1/yVIcYfOmaQiHjvXkQAoJukvLpau6Yw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/search-insights": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.7.0.tgz", + "integrity": "sha512-GLbVaGgzYEKMvuJbHRhLi1qoBFnjXZGZ6l4LxOYPCp4lI2jDRB3jPU9/XNhMwv6kvnA9slTreq6pvK+b3o3aqg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8.16.0" + } + }, + "node_modules/shiki": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.3.tgz", + "integrity": "sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g==", + "dev": true, + "dependencies": { + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tabbable": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", + "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==", + "dev": true + }, + "node_modules/vite": { + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", + "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", + "dev": true, + "dependencies": { + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vitepress": { + "version": "1.0.0-rc.4", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-rc.4.tgz", + "integrity": "sha512-JCQ89Bm6ECUTnyzyas3JENo00UDJeK8q1SUQyJYou+4Yz5BKEc/F3O21cu++DnUT2zXc0kvQ2Aj4BZCc/nioXQ==", + "dev": true, + "dependencies": { + "@docsearch/css": "^3.5.1", + "@docsearch/js": "^3.5.1", + "@vitejs/plugin-vue": "^4.2.3", + "@vue/devtools-api": "^6.5.0", + "@vueuse/core": "^10.3.0", + "@vueuse/integrations": "^10.3.0", + "body-scroll-lock": "4.0.0-beta.0", + "focus-trap": "^7.5.2", + "mark.js": "8.11.1", + "minisearch": "^6.1.0", + "shiki": "^0.14.3", + "vite": "^4.4.9", + "vue": "^3.3.4" + }, + "bin": { + "vitepress": "bin/vitepress.js" + } + }, + "node_modules/vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "dev": true + }, + "node_modules/vscode-textmate": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", + "dev": true + }, + "node_modules/vue": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.4.tgz", + "integrity": "sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==", + "dev": true, + "dependencies": { + "@vue/compiler-dom": "3.3.4", + "@vue/compiler-sfc": "3.3.4", + "@vue/runtime-dom": "3.3.4", + "@vue/server-renderer": "3.3.4", + "@vue/shared": "3.3.4" + } + } + } +} diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 0000000..97f17b9 --- /dev/null +++ b/docs/package.json @@ -0,0 +1,13 @@ +{ + "name": "lancet-docs", + "private": true, + "type": "module", + "scripts": { + "docs:dev": "vitepress dev", + "docs:build": "vitepress build", + "docs:preview": "vitepress preview" + }, + "devDependencies": { + "vitepress": "^1.0.0-rc.4" + } +}