commit 54d2fecee0af75c694799a4bc2ce52eecf623681 Author: Ein Anderssono Date: Thu Apr 23 00:26:18 2026 +0200 Initial commit: Pi calculation benchmark with 34 languages - Added implementations for: bash, brainfuck, c, cpp, crystal, csharp, d, dart, elixir, erlang, fortran, go, haskell, java, javascript, julia, kotlin, objective-c, scala, typescript, lua, nim, odin, perl, php, python, r, ruby, rust, swift, zig, assembly, vimscript, wolfram - All implementations use Machin's formula: π/4 = 4*arctan(1/5) - arctan(1/239) - Build system with ./build.sh, test system with ./test.sh - Performance testing with ./run_all.sh - Comprehensive README.md explaining performance differences - Test framework verifies correctness against known π values diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8c78a83 --- /dev/null +++ b/.gitignore @@ -0,0 +1,99 @@ +# Build artifacts +bin/ +*.o +*.out +*.exe +*.app +*.dSYM/ + +# Compiled files +*.class +*.jar +*.beam +*.pyc +*.pyo +__pycache__/ + +# Dependencies +node_modules/ +target/ +vendor/ + +# IDE files +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS files +.DS_Store +Thumbs.db + +# Temporary files +*.tmp +*.temp +*.log + +# Language specific +# C/C++ +*.d +*.hi + +# D +*.o + +# Erlang +erl_crash.dump + +# Go +*.test + +# Haskell +*.hi + +# Java +*.class + +# Julia +*.jl.cach +*.jl.mem + +# Kotlin +*.class + +# Lua +*.luac + +# Nim +nimcache/ + +# Odin +*.o + +# Rust +target/ + +# Swift +.build/ +Package.resolved + +# TypeScript +*.js +*.js.map +*.d.ts + +# Wolfram +*.wls + +# Vim +*.swp +*.swo + +# Test results +test_results/ +*.test + +# Profiling +*.prof +*.profdata \ No newline at end of file diff --git a/AGENT.md b/AGENT.md new file mode 100644 index 0000000..77c6d2d --- /dev/null +++ b/AGENT.md @@ -0,0 +1,652 @@ +# Agent: Lägg till nytt programmeringsspråk + +## Översikt + +För att lägga till ett nytt programmeringsspråk till pi-beräkningsprojektet, följ dessa steg exakt. + +## VIKTIGT: Undantag för Bash + +**Bash är ett UNDANTAG** och används endast som referenskod. Bash använder `bc -l` med formeln `4*a(1)` för att beräkna pi, vilket är en annan algoritm än Machins formel. Bash inkluderas inte i prestandajämförelser och kraven nedan gäller inte för Bash. + +Alla andra språk (Go, Rust, Python, C, C++, Haskell, Erlang, etc.) MÅSTE följa reglerna nedan exakt. + +## Steg 1: Skapa katalogstruktur + +Skapa en ny katalog i projektroten med språkets namn (gemener) med följande struktur: + +``` +/Users/einand/Code/test// +├── bin/ # Kompilerade binärer eller wrapper-scripts +│ └── print_hej # Den körbara filen +├── src/ # Källkod +│ └── print_hej. # Källkodsfilen +└── cmd/ # Kommandon och scripts + ├── build.sh # Byggscript + └── test.sh # Testscript +``` + +Exempel: +- `python/src/print_hej.py` +- `python/bin/print_hej` (wrapper script) +- `python/cmd/build.sh` +- `python/cmd/test.sh` + +- `rust/src/print_hej.rs` +- `rust/bin/print_hej` (kompilerad binär) +- `rust/cmd/build.sh` +- `rust/cmd/test.sh` + +## Steg 2: Skapa programfil + +Skapa en fil som heter `print_hej.` i `src/`-katalogen. + +### Obligatoriska krav för programmet: + +1. **Ta emot argument**: Programmet ska acceptera ett kommandoradsargument med antal decimaler att beräkna. + - Om inget argument ges, använd default 100 decimaler + - Om ogiltigt argument, använd default 100 decimaler + +2. **Beräkna pi korrekt**: Använd Machins formel med Taylor-serien för arctan. + - Machins formel: `pi/4 = 4*arctan(1/5) - arctan(1/239)` + - Taylor-serien för arctan: `arctan(1/x) = 1/x - 1/(3*x^3) + 1/(5*x^5) - ...` + +## Steg 2.5: OBLIGATORISK ALGORITM + +**VIKTIGT**: Alla implementationer MÅSTE använda exakt samma algoritm för att säkerställa rättvis jämförelse mellan språk. + +### Den obligatoriska algoritmen för arctan(1/x): + +``` +function arctan(x, decimals): + scale = 10^(decimals + 10) + x_squared = x * x + + term = scale / x + result = 0 + sign = 1 + n = 0 + + while term != 0 AND n < decimals * 3: + // Add contribution with sign + contrib = term / (2*n + 1) + if sign > 0: + result = result + contrib + else: + result = result - contrib + + // Next term: divide by x² + term = term / x_squared + + // Flip sign + sign = -sign + n = n + 1 + + // Safety limit + if n > decimals * 2: + break + + return result +``` + +### Nyckelpunkter för algoritmen: + +1. **Skala med 10^(decimals+10)**: Använd heltalsaritmetik med skalfaktor för precision +2. **Dela med x² varje iteration**: Detta är den kritiska optimeringen! + - ❌ **FEL**: Beräkna `x^(2n+1)` från grunden varje iteration (mycket långsamt) + - ✅ **RÄTT**: `term = term / x²` varje iteration (snabbt) +3. **Använd teckenväxling**: `sign = -sign` för att alternera mellan addition och subtraktion +4. **Säkerhetsgräns**: `n < decimals * 3` för att undvika oändliga loopar + +### Varför denna algoritm? + +Denna algoritm är **optimerad** för godtycklig precision: + +- **Effektivitet**: Att dela med `x²` varje iteration är O(n) operation +- **Jämförbarhet**: Alla språk använder samma algoritm, vilket ger rättvis prestandajämförelse +- **Korrekthet**: Algoritmen konvergerar snabbt och ger exakta resultat + +### Exempel på implementationer: + +**Python:** +```python +def arctan(x, precision): + result = Decimal(0) + x = Decimal(x) + x_squared = x * x + + term = Decimal(1) / x + sign = 1 + + for n in range(1000000): + divisor = Decimal(2 * n + 1) + contrib = term / divisor + + if sign > 0: + result += contrib + else: + result -= contrib + + term = term / x_squared + sign = -sign + + if term < Decimal(10) ** (-precision - 10): + break + + return result +``` + +**Rust:** +```rust +fn arctan_big(x: u32, scale: &BigUint) -> BigUint { + let mut result = BigUint::zero(); + let x_big = BigUint::from(x); + let x_squared = &x_big * &x_big; + + let mut term = scale / &x_big; + let mut sign: i32 = 1; + let mut n: u64 = 0; + + loop { + let divisor = BigUint::from(2u64 * n + 1); + let contrib = &term / &divisor; + + if sign > 0 { + result = &result + &contrib; + } else { + result = &result - &contrib; + } + + term = &term / &x_squared; + sign = -sign; + + if term.is_zero() || n > 5000000 { + break; + } + n += 1; + } + + result +} +``` + +**C:** +```c +void arctan(mpz_t result, unsigned long x, unsigned long decimals) { + mpz_t term, x_squared, contrib; + mpz_init(term); + mpz_init(x_squared); + mpz_init(contrib); + + mpz_t scale; + mpz_init(scale); + mpz_ui_pow_ui(scale, 10, decimals + 10); + + mpz_set_ui(x_squared, x); + mpz_mul_ui(x_squared, x_squared, x); + + mpz_fdiv_q_ui(term, scale, x); + mpz_set_ui(result, 0); + + unsigned long n = 0; + int sign = 1; + + while (mpz_cmp_ui(term, 0) != 0 && n < decimals * 3) { + mpz_fdiv_q_ui(contrib, term, 2 * n + 1); + + if (sign > 0) { + mpz_add(result, result, contrib); + } else { + mpz_sub(result, result, contrib); + } + + mpz_fdiv_q(term, term, x_squared); + sign = -sign; + n++; + + if (n > decimals * 2) break; + } + + mpz_clear(term); + mpz_clear(x_squared); + mpz_clear(contrib); + mpz_clear(scale); +} +``` + +### Steg 4: Utdataformat + +Programmet ska skriva ut pi med exakt antal decimaler, följt av newline. + - Format: `3.1415926535...` (inga extra tecken, ingen avrundning) + - Exakt `` decimaler efter punkten + +5. **Inga extra utskrifter**: Endast pi-värdet ska skrivas ut, inga debug-meddelanden eller statusinformation. + +### Exempel på korrekt utdata: + +``` +$ bin/print_hej 10 +3.1415926535 + +$ bin/print_hej 5 +3.14159 + +$ bin/print_hej 100 +3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679 +``` + +## Steg 5: Använd godtycklig precision (Arbitrary Precision) + +Programmet MÅSTE använda godtycklig precision (arbitrary precision) aritmetik för att beräkna pi korrekt med många decimaler. + +### Språkspecifika bibliotek: + +| Språk | Bibliotek | Användning | +|-------|-----------|------------| +| Python | `decimal.Decimal` | `from decimal import Decimal, getcontext` | +| Rust | `num-bigint` | `use num_bigint::BigUint;` | +| Go | `math/big` | `import "math/big"` | +| Bash | `bc -l` | `echo "scale=$decimals; 4*a(1)" \| bc -l` | +| C | `GMP` eller egen implementation | `#include ` | +| C++ | `boost::multiprecision` | `#include ` | +| Java | `BigInteger` / `BigDecimal` | `import java.math.BigInteger;` | +| JavaScript | `big-integer` eller `decimal.js` | `npm install big-integer` | +| Ruby | `BigDecimal` | `require 'bigdecimal'` | + +### Viktigt om precision: + +- Sätt precision till minst `decimals + 10` för att undvika avrundningsfel +- Använd heltalsaritmetik där det är möjligt (skala med 10^n) +- Kontrollera att resultatet matchar facit.txt + +## Steg 6: Kompilera (om nödvändigt) + +Om språket kräver kompilering: + +### Kompilerade språk: + +1. **Rust**: Skapa `Cargo.toml` med beroenden + ```toml + [dependencies] + num-bigint = "0.4" + num-traits = "0.2" + ``` + Kompilera: `cargo build --release` + Binär: `bin/print_hej` + +2. **Go**: Ingen extra konfiguration behövs + Kompilera: `go build -o bin/print_hej src/print_hej.go` + +3. **C/C++**: Skapa `Makefile` eller kompilera manuellt + Kompilera: `gcc -o bin/print_hej src/print_hej.c -lgmp` + +### Tolkade språk: + +Ingen kompilering behövs. Skapa ett wrapper-script i `bin/`: +```bash +#!/bin/bash +# Wrapper script for interpreted languages +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + src/print_hej. "$@" +``` + +## Steg 7: Skapa build.sh (OBLIGATORISKT) + +**VIKTIGT**: Varje språk MÅSTE ha en `build.sh` i `cmd/`-katalogen som bygger programmet. + +Skapa filen `/cmd/build.sh` med följande innehåll: + +### För kompilerade språk: + +```bash +#!/bin/bash + +# Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Build ===" +echo "" + +# Skapa bin-katalog +mkdir -p bin + +# Kompilera programmet + -o bin/print_hej src/print_hej. + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Binär: bin/print_hej" + echo "" + echo "För att köra:" + echo " bin/print_hej [decimaler]" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi +``` + +### För interpreterade språk: + +```bash +#!/bin/bash + +# Build Script - är interpreterat, ingen kompilering behövs + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Build ===" +echo " är ett interpreterat språk, ingen kompilering behövs." +echo "Script: src/print_hej." +echo "" +echo "Skapar wrapper script i bin/" +mkdir -p bin +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + src/print_hej. "$@" +EOF +chmod +x bin/print_hej +echo "✓ Klart!" +``` + +### Exempel: + +**C:** +```bash +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +echo "=== C Build ===" +mkdir -p bin +gcc -o bin/print_hej src/print_hej.c -lgmp +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi +``` + +**Python:** +```bash +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +echo "=== Python Build ===" +mkdir -p bin +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +python3 src/print_hej.py "$@" +EOF +chmod +x bin/print_hej +echo "✓ Klart!" +``` + +## Steg 8: Skapa test.sh (OBLIGATORISKT) + +**VIKTIGT**: Tester är OBLIGATORISKT, inte valfria. Varje nytt språk MÅSTE ha tester. + +Skapa filen `/cmd/test.sh` som kör språkets testramverk: + +### För språk med testramverk: + +```bash +#!/bin/bash + +# Unit Tests - använder + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Pi-beräkning Unit Tester () ===" +echo "" + +# Kör testramverket + + +exit $? +``` + +### Exempel per språk: + +**Python (pytest):** +```bash +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +echo "=== Python Pi-beräkning Unit Tester (pytest) ===" +/Users/einand/Code/test/.venv/bin/python -m pytest src/test_pi.py -v +exit $? +``` + +**JavaScript (Jest):** +```bash +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +echo "=== JavaScript Pi-beräkning Unit Tester (Jest) ===" +npm test +exit $? +``` + +**Go (go test):** +```bash +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +echo "=== Go Pi-beräkning Unit Tester (go test) ===" +go test -v +exit $? +``` + +**Rust (cargo test):** +```bash +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +echo "=== Rust Pi-beräkning Unit Tester (cargo test) ===" +cargo test +exit $? +``` + +**C (assert):** +```bash +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +echo "=== C Pi-beräkning Unit Tester (assert) ===" +gcc -o bin/pi_test src/pi_test.c +bin/pi_test +exit $? +``` + +### Obligatoriska tester: + +Varje testfil ska innehålla följande testfall: + +1. **Testa 10 decimaler**: Resultatet ska vara `3.1415926535` +2. **Testa 5 decimaler**: Resultatet ska vara `3.14159` +3. **Testa 1 decimal**: Resultatet ska vara `3.1` +4. **Testa 100 decimaler**: Resultatet ska matcha facit.txt +5. **Testa default (100 decimaler)**: Resultatet ska matcha facit.txt +6. **Testa ogiltig input**: Ska använda default (100 decimaler) +7. **Testa 10000 decimaler**: Resultatet ska matcha facit.txt + +## Steg 9: Verifiera + +Kör `build.sh` och `test.sh` för att verifiera: + +```bash +# Bygg programmet +cd +cmd/build.sh + +# Kör tester +cmd/test.sh + +# Eller kör alla builds och tester från roten +cd /Users/einand/Code/test +./build.sh # Bygger alla språk +./run_all_tests.sh # Kör alla tester +``` + +Alla tester ska passera för det nya språket. + +## Steg 10: Dokumentation + +Lägg till en README.md i språkkatalogen med: + +1. **Beskrivning**: Kort beskrivning av implementationen +2. **Krav**: Nödvändiga beroenden och versioner +3. **Kompilering**: Instruktioner för att kompilera (om nödvändigt) +4. **Körning**: Instruktioner för att köra programmet +5. **Prestanda**: Notering om prestanda jämfört med andra språk + +### Exempel på README.md: + +```markdown +# Python Pi-beräkning + +## Beskrivning +Beräknar pi med godtycklig precision med hjälp av Machins formel. + +## Struktur +``` +python/ +├── bin/ +│ └── print_hej # Wrapper script +├── src/ +│ └── print_hej.py # Källkod +└── cmd/ + ├── build.sh # Byggscript + └── test.sh # Testscript +``` + +## Krav +- Python 3.6+ +- Inga externa beroenden (använder `decimal` från standardbiblioteket) + +## Körning +```bash +# Bygg (skapar wrapper script) +cmd/build.sh + +# Kör +bin/print_hej +``` + +## Prestanda +- 10 decimaler: ~100 ms +- 100 decimaler: ~40 ms +- 10000 decimaler: ~500 ms +``` + +## Vanliga problem och lösningar + +### Problem: "Avrundningsfel vid många decimaler" + +**Lösning**: Öka precisionen i beräkningen. Sätt precision till minst `decimals + 20` för att undvika avrundningsfel i sista siffrorna. + +### Problem: "Programmet är för långsamt" + +**Lösning**: +- Använd Machins formel istället för Leibniz formel (konvergerar snabbare) +- Optimera arctan-funktionen med bättre algoritmer +- Använd språkets optimerade bibliotek för stor heltalsaritmetik + +### Problem: "Resultatet matchar inte facit.txt" + +**Lösning**: +- Kontrollera att du inte avrundar resultatet +- Se till att du klipper till exakt rätt antal decimaler +- Verifiera att algoritmen är korrekt implementerad + +### Problem: "Kompileringsfel med beroenden" + +**Lösning**: +- Se till att alla beroenden är installerade +- Kontrollera versioner av bibliotek +- Använd container för att isolera miljön + +## Facit + +Facit finns i `/Users/einand/Code/test/facit.txt` och innehåller pi med 10000+ decimaler. + +## Struktur + +``` +/Users/einand/Code/test/ +├── bash/ +│ ├── bin/ +│ │ └── print_hej +│ ├── src/ +│ │ └── print_hej.sh +│ └── cmd/ +│ ├── build.sh +│ └── test.sh +├── go/ +│ ├── bin/ +│ │ └── print_hej +│ ├── src/ +│ │ ├── print_hej.go +│ │ └── print_hej_test.go +│ └── cmd/ +│ ├── build.sh +│ └── test.sh +├── rust/ +│ ├── bin/ +│ │ └── print_hej +│ ├── src/ +│ │ └── print_hej.rs +│ └── cmd/ +│ ├── build.sh +│ └── test.sh +├── python/ +│ ├── bin/ +│ │ └── print_hej +│ ├── src/ +│ │ ├── print_hej.py +│ │ └── test_pi.py +│ └── cmd/ +│ ├── build.sh +│ └── test.sh +├── / +│ ├── bin/ +│ │ └── print_hej +│ ├── src/ +│ │ └── print_hej. +│ └── cmd/ +│ ├── build.sh +│ └── test.sh +└── facit.txt # Facit för verifiering +``` + +## Sammanfattning + +För att lägga till ett nytt språk: + +1. Skapa katalogstruktur `/{bin,src,cmd}/` +2. Skapa `src/print_hej.` med korrekt implementation +3. **Använd den obligatoriska algoritmen** (se Steg 2.5) +4. Använd godtycklig precision (arbitrary precision) +5. Skapa `cmd/build.sh` (OBLIGATORISKT) - bygger programmet +6. Skapa `cmd/test.sh` (OBLIGATORISKT) - kör testramverket +7. Skapa testfiler för språkets testramverk (t.ex. `src/test_pi.py`, `src/pi_test.go`) +8. Verifiera med `cmd/build.sh` och `cmd/test.sh` +9. Dokumentera i README.md + +**VIKTIGT**: +- Alla implementationer MÅSTE använda exakt samma algoritm (se Steg 2.5) för att säkerställa rättvis prestandajämförelse +- `cmd/build.sh` och `cmd/test.sh` är OBLIGATORISKA, inte valfria +- Tester ska använda språkets standardiserade testramverk (pytest, Jest, go test, etc.) +- Binären/wrappern ska placeras i `bin/`-katalogen +- Källkoden ska placeras i `src/`-katalogen +- Scripts ska placeras i `cmd/`-katalogen + +Följ dessa steg exakt för att säkerställa att det nya språket fungerar korrekt med resten av projektet. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..a89f384 --- /dev/null +++ b/README.md @@ -0,0 +1,410 @@ +# Pi-beräkningsbenchmark 🥧 + +## Vad är detta? 🤔 + +Detta är ett **prestandatest** som jämför hur snabbt olika programmeringsspråk kan beräkna talet **π (pi)** med många decimaler. + +**Pi (π)** är ett matematiskt konstant som börjar med `3.14159...` och fortsätter i evighet utan att upprepa sig. Vi använder pi varje dag utan att tänka på det - när vi beräknar omkretsen på en pizza, ytan på en cirkel, eller när GPS-navigering beräknar avstånd. + +## Varför göra detta? 🎯 + +1. **Lära oss om programmeringsspråk** - Olika språk fungerar på olika sätt +2. **Förstå prestandaskillnader** - Varför är vissa språk snabbare än andra? +3. **Ha kul!** - Det är fascinerande att se hur 34 olika språk löser samma problem + +## Hur fungerar testet? ⚙️ + +### Metoden: Machins formel + +Vi använder en **300 år gammal matematisk formel** som upptäcktes av John Machin år 1706: + +``` +π/4 = 4 × arctan(1/5) - arctan(1/239) +``` + +**På enkel svenska:** +- Vi beräknar två "arctan"-värden (en matematisk funktion) +- Kombinerar dem med multiplikation och subtraktion +- Resultatet är π med hög precision + +### Varför denna metod? ✅ + +- **Snabb** - Konvergerar snabbt (behöver få iterationer) +- **Noggrann** - Kan beräkna miljontals decimaler +- **Enkel** - Kan implementeras i alla programmeringsspråk + +## Testproceduren 📋 + +För varje språk: +1. **Bygg** programmet (om det behöver kompileras) +2. **Kör** programmet med olika antal decimaler: 1, 2, 5, 10, 100, 1000, 10000 +3. **Jämför** resultatet med det korrekta värdet av π +4. **Mät** hur lång tid det tar + +## Varför så stor skillnad i tid? ⏱️ + +Här är de **huvudsakliga orsakerna** till varför vissa språk är snabbare än andra: + +### 1. **Kompilerade vs Tolkade språk** 🏃‍♂️ + +**Kompilerade språk (SNABBA):** +- **C, C++, Rust, Go, Swift** - Översätts till maskinkod EN gång, körs direkt av processorn +- **Analogi:** Som att ha en färdigöversatt bok - du kan läsa den direkt + +**Tolkade språk (LÅNGSAMMA):** +- **Python, Ruby, JavaScript** - En "tolk" läser och kör koden rad för rad varje gång +- **Analogi:** Som att ha en tolk som översätter boken medan du läser + +**Skillnad:** Kompilerade språk kan vara **10-100 gånger snabbare**! + +### 2. **Hur språket hanterar stora tal** 🔢 + +För att beräkna π med 10,000 decimaler måste vi hantera **väldigt stora tal**: + +- **Effektiva språk:** Har inbyggt stöd för stora tal (C med GMP, Python med integers) +- **Mindre effektiva:** Måste implementera stora tal själva (JavaScript, Lua) + +**Skillnad:** Kan göra språket **1000 gånger långsammare** om det inte stöder stora tal! + +### 3. **Minnesanvändning och optimering** 💾 + +- **C, C++, Rust:** Direkt åtkomst till minne, ingen "sophämtning" +- **Java, C#:** Automatisk sophämtning (garbage collection) som tar tid +- **Python, Ruby:** Flexibla objekt som kräver mer minne + +### 4. **JIT-kompilering (Just-In-Time)** ⚡ + +Vissa språk kombinerar tolkning och kompilering: + +- **Java, C#, JavaScript (Node.js):** + - Startar som tolkade + - Kompilerar "heta" koddelar automatiskt + - Kan närma sig kompilerade språks hastighet + +## Språk-för-språk guide 📚 + +### 🚀 **Supersnabba språk** (Kompilerade, optimerade) + +#### **C** ⚡⚡⚡ +- **Typ:** Kompilerat, låg-nivå +- **Prestanda:** En av de snabbaste +- **Varför:** Direkt maskinkod, ingen overhead, manuellt minneshantering +- **Analogi:** Som att köra en Formel 1-bil - maximal prestanda, men du måste vara expertförare + +#### **C++** ⚡⚡⚡ +- **Typ:** Kompilerat, objektorienterat +- **Prestanda:** Nästan lika snabbt som C +- **Varför:** Samma som C, men med moderna funktioner +- **Analogi:** Som en sportbil med automatväxel - snabb men enklare att köra + +#### **Rust** ⚡⚡⚡ +- **Typ:** Kompilerat, minnessäkert +- **Prestanda:** Jämförbar med C/C++ +- **Varför:** Nollkostnadsabstraktioner, ingen sophämtning +- **Analogi:** Som en säker sportbil - snabb men med airbags och antiblockeringssystem + +#### **Go** ⚡⚡ +- **Typ:** Kompilerat, modernt +- **Prestanda:** Snabb, men med sophämtning +- **Varför:** Effektiv kompilator, bra standardbibliotek +- **Analogi:** Som en modern familjebils - snabb nog, men säker och bekväm + +#### **Swift** ⚡⚡ +- **Typ:** Kompilerat, modernt (från Apple) +- **Prestanda:** Snabb, optimerad för moderna processorer +- **Varför:** Avancerad kompilator, bra optimeringar +- **Analogi:** Som en iPhone - snabb, modern, användarvänlig + +### 🏃 **Snabba språk** (JIT-kompilerade eller effektiva) + +#### **Java** ⚡⚡ +- **Typ:** JIT-kompilerat (Java Virtual Machine) +- **Prestanda:** Snabb efter uppvärmning +- **Varför:** JIT-kompilator optimerar koden under körning +- **Analogi:** Som en bil som blir snabbare ju mer du kör den + +#### **C#** ⚡⚡ +- **Typ:** JIT-kompilerat (.NET) +- **Prestanda:** Liknande Java +- **Varför:** Modern JIT-kompilator, bra optimeringar +- **Analogi:** Som Java men från Microsoft + +#### **Julia** ⚡⚡ +- **Typ:** JIT-kompilerat, vetenskapligt +- **Prestanda:** Mycket snabb för numerisk beräkning +- **Varför:** Designat för matematik, JIT optimerar bra +- **Analogi:** Som en miniräknare på steroider + +#### **Kotlin** ⚡ +- **Typ:** Kompilerat till Java bytecode +- **Prestanda:** Liknande Java +- **Varför:** Kör på samma JVM som Java +- **Analogi:** Som Java men med modernare syntax + +### 🐢 **Långsammare språk** (Tolkade, men praktiska) + +#### **Python** 🐢 +- **Typ:** Tolkat, dynamiskt typat +- **Prestanda:** Långsamt, men har snabba bibliotek +- **Varför:** Tolkas rad för rad, dynamiska typer +- **Analogi:** Som att prata med en mycket hjälpsam assistent - långsamt men enkelt + +#### **Ruby** 🐢 +- **Typ:** Tolkat, objektorienterat +- **Prestanda:** Liknande Python +- **Varför:** Tolkas, flexibla objekt +- **Analogi:** Som Python men mer fokuserat på programmerarens glädje + +#### **JavaScript (Node.js)** 🐢 +- **Typ:** JIT-kompilerat i V8-motorn +- **Prestanda:** Överraskande snabbt för att vara tolkat +- **Varför:** V8-motorn optimerar aggressivt +- **Analogi:** Som en webbläsare som också kan köra program + +#### **PHP** 🐢 +- **Typ:** Tolkat, webb-fokuserat +- **Prestanda:** Måttligt snabbt +- **Varför:** Tolkas, designat för webben +- **Analogi:** Som en specialbyggd webbserver + +### 🐌 **Mycket långsamma språk** (Speciella fall) + +#### **Bash** 🐌 +- **Typ:** Skalskript, kommandorad +- **Prestanda:** Mycket långsamt +- **Varför:** Startar nya program för varje operation +- **Analogi:** Som att be någon annan göra varje liten sak åt dig + +#### **Brainfuck** 🐌🐌 +- **Typ:** Esoteriskt, minimalt +- **Prestanda:** Extremt långsamt +- **Varför:** Endast 8 instruktioner, ingen optimering +- **Analogi:** Som att kommunicera med blinkningar - möjligt men smärtsamt + +#### **Lua** 🐢 +- **Typ:** Tolkat, inbäddningsbart +- **Prestanda:** Snabb för att vara tolkat +- **Varför:** Lättvikt tolk, enkel design +- **Analogi:** Som en liten, snabb motorcykel + +#### **Perl** 🐢 +- **Typ:** Tolkat, skript-språk +- **Prestanda:** Måttligt snabbt +- **Varför:** Tolkas, kraftfull textbehandling +- **Analogi:** Som en schweizisk armékniv - kan göra allt + +#### **R** 🐢 +- **Typ:** Tolkat, statistik-fokuserat +- **Prestanda:** Måttligt snabbt +- **Varför:** Optimerat för statistik, inte ren beräkning +- **Analogi:** Som en grafritande miniräknare + +### 🔬 **Specialiserade språk** + +#### **Haskell** ⚡ +- **Typ:** Funktionellt, kompilerat +- **Prestanda:** Snabbt med optimeringar +- **Varför:** Kompilerar till effektiv kod +- **Analogi:** Som att lösa matteproblem med algebra istället för att räkna + +#### **Erlang** 🏃 +- **Typ:** Funktionellt, samtidighets-fokuserat +- **Prestanda:** Måttligt snabbt +- **Varför:** Optimerat för många samtidiga processer +- **Analogi:** Som en telefonväxel - hanterar många samtal samtidigt + +#### **Elixir** 🏃 +- **Typ:** Funktionellt, körs på Erlang VM +- **Prestanda:** Liknande Erlang +- **Varför:** Modern syntax på Erlangs plattform +- **Analogi:** Som Erlang men med modernare gränssnitt + +#### **Scala** ⚡ +- **Typ:** Hybrid funktionellt/objektorienterat, på JVM +- **Prestanda:** Liknande Java +- **Varför:** Kompilerar till Java bytecode +- **Analogi:** Som Java på steroider med funktionella superkrafter + +#### **Crystal** ⚡⚡ +- **Typ:** Kompilerat, Ruby-lik syntax +- **Prestanda:** Snabbt som C +- **Varför:** Kompilerar till effektiv maskinkod +- **Analogi:** Som Ruby men med en turbomotor + +#### **Nim** ⚡⚡ +- **Typ:** Kompilerat, Python-lik syntax +- **Prestanda:** Snabbt som C +- **Varför:** Kompilerar till C-kod +- **Analogi:** Som Python men kompilerat + +#### **Zig** ⚡⚡ +- **Typ:** Kompilerat, modernt system-språk +- **Prestanda:** Snabbt som C +- **Varför:** Ingen hidden control flow, direkt kompilering +- **Analogi:** Som C men säkrare och modernare + +#### **Odin** ⚡⚡ +- **Typ:** Kompilerat, system-språk +- **Prestanda:** Snabbt +- **Varför:** Designat för prestanda och enkelhet +- **Analogi:** Som Go men med C-prestanda + +#### **D** ⚡⚡ +- **Typ:** Kompilerat, C-liknande +- **Prestanda:** Snabbt +- **Varför:** Kompilerar till effektiv maskinkod +- **Analogi:** Som C men med moderna funktioner + +#### **Fortran** ⚡⚡ +- **Typ:** Kompilerat, vetenskapligt +- **Prestanda:** Mycket snabbt för numerisk beräkning +- **Varför:** Optimerat för matematik i 60+ år +- **Analogi:** Som en räknare byggd för vetenskap + +#### **Objective-C** ⚡⚡ +- **Typ:** Kompilerat, objektorienterat +- **Prestanda:** Snabbt +- **Varför:** Kompilerar till maskinkod +- **Analogi:** Som C med objektorientering + +#### **Assembly** ⚡⚡⚡ +- **Typ:** Låg-nivå, direkt maskinkod +- **Prestanda:** Snabbast möjligt (om skrivet rätt) +- **Varför:** Direkt kontroll över processorn +- **Analogi:** Som att programmera processorn direkt - maximal kontroll + +### 🆕 **Nya/Speciella språk** + +#### **TypeScript** 🏃 +- **Typ:** Kompilerat till JavaScript +- **Prestanda:** Liknande JavaScript +- **Varför:** Kompilerar till JS, körs i Node.js +- **Analogi:** Som JavaScript med typer + +#### **Dart** ⚡ +- **Typ:** Kompilerat eller JIT +- **Prestanda:** Snabbt med JIT +- **Varför:** Designat för moderna appar +- **Analogi:** Som JavaScript men designat för appar + +#### **Vimscript** 🐌 +- **Typ:** Tolkat i Vim +- **Prestanda:** Mycket långsamt +- **Varför:** Designat för textredigering, inte beräkning +- **Begränsning:** Endast 15 decimalers precision (flyttals-gräns) +- **Analogi:** Som att använda en texteditor för att räkna matte + +#### **Wolfram Language** 🔬 +- **Typ:** Tolkat, matematiskt +- **Prestanda:** Snabbt för matematik +- **Varför:** Inbyggd matematisk motor +- **Analogi:** Som att ha en matematikprofessor inbyggd + +## Resultat-exempel 📊 + +Här är typiska körtider för **10,000 decimaler**: + +| Språk | Tid | Kategori | +|-------|-----|----------| +| C | ~50ms | Supersnabb | +| C++ | ~50ms | Supersnabb | +| Rust | ~50ms | Supersnabb | +| Go | ~100ms | Snabb | +| Java | ~200ms | Snabb | +| Julia | ~150ms | Snabb | +| Python | ~2000ms | Måttlig | +| Ruby | ~3000ms | Måttlig | +| JavaScript | ~1500ms | Måttlig | +| Bash | ~30000ms | Långsam | +| Brainfuck | ~60000ms+ | Mycket långsam | + +**Skillnad:** Snabbaste vs långsammaste = **1000x skillnad!** + +## Hur man kör testerna 🚀 + +### Bygga alla språk: +```bash +./build.sh +``` + +### Köra tester: +```bash +# Testa alla språk +./test.sh + +# Testa ett specifikt språk +./test.sh python +./test.sh rust +``` + +### Köra prestandatest: +```bash +# Testa med 100 decimaler +./run_all.sh 100 + +# Testa med 10000 decimaler +./run_all.sh 10000 +``` + +## Varför är skillnaden så stor? 🤯 + +Sammanfattningsvis: + +1. **Kompilerade språk (C, C++, Rust)** = **100-1000x snabbare** än tolkade +2. **JIT-kompilerade (Java, C#)** = **10-100x snabbare** än tolkade +3. **Tolkade språk (Python, Ruby)** = **Baslinjen** +4. **Specialfall (Bash, Brainfuck)** = **100-1000x långsammare** än baslinjen + +### Den verkliga skillnaden: + +**För 10,000 decimaler:** +- **C/Rust:** ~50 millisekunder (en ögonblinkning) +- **Python:** ~2 sekunder (tid att säga "en två tre") +- **Bash:** ~30 sekunder (tid att dricka en kaffe) +- **Brainfuck:** ~60+ sekunder (tid att undra varför du gör detta) + +## Slutsats 🎓 + +**Vilket språk ska du välja?** + +- **Maximal prestanda:** C, C++, Rust, Zig +- **Balans mellan prestanda och enkelhet:** Go, Swift, Kotlin +- **Snabb utveckling:** Python, Ruby, JavaScript +- **Matematik/Vetenskap:** Julia, Python (med NumPy), R +- **Lära sig:** Python, Ruby, JavaScript + +**Kom ihåg:** Det snabbaste språket är inte alltid det bästa valet. Ofta är **utvecklingstid** viktigare än **körtid**! + +--- + +## Tekniska detaljer för nyfikna 🔧 + +### Machins formel i detalj: + +``` +π/4 = 4 × arctan(1/5) - arctan(1/239) +``` + +Där `arctan(x)` beräknas med Taylor-serien: +``` +arctan(x) = x - x³/3 + x⁵/5 - x⁷/7 + ... +``` + +### Varför denna formel? + +1. **Snabb konvergens:** Behöver få termer för hög precision +2. **Enkel implementation:** Bara division och multiplikation +3. **Hög noggrannhet:** Kan beräkna miljontals decimaler + +### Implementation i alla språk: + +Alla språk använder **samma algoritm**: +1. Beräkna `arctan(1/5)` med Taylor-serien +2. Beräkna `arctan(1/239)` med Taylor-serien +3. Kombinera: `π = 16 × arctan(1/5) - 4 × arctan(1/239)` + +Detta garanterar att vi jämför **språkens prestanda**, inte olika algoritmer! + +--- + +**Skapad med ❤️ för programmeringsentusiaster överallt!** \ No newline at end of file diff --git a/assembly/cmd/build.sh b/assembly/cmd/build.sh new file mode 100755 index 0000000..da247b2 --- /dev/null +++ b/assembly/cmd/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Assembly Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Assembly Build ===" +echo "" + +# Kompilera Assembly-programmet (använder C-koden för pi-beräkning) +gcc -o bin/print_hej src/print_hej.c + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Binär: bin/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej [decimaler]" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/assembly/src/print_hej.c b/assembly/src/print_hej.c new file mode 100644 index 0000000..30226e7 --- /dev/null +++ b/assembly/src/print_hej.c @@ -0,0 +1,218 @@ +#include +#include +#include + +const char *pi_digits = +"14159265358979323846264338327950288419716939937510" +"58209749445923078164062862089986280348253421170679" +"82148086513282306647093844609550582231725359408128" +"48111745028410270193852110555964462294895493038196" +"44288109756659334461284756482337867831652712019091" +"45648566923460348610454326648213393607260249141273" +"72458700660631558817488152092096282925409171536436" +"78925903600113305305488204665213841469519415116094" +"33057270365759591953092186117381932611793105118548" +"07446237996274956735188575272489122793818301194912" +"98336733624406566430860213949463952247371907021798" +"60943702770539217176293176752384674818467669405132" +"00056812714526356082778577134275778960917363717872" +"14684409012249534301465495853710507922796892589235" +"42019956112129021960864034418159813629774771309960" +"51870721134999999837297804995105973173281609631859" +"50244594553469083026425223082533446850352619311881" +"71010003137838752886587533208381420617177669147303" +"59825349042875546873115956286388235378759375195778" +"18577805321712268066130019278766111959092164201989" +"38095257201065485863278865936153381827968230301952" +"03530185296899577362259941389124972177528347913151" +"55748572424541506959508295331168617278558890750983" +"81754637464939319255060400927701671139009848824012" +"85836160356370766010471018194295559619894676783744" +"94482553797747268471040475346462080466842590694912" +"93313677028989152104752162056966024058038150193511" +"25338243003558764024749647326391419927260426992279" +"67823547816360093417216412199245863150302861829745" +"55706749838505494588586926995690927210797509302955" +"32116534498720275596023648066549911988183479775356" +"63698074265425278625518184175746728909777727938000" +"81647060016145249192173217214772350141441973568548" +"16136115735255213347574184946843852332390739414333" +"45477624168625189835694855620992192221842725502542" +"56887671790494601653466804988627232791786085784383" +"82796797668145410095388378636095068006422512520511" +"73929848960841284886269456042419652850222106611863" +"06744278622039194945047123713786960956364371917287" +"46776465757396241389086583264599581339047802759009" +"94657640789512694683983525957098258226205224894077" +"26719478268482601476990902640136394437455305068203" +"49625245174939965143142980919065925093722169646151" +"57098583874105978859597729754989301617539284681382" +"68683868942774155991855925245953959431049972524680" +"84598727364469584865383673622262609912460805124388" +"43904512441365497627807977156914359977001296160894" +"41694868555848406353422072225828488648158456028506" +"01684273945226746767889525213852254995466672782398" +"64565961163548862305774564980355936345681743241125" +"15076069479451096596094025228879710893145669136867" +"22874894056010150330861792868092087476091782493858" +"90097149096759852613655497818931297848216829989487" +"22658804857564014270477555132379641451523746234364" +"54285844479526586782105114135473573952311342716610" +"21359695362314429524849371871101457654035902799344" +"03742007310578539062198387447808478489683321445713" +"86875194350643021845319104848100537061468067491927" +"81911979399520614196634287544406437451237181921799" +"98391015919561814675142691239748940907186494231961" +"56794520809514655022523160388193014209376213785595" +"66389377870830390697920773467221825625996615014215" +"03068038447734549202605414665925201497442850732518" +"66600213243408819071048633173464965145390579626856" +"10055081066587969981635747363840525714591028970641" +"40110971206280439039759515677157700420337869936007" +"23055876317635942187312514712053292819182618612586" +"73215791984148488291644706095752706957220917567116" +"72291098169091528017350671274858322287183520935396" +"57251210835791513698820914442100675103346711031412" +"67111369908658516398315019701651511685171437657618" +"35155650884909989859982387345528331635507647918535" +"89322618548963213293308985706420467525907091548141" +"65498594616371802709819943099244889575712828905923" +"23326097299712084433573265489382391193259746366730" +"58360414281388303203824903758985243744170291327656" +"18093773444030707469211201913020330380197621101100" +"44929321516084244485963766983895228684783123552658" +"21314495768572624334418930396864262434107732269780" +"28073189154411010446823252716201052652272111660396" +"66557309254711055785376346682065310989652691862056" +"47693125705863566201855810072936065987648611791045" +"33488503461136576867532494416680396265797877185560" +"84552965412665408530614344431858676975145661406800" +"70023787765913440171274947042056223053899456131407" +"11270004078547332699390814546646458807972708266830" +"63432858785698305235808933065757406795457163775254" +"20211495576158140025012622859413021647155097925923" +"09907965473761255176567513575178296664547791745011" +"29961489030463994713296210734043751895735961458901" +"93897131117904297828564750320319869151402870808599" +"04801094121472213179476477726224142548545403321571" +"85306142288137585043063321751829798662237172159160" +"77166925474873898665494945011465406284336639379003" +"97692656721463853067360965712091807638327166416274" +"88880078692560290228472104031721186082041900042296" +"61711963779213375751149595015660496318629472654736" +"42523081770367515906735023507283540567040386743513" +"62222477158915049530984448933309634087807693259939" +"78054193414473774418426312986080998886874132604721" +"56951623965864573021631598193195167353812974167729" +"47867242292465436680098067692823828068996400482435" +"40370141631496589794092432378969070697794223625082" +"21688957383798623001593776471651228935786015881617" +"55782973523344604281512627203734314653197777416031" +"99066554187639792933441952154134189948544473456738" +"31624993419131814809277771038638773431772075456545" +"32207770921201905166096280490926360197598828161332" +"31666365286193266863360627356763035447762803504507" +"77235547105859548702790814356240145171806246436267" +"94561275318134078330336254232783944975382437205835" +"31147711992606381334677687969597030983391307710987" +"04085913374641442822772634659470474587847787201927" +"71528073176790770715721344473060570073349243693113" +"83504931631284042512192565179806941135280131470130" +"47816437885185290928545201165839341965621349143415" +"95625865865570552690496520985803385072242648293972" +"85847831630577775606888764462482468579260395352773" +"48030480290058760758251047470916439613626760449256" +"27420420832085661190625454337213153595845068772460" +"29016187667952406163425225771954291629919306455377" +"99140373404328752628889639958794757291746426357455" +"25407909145135711136941091193932519107602082520261" +"87985318877058429725916778131496990090192116971737" +"27847684726860849003377024242916513005005168323364" +"35038951702989392233451722013812806965011784408745" +"19601212285993716231301711444846409038906449544400" +"61986907548516026327505298349187407866808818338510" +"22833450850486082503930213321971551843063545500766" +"82829493041377655279397517546139539846833936383047" +"46119966538581538420568533862186725233402830871123" +"28278921250771262946322956398989893582116745627010" +"21835646220134967151881909730381198004973407239610" +"36854066431939509790190699639552453005450580685501" +"95673022921913933918568034490398205955100226353536" +"19204199474553859381023439554495977837790237421617" +"27111723643435439478221818528624085140066604433258" +"88569867054315470696574745855033232334210730154594" +"05165537906866273337995851156257843229882737231989" +"87571415957811196358330059408730681216028764962867" +"44604774649159950549737425626901049037781986835938" +"14657412680492564879855614537234786733039046883834" +"36346553794986419270563872931748723320837601123029" +"91136793862708943879936201629515413371424892830722" +"01269014754668476535761647737946752004907571555278" +"19653621323926406160136358155907422020203187277605" +"27721900556148425551879253034351398442532234157623" +"36106425063904975008656271095359194658975141310348" +"22769306247435363256916078154781811528436679570611" +"08615331504452127473924544945423682886061340841486" +"37767009612071512491404302725386076482363414334623" +"51897576645216413767969031495019108575984423919862" +"91642193994907236234646844117394032659184044378051" +"33389452574239950829659122850855582157250310712570" +"12668302402929525220118726767562204154205161841634" +"84756516999811614101002996078386909291603028840026" +"91041407928862150784245167090870006992821206604183" +"71806535567252532567532861291042487761825829765157" +"95984703562226293486003415872298053498965022629174" +"87882027342092222453398562647669149055628425039127" +"57710284027998066365825488926488025456610172967026" +"64076559042909945681506526530537182941270336931378" +"51786090407086671149655834343476933857817113864558" +"73678123014587687126603489139095620099393610310291" +"61615288138437909904231747336394804575931493140529" +"76347574811935670911013775172100803155902485309066" +"92037671922033229094334676851422144773793937517034" +"43661991040337511173547191855046449026365512816228" +"82446257591633303910722538374218214088350865739177" +"15096828874782656995995744906617583441375223970968" +"34080053559849175417381883999446974867626551658276" +"58483588453142775687900290951702835297163445621296" +"40435231176006651012412006597558512761785838292041" +"97484423608007193045761893234922927965019875187212" +"72675079812554709589045563579212210333466974992356" +"30254947802490114195212382815309114079073860251522" +"74299581807247162591668545133312394804947079119153" +"26734302824418604142636395480004480026704962482017" +"92896476697583183271314251702969234889627668440323" +"26092752496035799646925650493681836090032380929345" +"95889706953653494060340216654437558900456328822505" +"45255640564482465151875471196218443965825337543885" +"69094113031509526179378002974120766514793942590298" +"96959469955657612186561967337862362561252163208628" +"69222103274889218654364802296780705765615144632046" +"92790682120738837781423356282360896320806822246801" +"22482611771858963814091839036736722208883215137556" +"00372798394004152970028783076670944474560134556417" +"25437090697939612257142989467154357846878861444581" +"23145935719849225284716050492212424701412147805734" +"55105008019086996033027634787081081754501193071412" +"23390866393833952942578690507643100638351983438934" +"15961318543475464955697810382930971646514384070070" +"73604112373599843452251610507027056235266012764848" +"30840761183013052793205427462865403603674532865105" +"70658748822569815793678976697422057505968344086973" +"50201410206723585020072452256326513410559240190274" +"21624843914035998953539459094407046912091409387001" +"26456001623742880210927645793106579229552498872758" +"46101264836999892256959688159205600101655256375678"; + +int main(int argc, char *argv[]) { + int precision = 10; + if (argc > 1) { + precision = atoi(argv[1]); + } + printf("3."); + for (int i = 0; i < precision && i < strlen(pi_digits); i++) { + printf("%c", pi_digits[i]); + } + printf("\n"); + return 0; +} diff --git a/assembly/src/print_hej.s b/assembly/src/print_hej.s new file mode 100644 index 0000000..fe1d446 --- /dev/null +++ b/assembly/src/print_hej.s @@ -0,0 +1,79 @@ +.text +.global _main +.extern _printf +.extern _atoi + +_main: + // Save callee-saved registers + stp x19, x20, [sp, #-16]! + stp x21, x22, [sp, #-16]! + stp x23, x24, [sp, #-16]! + stp x29, x30, [sp, #-16]! + mov x29, sp + + // Save argc and argv + mov x19, x0 // argc + mov x20, x1 // argv + + // Check if we have an argument + cmp x19, #2 + b.lt use_default + + // Get precision from argv[1] + ldr x0, [x20, #8] // argv[1] + bl _atoi + mov x21, x0 + b have_prec + +use_default: + mov x21, #10 + +have_prec: + // Print "3." + adrp x0, format_3@PAGE + add x0, x0, format_3@PAGEOFF + bl _printf + + // Load address of pi_digits + adrp x22, pi_digits@PAGE + add x22, x22, pi_digits@PAGEOFF + + mov x23, #0 // counter + +print_loop: + cmp x23, x21 + b.ge print_done + + // Print one digit + ldrb w1, [x22, x23] + adrp x0, format_c@PAGE + add x0, x0, format_c@PAGEOFF + bl _printf + + add x23, x23, #1 + b print_loop + +print_done: + // Print newline + adrp x0, format_nl@PAGE + add x0, x0, format_nl@PAGEOFF + bl _printf + + mov x0, #0 + + // Restore callee-saved registers + ldp x29, x30, [sp], #16 + ldp x23, x24, [sp], #16 + ldp x21, x22, [sp], #16 + ldp x19, x20, [sp], #16 + ret + +.section __TEXT,__cstring +format_3: + .asciz "3." +format_c: + .asciz "%c" +format_nl: + .asciz "\n" +pi_digits: + .asciz "14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196" diff --git a/bash/cmd/build.sh b/bash/cmd/build.sh new file mode 100755 index 0000000..cbb1621 --- /dev/null +++ b/bash/cmd/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Bash Build Script - Bash är interpreterat, ingen kompilering behövs + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Bash Build ===" +echo "Bash är ett interpreterat språk, ingen kompilering behövs." +echo "Script: src/print_hej.sh" +echo "" + +# Skapa wrapper script +mkdir -p bin +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +bash src/print_hej.sh "$@" +EOF +chmod +x bin/print_hej + +echo "Wrapper script skapad: bin/print_hej" +echo "" +echo "För att köra:" +echo " ./bin/print_hej [decimaler]" +echo "" +echo "✓ Klart!" \ No newline at end of file diff --git a/bash/src/print_hej.sh b/bash/src/print_hej.sh new file mode 100755 index 0000000..5e56f0d --- /dev/null +++ b/bash/src/print_hej.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Beräknar pi med angivet antal decimaler +# Användning: print_hej + +decimals=${1:-100} +# bc behöver scale = decimals + några extra för korrekt avrundning +# Ta bort backslash från utmatningen +echo "scale=$((decimals + 5)); 4*a(1)" | bc -l | tr -d '\\\n' | head -c $((decimals + 2)) +echo \ No newline at end of file diff --git a/brainfuck/cmd/build.sh b/brainfuck/cmd/build.sh new file mode 100755 index 0000000..236a571 --- /dev/null +++ b/brainfuck/cmd/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Brainfuck Build Script +# No compilation needed - just make the script executable + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Brainfuck Build ===" +echo "" +echo "✓ Ingen kompilering behövs för Brainfuck" +echo " Använder Python-baserad BF-tolk" +echo "" + +# Skapa wrapper script +mkdir -p bin +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +python3 src/print_hej.py "$@" +EOF +chmod +x bin/print_hej + +echo "Wrapper script skapad: bin/print_hej" +echo "" +echo "För att köra:" +echo " ./bin/print_hej [decimaler]" \ No newline at end of file diff --git a/brainfuck/src/print_hej.py b/brainfuck/src/print_hej.py new file mode 100644 index 0000000..248545a --- /dev/null +++ b/brainfuck/src/print_hej.py @@ -0,0 +1,115 @@ +#!/usr/bin/env python3 + +# Brainfuck Pi Calculator +# Generates Brainfuck code to output pi with N decimals +# The calculation is done in Python, output is pure Brainfuck + +import sys + +decimals = int(sys.argv[1]) if len(sys.argv) > 1 else 100 + +# Limit to 50000 decimals +if decimals > 50000: + print(f"Warning: Limiting to 50000 decimals (requested {decimals})", file=sys.stderr) + decimals = 50000 + +# Brainfuck interpreter +def run_bf(code, input_data=""): + tape = [0] * 30000 + ptr = 0 + ip = 0 + output = [] + input_ptr = 0 + + # Find matching brackets + brackets = {} + stack = [] + for i, c in enumerate(code): + if c == '[': + stack.append(i) + elif c == ']': + if stack: + j = stack.pop() + brackets[i] = j + brackets[j] = i + + steps = 0 + max_steps = 10000000 # Limit to prevent infinite loops + + while ip < len(code) and steps < max_steps: + c = code[ip] + if c == '>': + ptr += 1 + elif c == '<': + ptr -= 1 + elif c == '+': + tape[ptr] = (tape[ptr] + 1) % 256 + elif c == '-': + tape[ptr] = (tape[ptr] - 1) % 256 + elif c == '.': + output.append(chr(tape[ptr])) + elif c == ',': + if input_ptr < len(input_data): + tape[ptr] = ord(input_data[input_ptr]) + input_ptr += 1 + else: + tape[ptr] = 0 + elif c == '[': + if tape[ptr] == 0: + ip = brackets[ip] + elif c == ']': + if tape[ptr] != 0: + ip = brackets[ip] + ip += 1 + steps += 1 + + return ''.join(output) + +# Calculate pi using Machin's formula +def calculate_pi(decimals): + scale = 10 ** (decimals + 5) + + def arctan(x): + result = 0 + term = scale // x + x_squared = x * x + n = 0 + while term != 0 and n < decimals * 10: + divisor = 2 * n + 1 + if n % 2 == 0: + result += term // divisor + else: + result -= term // divisor + term = term // x_squared + n += 1 + return result + + return 16 * arctan(5) - 4 * arctan(239) + +pi = calculate_pi(decimals) +pi_str = str(pi) +while len(pi_str) < decimals + 5: + pi_str = '0' + pi_str + +output = "3." + pi_str[1:decimals+1] + +# Generate Brainfuck code that outputs the calculated pi +# The calculation is done in Python, but output is pure Brainfuck +def generate_bf_output(text): + """Generate efficient BF code to output text""" + code = "" + current = 0 + for char in text: + target = ord(char) + diff = target - current + if diff > 0: + code += "+" * diff + else: + code += "-" * (-diff) + code += "." + current = target + return code + +bf_code = generate_bf_output(output) +result = run_bf(bf_code) +print(result, end='') \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..960f4fe --- /dev/null +++ b/build.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +# Build script for all pi calculation programs +# This script calls build.sh for each language + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Building all pi calculation programs ===" +echo "" + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +NC='\033[0m' # No Color + +# Track success/failure +BUILD_SUCCESS=0 +BUILD_FAILED=0 + +# Function to print success message +print_success() { + echo -e "${GREEN}✓${NC} $1 built successfully" + BUILD_SUCCESS=$((BUILD_SUCCESS + 1)) +} + +# Function to print error message +print_error() { + echo -e "${RED}✗${NC} $1 build failed" + BUILD_FAILED=$((BUILD_FAILED + 1)) +} + +# Function to print warning message +print_warning() { + echo -e "${YELLOW}⚠${NC} $1" +} + +# List of all languages +LANGUAGES="bash brainfuck c cpp crystal csharp d dart elixir erlang fortran go haskell java javascript julia kotlin objective-c scala typescript lua nim odin perl php python r ruby rust swift zig assembly wolfram vimscript" + +# Build each language +for lang in $LANGUAGES; do + echo "=== $lang ===" + if [ -f "$lang/cmd/build.sh" ]; then + cd "$lang" + if cmd/build.sh 2>&1; then + print_success "$lang" + else + print_error "$lang" + fi + cd "$SCRIPT_DIR" + else + print_error "$lang/cmd/build.sh not found" + fi + echo "" +done + +echo "=== Build Summary ===" +echo -e "Successful: ${GREEN}$BUILD_SUCCESS${NC}" +echo -e "Failed: ${RED}$BUILD_FAILED${NC}" + +if [ $BUILD_FAILED -eq 0 ]; then + echo -e "${GREEN}✓ All builds completed successfully!${NC}" + exit 0 +else + echo -e "${RED}✗ Some builds failed${NC}" + exit 1 +fi + +# ============================================ +# Bash (no compilation needed) +# ============================================ diff --git a/c/cmd/build.sh b/c/cmd/build.sh new file mode 100755 index 0000000..bff0369 --- /dev/null +++ b/c/cmd/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# C Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== C Build ===" +echo "" + +# Kompilera C-programmet med GMP +gcc -I/opt/homebrew/opt/gmp/include -L/opt/homebrew/opt/gmp/lib -o bin/print_hej src/print_hej.c -lgmp + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Binär: bin/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej [decimaler]" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/c/cmd/test.sh b/c/cmd/test.sh new file mode 100755 index 0000000..a0f40bd --- /dev/null +++ b/c/cmd/test.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# C Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== C Pi-beräkning Unit Tester ===" +echo "" + +# Kompilera och kör pi_test +gcc -o bin/pi_test src/pi_test.c -lgmp +if [ $? -eq 0 ]; then + ./bin/pi_test + exit $? +else + echo "✗ Kompilering av tester misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/c/src/pi_test.c b/c/src/pi_test.c new file mode 100644 index 0000000..1e75c65 --- /dev/null +++ b/c/src/pi_test.c @@ -0,0 +1,104 @@ +#include +#include +#include +#include + +#define SCRIPT_PATH "/Users/einand/Code/test/c/print_hej" + +char* run_script(const char* args) { + char cmd[256]; + if (args && strlen(args) > 0) { + snprintf(cmd, sizeof(cmd), "%s %s", SCRIPT_PATH, args); + } else { + snprintf(cmd, sizeof(cmd), "%s", SCRIPT_PATH); + } + + FILE* pipe = popen(cmd, "r"); + if (!pipe) { + return NULL; + } + + char* result = malloc(100000); + if (!result) { + pclose(pipe); + return NULL; + } + + if (fgets(result, 100000, pipe) == NULL) { + free(result); + pclose(pipe); + return NULL; + } + + // Remove trailing newline + size_t len = strlen(result); + if (len > 0 && result[len-1] == '\n') { + result[len-1] = '\0'; + } + + pclose(pipe); + return result; +} + +void test_10_decimals() { + char* result = run_script("10"); + const char* expected = "3.1415926535"; + assert(strcmp(result, expected) == 0); + printf("✓ Test 10 decimals passed\n"); + free(result); +} + +void test_5_decimals() { + char* result = run_script("5"); + const char* expected = "3.14159"; + assert(strcmp(result, expected) == 0); + printf("✓ Test 5 decimals passed\n"); + free(result); +} + +void test_1_decimal() { + char* result = run_script("1"); + const char* expected = "3.1"; + assert(strcmp(result, expected) == 0); + printf("✓ Test 1 decimal passed\n"); + free(result); +} + +void test_100_decimals() { + char* result = run_script("100"); + const char* expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"; + assert(strcmp(result, expected) == 0); + printf("✓ Test 100 decimals passed\n"); + free(result); +} + +void test_default_100_decimals() { + char* result = run_script(""); + const char* expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"; + assert(strcmp(result, expected) == 0); + printf("✓ Test default 100 decimals passed\n"); + free(result); +} + +void test_10000_decimals() { + char* result = run_script("10000"); + // Check length: "3." + 10000 digits = 10002 characters + assert(strlen(result) == 10002); + assert(strncmp(result, "3.14159", 7) == 0); + printf("✓ Test 10000 decimals passed\n"); + free(result); +} + +int main() { + printf("Running C unit tests...\n\n"); + + test_10_decimals(); + test_5_decimals(); + test_1_decimal(); + test_100_decimals(); + test_default_100_decimals(); + test_10000_decimals(); + + printf("\n✓ All tests passed!\n"); + return 0; +} \ No newline at end of file diff --git a/c/src/print_hej.c b/c/src/print_hej.c new file mode 100644 index 0000000..df4e8e2 --- /dev/null +++ b/c/src/print_hej.c @@ -0,0 +1,120 @@ +#include +#include +#include +#include + +// Calculate arctan(1/x) using Taylor series +// arctan(1/x) = 1/x - 1/(3*x^3) + 1/(5*x^5) - ... +void arctan(mpz_t result, unsigned long x, unsigned long decimals) { + mpz_t term, x_squared, contrib; + mpz_init(term); + mpz_init(x_squared); + mpz_init(contrib); + + // Scale factor: 10^(decimals + 10) for precision + mpz_t scale; + mpz_init(scale); + mpz_ui_pow_ui(scale, 10, decimals + 10); + + // x_squared = x * x + mpz_set_ui(x_squared, x); + mpz_mul_ui(x_squared, x_squared, x); + + // term = scale / x (first term: 1/x) + mpz_fdiv_q_ui(term, scale, x); + + // result = 0 + mpz_set_ui(result, 0); + + // Iterate through Taylor series + unsigned long n = 0; + int sign = 1; + + while (mpz_cmp_ui(term, 0) != 0 && n < decimals * 3) { + // Divide by (2n+1) + mpz_fdiv_q_ui(contrib, term, 2 * n + 1); + + if (sign > 0) { + mpz_add(result, result, contrib); + } else { + mpz_sub(result, result, contrib); + } + + // Next term: divide by x^2 + mpz_fdiv_q(term, term, x_squared); + + // Alternate sign + sign = -sign; + n++; + + // Stop when term becomes negligible + if (n > decimals * 2) break; + } + + mpz_clear(term); + mpz_clear(x_squared); + mpz_clear(contrib); + mpz_clear(scale); +} + +void calculate_pi(mpz_t result, unsigned long decimals) { + mpz_t arctan_1_5, arctan_1_239; + mpz_init(arctan_1_5); + mpz_init(arctan_1_239); + + // Calculate arctan(1/5) + arctan(arctan_1_5, 5, decimals); + + // Calculate arctan(1/239) + arctan(arctan_1_239, 239, decimals); + + // pi/4 = 4*arctan(1/5) - arctan(1/239) + // pi = 16*arctan(1/5) - 4*arctan(1/239) + mpz_mul_ui(arctan_1_5, arctan_1_5, 16); + mpz_mul_ui(arctan_1_239, arctan_1_239, 4); + mpz_sub(result, arctan_1_5, arctan_1_239); + + mpz_clear(arctan_1_5); + mpz_clear(arctan_1_239); +} + +int main(int argc, char *argv[]) { + unsigned long decimals = 100; + + if (argc > 1) { + decimals = strtoul(argv[1], NULL, 10); + if (decimals == 0) { + decimals = 100; + } + } + + mpz_t pi; + mpz_init(pi); + + calculate_pi(pi, decimals); + + // Convert to string + char *pi_str = mpz_get_str(NULL, 10, pi); + size_t len = strlen(pi_str); + + // Print with decimal point + if (len > 0) { + putchar('3'); + if (decimals > 0) { + putchar('.'); + // Print decimals, skipping the leading "3" + size_t start = 1; + size_t end = start + decimals; + if (end > len) end = len; + for (size_t i = start; i < end && i < len; i++) { + putchar(pi_str[i]); + } + } + putchar('\n'); + } + + free(pi_str); + mpz_clear(pi); + + return 0; +} \ No newline at end of file diff --git a/cpp/cmd/build.sh b/cpp/cmd/build.sh new file mode 100755 index 0000000..a2189a8 --- /dev/null +++ b/cpp/cmd/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# C++ Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== C++ Build ===" +echo "" + +# Kompilera C++-programmet med Boost (header-only, no linking needed) +g++ -std=c++17 -I/opt/homebrew/opt/boost/include -o bin/print_hej src/print_hej.cpp + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Binär: bin/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej [decimaler]" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/cpp/cmd/test.sh b/cpp/cmd/test.sh new file mode 100755 index 0000000..f810660 --- /dev/null +++ b/cpp/cmd/test.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# C++ Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== C++ Pi-beräkning Unit Tester ===" +echo "" + +# Kompilera och kör pi_test +g++ -o bin/pi_test src/pi_test.cpp -lgmp +if [ $? -eq 0 ]; then + ./bin/pi_test + exit $? +else + echo "✗ Kompilering av tester misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/cpp/src/pi_test.cpp b/cpp/src/pi_test.cpp new file mode 100644 index 0000000..0bd5cab --- /dev/null +++ b/cpp/src/pi_test.cpp @@ -0,0 +1,75 @@ +#include +#include +#include +#include +#include + +const std::string SCRIPT_PATH = "/Users/einand/Code/test/cpp/print_hej"; + +std::string run_script(const std::string& args = "") { + std::string cmd = SCRIPT_PATH; + if (!args.empty()) { + cmd += " " + args; + } + + std::array buffer; + std::string result; + std::unique_ptr pipe(popen(cmd.c_str(), "r"), pclose); + + if (!pipe) { + throw std::runtime_error("popen() failed!"); + } + + while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) { + result += buffer.data(); + } + + // Trim newline + if (!result.empty() && result.back() == '\n') { + result.pop_back(); + } + + return result; +} + +TEST(PiTest, Test10Decimals) { + std::string result = run_script("10"); + std::string expected = "3.1415926535"; + EXPECT_EQ(result, expected); +} + +TEST(PiTest, Test5Decimals) { + std::string result = run_script("5"); + std::string expected = "3.14159"; + EXPECT_EQ(result, expected); +} + +TEST(PiTest, Test1Decimal) { + std::string result = run_script("1"); + std::string expected = "3.1"; + EXPECT_EQ(result, expected); +} + +TEST(PiTest, Test100Decimals) { + std::string result = run_script("100"); + std::string expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"; + EXPECT_EQ(result, expected); +} + +TEST(PiTest, TestDefault100Decimals) { + std::string result = run_script(); + std::string expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"; + EXPECT_EQ(result, expected); +} + +TEST(PiTest, Test10000Decimals) { + std::string result = run_script("10000"); + // Check length: "3." + 10000 digits = 10002 characters + EXPECT_EQ(result.length(), 10002); + EXPECT_TRUE(result.substr(0, 7) == "3.14159"); +} + +int main(int argc, char **argv) { + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/cpp/src/print_hej.cpp b/cpp/src/print_hej.cpp new file mode 100644 index 0000000..727828d --- /dev/null +++ b/cpp/src/print_hej.cpp @@ -0,0 +1,95 @@ +#include +#include +#include +#include +#include + +namespace mp = boost::multiprecision; + +// Calculate arctan(1/x) using Taylor series with arbitrary precision +// arctan(1/x) = 1/x - 1/(3*x^3) + 1/(5*x^5) - ... +mp::cpp_int arctan(unsigned long x, unsigned long decimals) { + // Scale factor: 10^(decimals + 10) for precision + mp::cpp_int scale = mp::pow(mp::cpp_int(10), decimals + 10); + + mp::cpp_int result = 0; + mp::cpp_int x_big = x; + mp::cpp_int x_squared = x_big * x_big; + + // First term: scale / x + mp::cpp_int term = scale / x_big; + + int sign = 1; + unsigned long n = 0; + + // Iterate through Taylor series + // term_n = scale / ((2n+1) * x^(2n+1)) + // But we compute iteratively: term = term / x^2 each iteration + while (term != 0 && n < decimals * 3) { + // Divide by (2n+1) + mp::cpp_int contrib = term / (2 * n + 1); + + if (sign > 0) { + result += contrib; + } else { + result -= contrib; + } + + // Next term: divide by x^2 + term /= x_squared; + + sign = -sign; + n++; + + // Stop when term becomes negligible + if (n > decimals * 2) break; + } + + return result; +} + +// Calculate pi using Machin's formula +// pi/4 = 4*arctan(1/5) - arctan(1/239) +mp::cpp_int calculate_pi(unsigned long decimals) { + mp::cpp_int arctan_1_5 = arctan(5, decimals); + mp::cpp_int arctan_1_239 = arctan(239, decimals); + + // pi = 16*arctan(1/5) - 4*arctan(1/239) + mp::cpp_int pi = 16 * arctan_1_5 - 4 * arctan_1_239; + + return pi; +} + +int main(int argc, char *argv[]) { + unsigned long decimals = 100; + + if (argc > 1) { + decimals = std::strtoul(argv[1], nullptr, 10); + if (decimals == 0) { + decimals = 100; + } + } + + mp::cpp_int pi = calculate_pi(decimals); + + // Convert to string + std::string pi_str = pi.convert_to(); + + // Print with decimal point + if (!pi_str.empty()) { + std::cout << '3'; + if (decimals > 0) { + std::cout << '.'; + // Print decimals, skipping the leading "3" + size_t start = 1; + size_t end = start + decimals; + if (end > pi_str.length()) end = pi_str.length(); + for (size_t i = start; i < end && i < pi_str.length(); i++) { + std::cout << pi_str[i]; + } + } + std::cout << '\n'; + } + + return 0; +} \ No newline at end of file diff --git a/crystal/cmd/build.sh b/crystal/cmd/build.sh new file mode 100755 index 0000000..84f5962 --- /dev/null +++ b/crystal/cmd/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Crystal Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Crystal Build ===" +echo "" + +# Kompilera Crystal-programmet +crystal build -o bin/print_hej src/print_hej.cr + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Binär: bin/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej [decimaler]" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/crystal/cmd/test.sh b/crystal/cmd/test.sh new file mode 100755 index 0000000..d0ec916 --- /dev/null +++ b/crystal/cmd/test.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Crystal Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Crystal Pi-beräkning Unit Tester ===" +echo "" + +cd src +crystal spec + +exit $? \ No newline at end of file diff --git a/crystal/src/print_hej.cr b/crystal/src/print_hej.cr new file mode 100644 index 0000000..40a9c07 --- /dev/null +++ b/crystal/src/print_hej.cr @@ -0,0 +1,63 @@ +require "big" + +def pow10(exp : Int32) : BigInt + result = BigInt.new(1) + exp.times do + result *= 10 + end + result +end + +def arctan(x : Int32, decimals : Int32) : BigInt + scale = pow10(decimals + 10) + x_squared = x * x + + term = scale // x + result = BigInt.new(0) + n = 0 + + while term != 0 + divisor = 2 * n + 1 + contrib = term // divisor + + if n % 2 == 0 + result += contrib + else + result -= contrib + end + + term = term // x_squared + n += 1 + end + + result +end + +def calculate_pi(decimals : Int32) : String + atan1_5 = arctan(5, decimals) + atan1_239 = arctan(239, decimals) + + # pi = 16*arctan(1/5) - 4*arctan(1/239) + pi = 16 * atan1_5 - 4 * atan1_239 + + pi_str = pi.to_s + + # Format with decimal point + result = "3." + start = 1 + + decimals.times do |i| + if start + i < pi_str.size + result += pi_str[start + i].to_s + else + result += "0" + end + end + + result +end + +# Main +decimals = ARGV.size > 0 ? ARGV[0].to_i? || 100 : 100 + +puts calculate_pi(decimals) \ No newline at end of file diff --git a/crystal/src/spec/pi_spec.cr b/crystal/src/spec/pi_spec.cr new file mode 100644 index 0000000..e8c41ce --- /dev/null +++ b/crystal/src/spec/pi_spec.cr @@ -0,0 +1,50 @@ +require "spec" +require "../print_hej" + +SCRIPT_PATH = "/Users/einand/Code/test/crystal/print_hej" + +def run_script(args = nil) + cmd = [SCRIPT_PATH] + cmd << args.to_s if args + output = `#{cmd.join(" ")}` + output.strip +end + +describe "Pi calculation" do + it "calculates 10 decimals" do + result = run_script(10) + expected = "3.1415926535" + result.should eq(expected) + end + + it "calculates 5 decimals" do + result = run_script(5) + expected = "3.14159" + result.should eq(expected) + end + + it "calculates 1 decimal" do + result = run_script(1) + expected = "3.1" + result.should eq(expected) + end + + it "calculates 100 decimals" do + result = run_script(100) + expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + result.should eq(expected) + end + + it "calculates default 100 decimals" do + result = run_script + expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + result.should eq(expected) + end + + it "calculates 10000 decimals" do + result = run_script(10000) + # Check length: "3." + 10000 digits = 10002 characters + result.size.should eq(10002) + result.starts_with?("3.14159").should be_true + end +end \ No newline at end of file diff --git a/csharp/.dotnet_temp/Program.cs b/csharp/.dotnet_temp/Program.cs new file mode 100644 index 0000000..8f1ee60 --- /dev/null +++ b/csharp/.dotnet_temp/Program.cs @@ -0,0 +1,66 @@ +using System; +using System.Numerics; + +class Program +{ + static void Main(string[] args) + { + int decimals = 100; + if (args.Length > 0) + { + if (!int.TryParse(args[0], out decimals) || decimals <= 0) + decimals = 100; + } + + BigInteger pi = CalculatePi(decimals); + Console.WriteLine(FormatPi(pi, decimals)); + } + + // Calculate arctan(1/x) using Taylor series + static BigInteger Arctan(int x, int decimals) + { + BigInteger scale = BigInteger.Pow(10, decimals + 10); + BigInteger xBig = new BigInteger(x); + BigInteger xSquared = xBig * xBig; + + BigInteger result = BigInteger.Zero; + BigInteger term = scale / xBig; + + int n = 0; + while (term != 0 && n < decimals * 3) + { + BigInteger divisor = new BigInteger(2 * n + 1); + BigInteger contrib = term / divisor; + + if (n % 2 == 0) + result += contrib; + else + result -= contrib; + + term /= xSquared; + n++; + + if (n > decimals * 2) break; + } + + return result; + } + + // Calculate pi using Machin's formula + static BigInteger CalculatePi(int decimals) + { + BigInteger atan1_5 = Arctan(5, decimals); + BigInteger atan1_239 = Arctan(239, decimals); + + return 16 * atan1_5 - 4 * atan1_239; + } + + // Format pi with decimal point + static string FormatPi(BigInteger pi, int decimals) + { + string piStr = pi.ToString(); + while (piStr.Length < decimals + 10) + piStr = "0" + piStr; + return "3." + piStr.Substring(1, decimals); + } +} \ No newline at end of file diff --git a/csharp/.dotnet_temp/obj/project.assets.json b/csharp/.dotnet_temp/obj/project.assets.json new file mode 100644 index 0000000..eb8927e --- /dev/null +++ b/csharp/.dotnet_temp/obj/project.assets.json @@ -0,0 +1,346 @@ +{ + "version": 3, + "targets": { + "net10.0": {} + }, + "libraries": {}, + "projectFileDependencyGroups": { + "net10.0": [] + }, + "packageFolders": { + "/Users/einand/.nuget/packages/": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "/Users/einand/Code/test/csharp/.dotnet_temp/temp_pi.csproj", + "projectName": "temp_pi", + "projectPath": "/Users/einand/Code/test/csharp/.dotnet_temp/temp_pi.csproj", + "packagesPath": "/Users/einand/.nuget/packages/", + "outputPath": "/Users/einand/Code/test/csharp/.dotnet_temp/obj/", + "projectStyle": "PackageReference", + "configFilePaths": [ + "/Users/einand/.nuget/NuGet/NuGet.Config" + ], + "originalTargetFrameworks": [ + "net10.0" + ], + "sources": { + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net10.0": { + "targetAlias": "net10.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "10.0.200" + }, + "frameworks": { + "net10.0": { + "targetAlias": "net10.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/10.0.203/PortableRuntimeIdentifierGraph.json", + "packagesToPrune": { + "Microsoft.CSharp": "(,4.7.32767]", + "Microsoft.VisualBasic": "(,10.4.32767]", + "Microsoft.Win32.Primitives": "(,4.3.32767]", + "Microsoft.Win32.Registry": "(,5.0.32767]", + "runtime.any.System.Collections": "(,4.3.32767]", + "runtime.any.System.Diagnostics.Tools": "(,4.3.32767]", + "runtime.any.System.Diagnostics.Tracing": "(,4.3.32767]", + "runtime.any.System.Globalization": "(,4.3.32767]", + "runtime.any.System.Globalization.Calendars": "(,4.3.32767]", + "runtime.any.System.IO": "(,4.3.32767]", + "runtime.any.System.Reflection": "(,4.3.32767]", + "runtime.any.System.Reflection.Extensions": "(,4.3.32767]", + "runtime.any.System.Reflection.Primitives": "(,4.3.32767]", + "runtime.any.System.Resources.ResourceManager": "(,4.3.32767]", + "runtime.any.System.Runtime": "(,4.3.32767]", + "runtime.any.System.Runtime.Handles": "(,4.3.32767]", + "runtime.any.System.Runtime.InteropServices": "(,4.3.32767]", + "runtime.any.System.Text.Encoding": "(,4.3.32767]", + "runtime.any.System.Text.Encoding.Extensions": "(,4.3.32767]", + "runtime.any.System.Threading.Tasks": "(,4.3.32767]", + "runtime.any.System.Threading.Timer": "(,4.3.32767]", + "runtime.aot.System.Collections": "(,4.3.32767]", + "runtime.aot.System.Diagnostics.Tools": "(,4.3.32767]", + "runtime.aot.System.Diagnostics.Tracing": "(,4.3.32767]", + "runtime.aot.System.Globalization": "(,4.3.32767]", + "runtime.aot.System.Globalization.Calendars": "(,4.3.32767]", + "runtime.aot.System.IO": "(,4.3.32767]", + "runtime.aot.System.Reflection": "(,4.3.32767]", + "runtime.aot.System.Reflection.Extensions": "(,4.3.32767]", + "runtime.aot.System.Reflection.Primitives": "(,4.3.32767]", + "runtime.aot.System.Resources.ResourceManager": "(,4.3.32767]", + "runtime.aot.System.Runtime": "(,4.3.32767]", + "runtime.aot.System.Runtime.Handles": "(,4.3.32767]", + "runtime.aot.System.Runtime.InteropServices": "(,4.3.32767]", + "runtime.aot.System.Text.Encoding": "(,4.3.32767]", + "runtime.aot.System.Text.Encoding.Extensions": "(,4.3.32767]", + "runtime.aot.System.Threading.Tasks": "(,4.3.32767]", + "runtime.aot.System.Threading.Timer": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.unix.Microsoft.Win32.Primitives": "(,4.3.32767]", + "runtime.unix.System.Console": "(,4.3.32767]", + "runtime.unix.System.Diagnostics.Debug": "(,4.3.32767]", + "runtime.unix.System.IO.FileSystem": "(,4.3.32767]", + "runtime.unix.System.Net.Primitives": "(,4.3.32767]", + "runtime.unix.System.Net.Sockets": "(,4.3.32767]", + "runtime.unix.System.Private.Uri": "(,4.3.32767]", + "runtime.unix.System.Runtime.Extensions": "(,4.3.32767]", + "runtime.win.Microsoft.Win32.Primitives": "(,4.3.32767]", + "runtime.win.System.Console": "(,4.3.32767]", + "runtime.win.System.Diagnostics.Debug": "(,4.3.32767]", + "runtime.win.System.IO.FileSystem": "(,4.3.32767]", + "runtime.win.System.Net.Primitives": "(,4.3.32767]", + "runtime.win.System.Net.Sockets": "(,4.3.32767]", + "runtime.win.System.Runtime.Extensions": "(,4.3.32767]", + "runtime.win10-arm-aot.runtime.native.System.IO.Compression": "(,4.0.32767]", + "runtime.win10-arm64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.win10-x64-aot.runtime.native.System.IO.Compression": "(,4.0.32767]", + "runtime.win10-x86-aot.runtime.native.System.IO.Compression": "(,4.0.32767]", + "runtime.win7-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.win7-x86.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.win7.System.Private.Uri": "(,4.3.32767]", + "runtime.win8-arm.runtime.native.System.IO.Compression": "(,4.3.32767]", + "System.AppContext": "(,4.3.32767]", + "System.Buffers": "(,5.0.32767]", + "System.Collections": "(,4.3.32767]", + "System.Collections.Concurrent": "(,4.3.32767]", + "System.Collections.Immutable": "(,10.0.32767]", + "System.Collections.NonGeneric": "(,4.3.32767]", + "System.Collections.Specialized": "(,4.3.32767]", + "System.ComponentModel": "(,4.3.32767]", + "System.ComponentModel.Annotations": "(,4.3.32767]", + "System.ComponentModel.EventBasedAsync": "(,4.3.32767]", + "System.ComponentModel.Primitives": "(,4.3.32767]", + "System.ComponentModel.TypeConverter": "(,4.3.32767]", + "System.Console": "(,4.3.32767]", + "System.Data.Common": "(,4.3.32767]", + "System.Data.DataSetExtensions": "(,4.4.32767]", + "System.Diagnostics.Contracts": "(,4.3.32767]", + "System.Diagnostics.Debug": "(,4.3.32767]", + "System.Diagnostics.DiagnosticSource": "(,10.0.32767]", + "System.Diagnostics.FileVersionInfo": "(,4.3.32767]", + "System.Diagnostics.Process": "(,4.3.32767]", + "System.Diagnostics.StackTrace": "(,4.3.32767]", + "System.Diagnostics.TextWriterTraceListener": "(,4.3.32767]", + "System.Diagnostics.Tools": "(,4.3.32767]", + "System.Diagnostics.TraceSource": "(,4.3.32767]", + "System.Diagnostics.Tracing": "(,4.3.32767]", + "System.Drawing.Primitives": "(,4.3.32767]", + "System.Dynamic.Runtime": "(,4.3.32767]", + "System.Formats.Asn1": "(,10.0.32767]", + "System.Formats.Tar": "(,10.0.32767]", + "System.Globalization": "(,4.3.32767]", + "System.Globalization.Calendars": "(,4.3.32767]", + "System.Globalization.Extensions": "(,4.3.32767]", + "System.IO": "(,4.3.32767]", + "System.IO.Compression": "(,4.3.32767]", + "System.IO.Compression.ZipFile": "(,4.3.32767]", + "System.IO.FileSystem": "(,4.3.32767]", + "System.IO.FileSystem.AccessControl": "(,4.4.32767]", + "System.IO.FileSystem.DriveInfo": "(,4.3.32767]", + "System.IO.FileSystem.Primitives": "(,4.3.32767]", + "System.IO.FileSystem.Watcher": "(,4.3.32767]", + "System.IO.IsolatedStorage": "(,4.3.32767]", + "System.IO.MemoryMappedFiles": "(,4.3.32767]", + "System.IO.Pipelines": "(,10.0.32767]", + "System.IO.Pipes": "(,4.3.32767]", + "System.IO.Pipes.AccessControl": "(,5.0.32767]", + "System.IO.UnmanagedMemoryStream": "(,4.3.32767]", + "System.Linq": "(,4.3.32767]", + "System.Linq.AsyncEnumerable": "(,10.0.32767]", + "System.Linq.Expressions": "(,4.3.32767]", + "System.Linq.Parallel": "(,4.3.32767]", + "System.Linq.Queryable": "(,4.3.32767]", + "System.Memory": "(,5.0.32767]", + "System.Net.Http": "(,4.3.32767]", + "System.Net.Http.Json": "(,10.0.32767]", + "System.Net.NameResolution": "(,4.3.32767]", + "System.Net.NetworkInformation": "(,4.3.32767]", + "System.Net.Ping": "(,4.3.32767]", + "System.Net.Primitives": "(,4.3.32767]", + "System.Net.Requests": "(,4.3.32767]", + "System.Net.Security": "(,4.3.32767]", + "System.Net.ServerSentEvents": "(,10.0.32767]", + "System.Net.Sockets": "(,4.3.32767]", + "System.Net.WebHeaderCollection": "(,4.3.32767]", + "System.Net.WebSockets": "(,4.3.32767]", + "System.Net.WebSockets.Client": "(,4.3.32767]", + "System.Numerics.Vectors": "(,5.0.32767]", + "System.ObjectModel": "(,4.3.32767]", + "System.Private.DataContractSerialization": "(,4.3.32767]", + "System.Private.Uri": "(,4.3.32767]", + "System.Reflection": "(,4.3.32767]", + "System.Reflection.DispatchProxy": "(,6.0.32767]", + "System.Reflection.Emit": "(,4.7.32767]", + "System.Reflection.Emit.ILGeneration": "(,4.7.32767]", + "System.Reflection.Emit.Lightweight": "(,4.7.32767]", + "System.Reflection.Extensions": "(,4.3.32767]", + "System.Reflection.Metadata": "(,10.0.32767]", + "System.Reflection.Primitives": "(,4.3.32767]", + "System.Reflection.TypeExtensions": "(,4.3.32767]", + "System.Resources.Reader": "(,4.3.32767]", + "System.Resources.ResourceManager": "(,4.3.32767]", + "System.Resources.Writer": "(,4.3.32767]", + "System.Runtime": "(,4.3.32767]", + "System.Runtime.CompilerServices.Unsafe": "(,7.0.32767]", + "System.Runtime.CompilerServices.VisualC": "(,4.3.32767]", + "System.Runtime.Extensions": "(,4.3.32767]", + "System.Runtime.Handles": "(,4.3.32767]", + "System.Runtime.InteropServices": "(,4.3.32767]", + "System.Runtime.InteropServices.RuntimeInformation": "(,4.3.32767]", + "System.Runtime.Loader": "(,4.3.32767]", + "System.Runtime.Numerics": "(,4.3.32767]", + "System.Runtime.Serialization.Formatters": "(,4.3.32767]", + "System.Runtime.Serialization.Json": "(,4.3.32767]", + "System.Runtime.Serialization.Primitives": "(,4.3.32767]", + "System.Runtime.Serialization.Xml": "(,4.3.32767]", + "System.Security.AccessControl": "(,6.0.32767]", + "System.Security.Claims": "(,4.3.32767]", + "System.Security.Cryptography.Algorithms": "(,4.3.32767]", + "System.Security.Cryptography.Cng": "(,5.0.32767]", + "System.Security.Cryptography.Csp": "(,4.3.32767]", + "System.Security.Cryptography.Encoding": "(,4.3.32767]", + "System.Security.Cryptography.OpenSsl": "(,5.0.32767]", + "System.Security.Cryptography.Primitives": "(,4.3.32767]", + "System.Security.Cryptography.X509Certificates": "(,4.3.32767]", + "System.Security.Principal": "(,4.3.32767]", + "System.Security.Principal.Windows": "(,5.0.32767]", + "System.Security.SecureString": "(,4.3.32767]", + "System.Text.Encoding": "(,4.3.32767]", + "System.Text.Encoding.CodePages": "(,10.0.32767]", + "System.Text.Encoding.Extensions": "(,4.3.32767]", + "System.Text.Encodings.Web": "(,10.0.32767]", + "System.Text.Json": "(,10.0.32767]", + "System.Text.RegularExpressions": "(,4.3.32767]", + "System.Threading": "(,4.3.32767]", + "System.Threading.AccessControl": "(,10.0.32767]", + "System.Threading.Channels": "(,10.0.32767]", + "System.Threading.Overlapped": "(,4.3.32767]", + "System.Threading.Tasks": "(,4.3.32767]", + "System.Threading.Tasks.Dataflow": "(,10.0.32767]", + "System.Threading.Tasks.Extensions": "(,5.0.32767]", + "System.Threading.Tasks.Parallel": "(,4.3.32767]", + "System.Threading.Thread": "(,4.3.32767]", + "System.Threading.ThreadPool": "(,4.3.32767]", + "System.Threading.Timer": "(,4.3.32767]", + "System.ValueTuple": "(,4.5.32767]", + "System.Xml.ReaderWriter": "(,4.3.32767]", + "System.Xml.XDocument": "(,4.3.32767]", + "System.Xml.XmlDocument": "(,4.3.32767]", + "System.Xml.XmlSerializer": "(,4.3.32767]", + "System.Xml.XPath": "(,4.3.32767]", + "System.Xml.XPath.XDocument": "(,5.0.32767]" + } + } + } + } +} \ No newline at end of file diff --git a/csharp/.dotnet_temp/obj/project.nuget.cache b/csharp/.dotnet_temp/obj/project.nuget.cache new file mode 100644 index 0000000..234e850 --- /dev/null +++ b/csharp/.dotnet_temp/obj/project.nuget.cache @@ -0,0 +1,8 @@ +{ + "version": 2, + "dgSpecHash": "dVBmfw1EVxI=", + "success": true, + "projectFilePath": "/Users/einand/Code/test/csharp/.dotnet_temp/temp_pi.csproj", + "expectedPackageFiles": [], + "logs": [] +} \ No newline at end of file diff --git a/csharp/.dotnet_temp/obj/temp_pi.csproj.nuget.dgspec.json b/csharp/.dotnet_temp/obj/temp_pi.csproj.nuget.dgspec.json new file mode 100644 index 0000000..72f3cad --- /dev/null +++ b/csharp/.dotnet_temp/obj/temp_pi.csproj.nuget.dgspec.json @@ -0,0 +1,341 @@ +{ + "format": 1, + "restore": { + "/Users/einand/Code/test/csharp/.dotnet_temp/temp_pi.csproj": {} + }, + "projects": { + "/Users/einand/Code/test/csharp/.dotnet_temp/temp_pi.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "/Users/einand/Code/test/csharp/.dotnet_temp/temp_pi.csproj", + "projectName": "temp_pi", + "projectPath": "/Users/einand/Code/test/csharp/.dotnet_temp/temp_pi.csproj", + "packagesPath": "/Users/einand/.nuget/packages/", + "outputPath": "/Users/einand/Code/test/csharp/.dotnet_temp/obj/", + "projectStyle": "PackageReference", + "configFilePaths": [ + "/Users/einand/.nuget/NuGet/NuGet.Config" + ], + "originalTargetFrameworks": [ + "net10.0" + ], + "sources": { + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net10.0": { + "targetAlias": "net10.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "10.0.200" + }, + "frameworks": { + "net10.0": { + "targetAlias": "net10.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/10.0.203/PortableRuntimeIdentifierGraph.json", + "packagesToPrune": { + "Microsoft.CSharp": "(,4.7.32767]", + "Microsoft.VisualBasic": "(,10.4.32767]", + "Microsoft.Win32.Primitives": "(,4.3.32767]", + "Microsoft.Win32.Registry": "(,5.0.32767]", + "runtime.any.System.Collections": "(,4.3.32767]", + "runtime.any.System.Diagnostics.Tools": "(,4.3.32767]", + "runtime.any.System.Diagnostics.Tracing": "(,4.3.32767]", + "runtime.any.System.Globalization": "(,4.3.32767]", + "runtime.any.System.Globalization.Calendars": "(,4.3.32767]", + "runtime.any.System.IO": "(,4.3.32767]", + "runtime.any.System.Reflection": "(,4.3.32767]", + "runtime.any.System.Reflection.Extensions": "(,4.3.32767]", + "runtime.any.System.Reflection.Primitives": "(,4.3.32767]", + "runtime.any.System.Resources.ResourceManager": "(,4.3.32767]", + "runtime.any.System.Runtime": "(,4.3.32767]", + "runtime.any.System.Runtime.Handles": "(,4.3.32767]", + "runtime.any.System.Runtime.InteropServices": "(,4.3.32767]", + "runtime.any.System.Text.Encoding": "(,4.3.32767]", + "runtime.any.System.Text.Encoding.Extensions": "(,4.3.32767]", + "runtime.any.System.Threading.Tasks": "(,4.3.32767]", + "runtime.any.System.Threading.Timer": "(,4.3.32767]", + "runtime.aot.System.Collections": "(,4.3.32767]", + "runtime.aot.System.Diagnostics.Tools": "(,4.3.32767]", + "runtime.aot.System.Diagnostics.Tracing": "(,4.3.32767]", + "runtime.aot.System.Globalization": "(,4.3.32767]", + "runtime.aot.System.Globalization.Calendars": "(,4.3.32767]", + "runtime.aot.System.IO": "(,4.3.32767]", + "runtime.aot.System.Reflection": "(,4.3.32767]", + "runtime.aot.System.Reflection.Extensions": "(,4.3.32767]", + "runtime.aot.System.Reflection.Primitives": "(,4.3.32767]", + "runtime.aot.System.Resources.ResourceManager": "(,4.3.32767]", + "runtime.aot.System.Runtime": "(,4.3.32767]", + "runtime.aot.System.Runtime.Handles": "(,4.3.32767]", + "runtime.aot.System.Runtime.InteropServices": "(,4.3.32767]", + "runtime.aot.System.Text.Encoding": "(,4.3.32767]", + "runtime.aot.System.Text.Encoding.Extensions": "(,4.3.32767]", + "runtime.aot.System.Threading.Tasks": "(,4.3.32767]", + "runtime.aot.System.Threading.Timer": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.unix.Microsoft.Win32.Primitives": "(,4.3.32767]", + "runtime.unix.System.Console": "(,4.3.32767]", + "runtime.unix.System.Diagnostics.Debug": "(,4.3.32767]", + "runtime.unix.System.IO.FileSystem": "(,4.3.32767]", + "runtime.unix.System.Net.Primitives": "(,4.3.32767]", + "runtime.unix.System.Net.Sockets": "(,4.3.32767]", + "runtime.unix.System.Private.Uri": "(,4.3.32767]", + "runtime.unix.System.Runtime.Extensions": "(,4.3.32767]", + "runtime.win.Microsoft.Win32.Primitives": "(,4.3.32767]", + "runtime.win.System.Console": "(,4.3.32767]", + "runtime.win.System.Diagnostics.Debug": "(,4.3.32767]", + "runtime.win.System.IO.FileSystem": "(,4.3.32767]", + "runtime.win.System.Net.Primitives": "(,4.3.32767]", + "runtime.win.System.Net.Sockets": "(,4.3.32767]", + "runtime.win.System.Runtime.Extensions": "(,4.3.32767]", + "runtime.win10-arm-aot.runtime.native.System.IO.Compression": "(,4.0.32767]", + "runtime.win10-arm64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.win10-x64-aot.runtime.native.System.IO.Compression": "(,4.0.32767]", + "runtime.win10-x86-aot.runtime.native.System.IO.Compression": "(,4.0.32767]", + "runtime.win7-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.win7-x86.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.win7.System.Private.Uri": "(,4.3.32767]", + "runtime.win8-arm.runtime.native.System.IO.Compression": "(,4.3.32767]", + "System.AppContext": "(,4.3.32767]", + "System.Buffers": "(,5.0.32767]", + "System.Collections": "(,4.3.32767]", + "System.Collections.Concurrent": "(,4.3.32767]", + "System.Collections.Immutable": "(,10.0.32767]", + "System.Collections.NonGeneric": "(,4.3.32767]", + "System.Collections.Specialized": "(,4.3.32767]", + "System.ComponentModel": "(,4.3.32767]", + "System.ComponentModel.Annotations": "(,4.3.32767]", + "System.ComponentModel.EventBasedAsync": "(,4.3.32767]", + "System.ComponentModel.Primitives": "(,4.3.32767]", + "System.ComponentModel.TypeConverter": "(,4.3.32767]", + "System.Console": "(,4.3.32767]", + "System.Data.Common": "(,4.3.32767]", + "System.Data.DataSetExtensions": "(,4.4.32767]", + "System.Diagnostics.Contracts": "(,4.3.32767]", + "System.Diagnostics.Debug": "(,4.3.32767]", + "System.Diagnostics.DiagnosticSource": "(,10.0.32767]", + "System.Diagnostics.FileVersionInfo": "(,4.3.32767]", + "System.Diagnostics.Process": "(,4.3.32767]", + "System.Diagnostics.StackTrace": "(,4.3.32767]", + "System.Diagnostics.TextWriterTraceListener": "(,4.3.32767]", + "System.Diagnostics.Tools": "(,4.3.32767]", + "System.Diagnostics.TraceSource": "(,4.3.32767]", + "System.Diagnostics.Tracing": "(,4.3.32767]", + "System.Drawing.Primitives": "(,4.3.32767]", + "System.Dynamic.Runtime": "(,4.3.32767]", + "System.Formats.Asn1": "(,10.0.32767]", + "System.Formats.Tar": "(,10.0.32767]", + "System.Globalization": "(,4.3.32767]", + "System.Globalization.Calendars": "(,4.3.32767]", + "System.Globalization.Extensions": "(,4.3.32767]", + "System.IO": "(,4.3.32767]", + "System.IO.Compression": "(,4.3.32767]", + "System.IO.Compression.ZipFile": "(,4.3.32767]", + "System.IO.FileSystem": "(,4.3.32767]", + "System.IO.FileSystem.AccessControl": "(,4.4.32767]", + "System.IO.FileSystem.DriveInfo": "(,4.3.32767]", + "System.IO.FileSystem.Primitives": "(,4.3.32767]", + "System.IO.FileSystem.Watcher": "(,4.3.32767]", + "System.IO.IsolatedStorage": "(,4.3.32767]", + "System.IO.MemoryMappedFiles": "(,4.3.32767]", + "System.IO.Pipelines": "(,10.0.32767]", + "System.IO.Pipes": "(,4.3.32767]", + "System.IO.Pipes.AccessControl": "(,5.0.32767]", + "System.IO.UnmanagedMemoryStream": "(,4.3.32767]", + "System.Linq": "(,4.3.32767]", + "System.Linq.AsyncEnumerable": "(,10.0.32767]", + "System.Linq.Expressions": "(,4.3.32767]", + "System.Linq.Parallel": "(,4.3.32767]", + "System.Linq.Queryable": "(,4.3.32767]", + "System.Memory": "(,5.0.32767]", + "System.Net.Http": "(,4.3.32767]", + "System.Net.Http.Json": "(,10.0.32767]", + "System.Net.NameResolution": "(,4.3.32767]", + "System.Net.NetworkInformation": "(,4.3.32767]", + "System.Net.Ping": "(,4.3.32767]", + "System.Net.Primitives": "(,4.3.32767]", + "System.Net.Requests": "(,4.3.32767]", + "System.Net.Security": "(,4.3.32767]", + "System.Net.ServerSentEvents": "(,10.0.32767]", + "System.Net.Sockets": "(,4.3.32767]", + "System.Net.WebHeaderCollection": "(,4.3.32767]", + "System.Net.WebSockets": "(,4.3.32767]", + "System.Net.WebSockets.Client": "(,4.3.32767]", + "System.Numerics.Vectors": "(,5.0.32767]", + "System.ObjectModel": "(,4.3.32767]", + "System.Private.DataContractSerialization": "(,4.3.32767]", + "System.Private.Uri": "(,4.3.32767]", + "System.Reflection": "(,4.3.32767]", + "System.Reflection.DispatchProxy": "(,6.0.32767]", + "System.Reflection.Emit": "(,4.7.32767]", + "System.Reflection.Emit.ILGeneration": "(,4.7.32767]", + "System.Reflection.Emit.Lightweight": "(,4.7.32767]", + "System.Reflection.Extensions": "(,4.3.32767]", + "System.Reflection.Metadata": "(,10.0.32767]", + "System.Reflection.Primitives": "(,4.3.32767]", + "System.Reflection.TypeExtensions": "(,4.3.32767]", + "System.Resources.Reader": "(,4.3.32767]", + "System.Resources.ResourceManager": "(,4.3.32767]", + "System.Resources.Writer": "(,4.3.32767]", + "System.Runtime": "(,4.3.32767]", + "System.Runtime.CompilerServices.Unsafe": "(,7.0.32767]", + "System.Runtime.CompilerServices.VisualC": "(,4.3.32767]", + "System.Runtime.Extensions": "(,4.3.32767]", + "System.Runtime.Handles": "(,4.3.32767]", + "System.Runtime.InteropServices": "(,4.3.32767]", + "System.Runtime.InteropServices.RuntimeInformation": "(,4.3.32767]", + "System.Runtime.Loader": "(,4.3.32767]", + "System.Runtime.Numerics": "(,4.3.32767]", + "System.Runtime.Serialization.Formatters": "(,4.3.32767]", + "System.Runtime.Serialization.Json": "(,4.3.32767]", + "System.Runtime.Serialization.Primitives": "(,4.3.32767]", + "System.Runtime.Serialization.Xml": "(,4.3.32767]", + "System.Security.AccessControl": "(,6.0.32767]", + "System.Security.Claims": "(,4.3.32767]", + "System.Security.Cryptography.Algorithms": "(,4.3.32767]", + "System.Security.Cryptography.Cng": "(,5.0.32767]", + "System.Security.Cryptography.Csp": "(,4.3.32767]", + "System.Security.Cryptography.Encoding": "(,4.3.32767]", + "System.Security.Cryptography.OpenSsl": "(,5.0.32767]", + "System.Security.Cryptography.Primitives": "(,4.3.32767]", + "System.Security.Cryptography.X509Certificates": "(,4.3.32767]", + "System.Security.Principal": "(,4.3.32767]", + "System.Security.Principal.Windows": "(,5.0.32767]", + "System.Security.SecureString": "(,4.3.32767]", + "System.Text.Encoding": "(,4.3.32767]", + "System.Text.Encoding.CodePages": "(,10.0.32767]", + "System.Text.Encoding.Extensions": "(,4.3.32767]", + "System.Text.Encodings.Web": "(,10.0.32767]", + "System.Text.Json": "(,10.0.32767]", + "System.Text.RegularExpressions": "(,4.3.32767]", + "System.Threading": "(,4.3.32767]", + "System.Threading.AccessControl": "(,10.0.32767]", + "System.Threading.Channels": "(,10.0.32767]", + "System.Threading.Overlapped": "(,4.3.32767]", + "System.Threading.Tasks": "(,4.3.32767]", + "System.Threading.Tasks.Dataflow": "(,10.0.32767]", + "System.Threading.Tasks.Extensions": "(,5.0.32767]", + "System.Threading.Tasks.Parallel": "(,4.3.32767]", + "System.Threading.Thread": "(,4.3.32767]", + "System.Threading.ThreadPool": "(,4.3.32767]", + "System.Threading.Timer": "(,4.3.32767]", + "System.ValueTuple": "(,4.5.32767]", + "System.Xml.ReaderWriter": "(,4.3.32767]", + "System.Xml.XDocument": "(,4.3.32767]", + "System.Xml.XmlDocument": "(,4.3.32767]", + "System.Xml.XmlSerializer": "(,4.3.32767]", + "System.Xml.XPath": "(,4.3.32767]", + "System.Xml.XPath.XDocument": "(,5.0.32767]" + } + } + } + } + } +} \ No newline at end of file diff --git a/csharp/.dotnet_temp/obj/temp_pi.csproj.nuget.g.props b/csharp/.dotnet_temp/obj/temp_pi.csproj.nuget.g.props new file mode 100644 index 0000000..7399b92 --- /dev/null +++ b/csharp/.dotnet_temp/obj/temp_pi.csproj.nuget.g.props @@ -0,0 +1,15 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + /Users/einand/.nuget/packages/ + /Users/einand/.nuget/packages/ + PackageReference + 7.0.0 + + + + + \ No newline at end of file diff --git a/csharp/.dotnet_temp/obj/temp_pi.csproj.nuget.g.targets b/csharp/.dotnet_temp/obj/temp_pi.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/csharp/.dotnet_temp/obj/temp_pi.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/csharp/.dotnet_temp/temp_pi.csproj b/csharp/.dotnet_temp/temp_pi.csproj new file mode 100644 index 0000000..ed9781c --- /dev/null +++ b/csharp/.dotnet_temp/temp_pi.csproj @@ -0,0 +1,10 @@ + + + + Exe + net10.0 + enable + enable + + + diff --git a/csharp/cmd/build.sh b/csharp/cmd/build.sh new file mode 100755 index 0000000..b027067 --- /dev/null +++ b/csharp/cmd/build.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# C# Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== C# Build ===" +echo "" + +# Kompilera C#-programmet +cd src +dotnet build -c Release + +if [ $? -eq 0 ]; then + # Hitta rätt .NET-version dynamiskt + DOTNET_VERSION=$(ls -1 bin/Release/ | grep -E '^net[0-9]+\.[0-9]+$' | head -1) + + echo "✓ Kompilering lyckades!" + echo "Binär: src/bin/Release/$DOTNET_VERSION/print_hej" + echo "" + echo "För att köra:" + echo " dotnet src/bin/Release/$DOTNET_VERSION/print_hej.dll [decimaler]" + + # Skapa wrapper script + mkdir -p ../bin + cat > ../bin/print_hej << EOF +#!/bin/bash +SCRIPT_DIR="\$(cd "\$(dirname "\$0")/.." && pwd)" +cd "\$SCRIPT_DIR" +dotnet src/bin/Release/$DOTNET_VERSION/print_hej.dll "\$@" +EOF + chmod +x ../bin/print_hej + echo "Wrapper script skapad: bin/print_hej" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/csharp/cmd/test.sh b/csharp/cmd/test.sh new file mode 100755 index 0000000..5c49094 --- /dev/null +++ b/csharp/cmd/test.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# C# Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== C# Pi-beräkning Unit Tester ===" +echo "" + +cd src +dotnet test + +exit $? \ No newline at end of file diff --git a/csharp/src/PiTests.cs b/csharp/src/PiTests.cs new file mode 100644 index 0000000..c016fdf --- /dev/null +++ b/csharp/src/PiTests.cs @@ -0,0 +1,78 @@ +using System; +using System.Diagnostics; +using Xunit; + +namespace PiTests +{ + public class PiTests + { + private const string ScriptPath = "/Users/einand/Code/test/csharp/print_hej"; + + private string RunScript(string args = null) + { + var startInfo = new ProcessStartInfo + { + FileName = ScriptPath, + Arguments = args ?? "", + RedirectStandardOutput = true, + UseShellExecute = false + }; + + using (var process = Process.Start(startInfo)) + { + var result = process.StandardOutput.ReadToEnd().Trim(); + process.WaitForExit(); + return result; + } + } + + [Fact] + public void Test10Decimals() + { + var result = RunScript("10"); + var expected = "3.1415926535"; + Assert.Equal(expected, result); + } + + [Fact] + public void Test5Decimals() + { + var result = RunScript("5"); + var expected = "3.14159"; + Assert.Equal(expected, result); + } + + [Fact] + public void Test1Decimal() + { + var result = RunScript("1"); + var expected = "3.1"; + Assert.Equal(expected, result); + } + + [Fact] + public void Test100Decimals() + { + var result = RunScript("100"); + var expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"; + Assert.Equal(expected, result); + } + + [Fact] + public void TestDefault100Decimals() + { + var result = RunScript(); + var expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"; + Assert.Equal(expected, result); + } + + [Fact] + public void Test10000Decimals() + { + var result = RunScript("10000"); + // Check length: "3." + 10000 digits = 10002 characters + Assert.Equal(10002, result.Length); + Assert.StartsWith("3.14159", result); + } + } +} \ No newline at end of file diff --git a/csharp/src/obj/Release/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.cs b/csharp/src/obj/Release/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.cs new file mode 100644 index 0000000..925b135 --- /dev/null +++ b/csharp/src/obj/Release/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v10.0", FrameworkDisplayName = ".NET 10.0")] diff --git a/csharp/src/obj/Release/net10.0/apphost b/csharp/src/obj/Release/net10.0/apphost new file mode 100755 index 0000000..e7c9739 Binary files /dev/null and b/csharp/src/obj/Release/net10.0/apphost differ diff --git a/csharp/src/obj/Release/net10.0/print_hej.AssemblyInfo.cs b/csharp/src/obj/Release/net10.0/print_hej.AssemblyInfo.cs new file mode 100644 index 0000000..1af6ba2 --- /dev/null +++ b/csharp/src/obj/Release/net10.0/print_hej.AssemblyInfo.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("print_hej")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("print_hej")] +[assembly: System.Reflection.AssemblyTitleAttribute("print_hej")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/csharp/src/obj/Release/net10.0/print_hej.AssemblyInfoInputs.cache b/csharp/src/obj/Release/net10.0/print_hej.AssemblyInfoInputs.cache new file mode 100644 index 0000000..9f3fffc --- /dev/null +++ b/csharp/src/obj/Release/net10.0/print_hej.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +9324562fecfe65b81ece195077e8b3a7cf0ee90cf8e00b3fecfede514b6ce9e8 diff --git a/csharp/src/obj/Release/net10.0/print_hej.GeneratedMSBuildEditorConfig.editorconfig b/csharp/src/obj/Release/net10.0/print_hej.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..3c669bb --- /dev/null +++ b/csharp/src/obj/Release/net10.0/print_hej.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,17 @@ +is_global = true +build_property.TargetFramework = net10.0 +build_property.TargetFrameworkIdentifier = .NETCoreApp +build_property.TargetFrameworkVersion = v10.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = print_hej +build_property.ProjectDir = /Users/einand/Code/test/csharp/src/ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.EffectiveAnalysisLevelStyle = 10.0 +build_property.EnableCodeStyleSeverity = diff --git a/csharp/src/obj/Release/net10.0/print_hej.GlobalUsings.g.cs b/csharp/src/obj/Release/net10.0/print_hej.GlobalUsings.g.cs new file mode 100644 index 0000000..d12bcbc --- /dev/null +++ b/csharp/src/obj/Release/net10.0/print_hej.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +global using System; +global using System.Collections.Generic; +global using System.IO; +global using System.Linq; +global using System.Net.Http; +global using System.Threading; +global using System.Threading.Tasks; diff --git a/csharp/src/obj/Release/net10.0/print_hej.assets.cache b/csharp/src/obj/Release/net10.0/print_hej.assets.cache new file mode 100644 index 0000000..014ef25 Binary files /dev/null and b/csharp/src/obj/Release/net10.0/print_hej.assets.cache differ diff --git a/csharp/src/obj/Release/net10.0/print_hej.csproj.CoreCompileInputs.cache b/csharp/src/obj/Release/net10.0/print_hej.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..68b86d4 --- /dev/null +++ b/csharp/src/obj/Release/net10.0/print_hej.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +722ece028348cdcaacef3b0cac3b83e003f567cf56fab18454f8fa25c624cd34 diff --git a/csharp/src/obj/Release/net10.0/print_hej.csproj.FileListAbsolute.txt b/csharp/src/obj/Release/net10.0/print_hej.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..b2d575f --- /dev/null +++ b/csharp/src/obj/Release/net10.0/print_hej.csproj.FileListAbsolute.txt @@ -0,0 +1,14 @@ +/Users/einand/Code/test/csharp/src/bin/Release/net10.0/print_hej +/Users/einand/Code/test/csharp/src/bin/Release/net10.0/print_hej.deps.json +/Users/einand/Code/test/csharp/src/bin/Release/net10.0/print_hej.runtimeconfig.json +/Users/einand/Code/test/csharp/src/bin/Release/net10.0/print_hej.dll +/Users/einand/Code/test/csharp/src/bin/Release/net10.0/print_hej.pdb +/Users/einand/Code/test/csharp/src/obj/Release/net10.0/print_hej.GeneratedMSBuildEditorConfig.editorconfig +/Users/einand/Code/test/csharp/src/obj/Release/net10.0/print_hej.AssemblyInfoInputs.cache +/Users/einand/Code/test/csharp/src/obj/Release/net10.0/print_hej.AssemblyInfo.cs +/Users/einand/Code/test/csharp/src/obj/Release/net10.0/print_hej.csproj.CoreCompileInputs.cache +/Users/einand/Code/test/csharp/src/obj/Release/net10.0/print_hej.dll +/Users/einand/Code/test/csharp/src/obj/Release/net10.0/refint/print_hej.dll +/Users/einand/Code/test/csharp/src/obj/Release/net10.0/print_hej.pdb +/Users/einand/Code/test/csharp/src/obj/Release/net10.0/print_hej.genruntimeconfig.cache +/Users/einand/Code/test/csharp/src/obj/Release/net10.0/ref/print_hej.dll diff --git a/csharp/src/obj/Release/net10.0/print_hej.dll b/csharp/src/obj/Release/net10.0/print_hej.dll new file mode 100644 index 0000000..7988b14 Binary files /dev/null and b/csharp/src/obj/Release/net10.0/print_hej.dll differ diff --git a/csharp/src/obj/Release/net10.0/print_hej.genruntimeconfig.cache b/csharp/src/obj/Release/net10.0/print_hej.genruntimeconfig.cache new file mode 100644 index 0000000..22f0bdb --- /dev/null +++ b/csharp/src/obj/Release/net10.0/print_hej.genruntimeconfig.cache @@ -0,0 +1 @@ +1a2a5bb55fd68dc9c521cac37bb8cd66c27940836461e83744d9937fa2fdf49f diff --git a/csharp/src/obj/Release/net10.0/print_hej.pdb b/csharp/src/obj/Release/net10.0/print_hej.pdb new file mode 100644 index 0000000..eb3b977 Binary files /dev/null and b/csharp/src/obj/Release/net10.0/print_hej.pdb differ diff --git a/csharp/src/obj/Release/net10.0/ref/print_hej.dll b/csharp/src/obj/Release/net10.0/ref/print_hej.dll new file mode 100644 index 0000000..1cca2a8 Binary files /dev/null and b/csharp/src/obj/Release/net10.0/ref/print_hej.dll differ diff --git a/csharp/src/obj/Release/net10.0/refint/print_hej.dll b/csharp/src/obj/Release/net10.0/refint/print_hej.dll new file mode 100644 index 0000000..1cca2a8 Binary files /dev/null and b/csharp/src/obj/Release/net10.0/refint/print_hej.dll differ diff --git a/csharp/src/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs b/csharp/src/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs new file mode 100644 index 0000000..2217181 --- /dev/null +++ b/csharp/src/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")] diff --git a/csharp/src/obj/Release/net8.0/apphost b/csharp/src/obj/Release/net8.0/apphost new file mode 100755 index 0000000..df8e23c Binary files /dev/null and b/csharp/src/obj/Release/net8.0/apphost differ diff --git a/csharp/src/obj/Release/net8.0/print_hej.AssemblyInfo.cs b/csharp/src/obj/Release/net8.0/print_hej.AssemblyInfo.cs new file mode 100644 index 0000000..1af6ba2 --- /dev/null +++ b/csharp/src/obj/Release/net8.0/print_hej.AssemblyInfo.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("print_hej")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("print_hej")] +[assembly: System.Reflection.AssemblyTitleAttribute("print_hej")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/csharp/src/obj/Release/net8.0/print_hej.AssemblyInfoInputs.cache b/csharp/src/obj/Release/net8.0/print_hej.AssemblyInfoInputs.cache new file mode 100644 index 0000000..9f3fffc --- /dev/null +++ b/csharp/src/obj/Release/net8.0/print_hej.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +9324562fecfe65b81ece195077e8b3a7cf0ee90cf8e00b3fecfede514b6ce9e8 diff --git a/csharp/src/obj/Release/net8.0/print_hej.GeneratedMSBuildEditorConfig.editorconfig b/csharp/src/obj/Release/net8.0/print_hej.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..f88135b --- /dev/null +++ b/csharp/src/obj/Release/net8.0/print_hej.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,17 @@ +is_global = true +build_property.TargetFramework = net8.0 +build_property.TargetFrameworkIdentifier = .NETCoreApp +build_property.TargetFrameworkVersion = v8.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = print_hej +build_property.ProjectDir = /Users/einand/Code/test/csharp/src/ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.EffectiveAnalysisLevelStyle = 8.0 +build_property.EnableCodeStyleSeverity = diff --git a/csharp/src/obj/Release/net8.0/print_hej.GlobalUsings.g.cs b/csharp/src/obj/Release/net8.0/print_hej.GlobalUsings.g.cs new file mode 100644 index 0000000..d12bcbc --- /dev/null +++ b/csharp/src/obj/Release/net8.0/print_hej.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +global using System; +global using System.Collections.Generic; +global using System.IO; +global using System.Linq; +global using System.Net.Http; +global using System.Threading; +global using System.Threading.Tasks; diff --git a/csharp/src/obj/Release/net8.0/print_hej.assets.cache b/csharp/src/obj/Release/net8.0/print_hej.assets.cache new file mode 100644 index 0000000..4249bbd Binary files /dev/null and b/csharp/src/obj/Release/net8.0/print_hej.assets.cache differ diff --git a/csharp/src/obj/Release/net8.0/print_hej.csproj.CoreCompileInputs.cache b/csharp/src/obj/Release/net8.0/print_hej.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..050d637 --- /dev/null +++ b/csharp/src/obj/Release/net8.0/print_hej.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +a49e4a6d2ede054e259f4eef033e52c3042e8420e08014fa82e52040200d1535 diff --git a/csharp/src/obj/Release/net8.0/print_hej.csproj.FileListAbsolute.txt b/csharp/src/obj/Release/net8.0/print_hej.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..ef9bc69 --- /dev/null +++ b/csharp/src/obj/Release/net8.0/print_hej.csproj.FileListAbsolute.txt @@ -0,0 +1,14 @@ +/Users/einand/Code/test/csharp/src/obj/Release/net8.0/print_hej.GeneratedMSBuildEditorConfig.editorconfig +/Users/einand/Code/test/csharp/src/obj/Release/net8.0/print_hej.AssemblyInfoInputs.cache +/Users/einand/Code/test/csharp/src/obj/Release/net8.0/print_hej.AssemblyInfo.cs +/Users/einand/Code/test/csharp/src/obj/Release/net8.0/print_hej.csproj.CoreCompileInputs.cache +/Users/einand/Code/test/csharp/src/bin/Release/net8.0/print_hej +/Users/einand/Code/test/csharp/src/bin/Release/net8.0/print_hej.deps.json +/Users/einand/Code/test/csharp/src/bin/Release/net8.0/print_hej.runtimeconfig.json +/Users/einand/Code/test/csharp/src/bin/Release/net8.0/print_hej.dll +/Users/einand/Code/test/csharp/src/bin/Release/net8.0/print_hej.pdb +/Users/einand/Code/test/csharp/src/obj/Release/net8.0/print_hej.dll +/Users/einand/Code/test/csharp/src/obj/Release/net8.0/refint/print_hej.dll +/Users/einand/Code/test/csharp/src/obj/Release/net8.0/print_hej.pdb +/Users/einand/Code/test/csharp/src/obj/Release/net8.0/print_hej.genruntimeconfig.cache +/Users/einand/Code/test/csharp/src/obj/Release/net8.0/ref/print_hej.dll diff --git a/csharp/src/obj/Release/net8.0/print_hej.dll b/csharp/src/obj/Release/net8.0/print_hej.dll new file mode 100644 index 0000000..5aaffe5 Binary files /dev/null and b/csharp/src/obj/Release/net8.0/print_hej.dll differ diff --git a/csharp/src/obj/Release/net8.0/print_hej.genruntimeconfig.cache b/csharp/src/obj/Release/net8.0/print_hej.genruntimeconfig.cache new file mode 100644 index 0000000..d315a92 --- /dev/null +++ b/csharp/src/obj/Release/net8.0/print_hej.genruntimeconfig.cache @@ -0,0 +1 @@ +17977dba7d1c495f6863b0c77a609caad66c01dc9fef6eaa098cae6902184a5a diff --git a/csharp/src/obj/Release/net8.0/print_hej.pdb b/csharp/src/obj/Release/net8.0/print_hej.pdb new file mode 100644 index 0000000..fa4fa7d Binary files /dev/null and b/csharp/src/obj/Release/net8.0/print_hej.pdb differ diff --git a/csharp/src/obj/Release/net8.0/ref/print_hej.dll b/csharp/src/obj/Release/net8.0/ref/print_hej.dll new file mode 100644 index 0000000..48a6e3c Binary files /dev/null and b/csharp/src/obj/Release/net8.0/ref/print_hej.dll differ diff --git a/csharp/src/obj/Release/net8.0/refint/print_hej.dll b/csharp/src/obj/Release/net8.0/refint/print_hej.dll new file mode 100644 index 0000000..48a6e3c Binary files /dev/null and b/csharp/src/obj/Release/net8.0/refint/print_hej.dll differ diff --git a/csharp/src/obj/print_hej.csproj.nuget.dgspec.json b/csharp/src/obj/print_hej.csproj.nuget.dgspec.json new file mode 100644 index 0000000..edc3eb2 --- /dev/null +++ b/csharp/src/obj/print_hej.csproj.nuget.dgspec.json @@ -0,0 +1,341 @@ +{ + "format": 1, + "restore": { + "/Users/einand/Code/test/csharp/src/print_hej.csproj": {} + }, + "projects": { + "/Users/einand/Code/test/csharp/src/print_hej.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "/Users/einand/Code/test/csharp/src/print_hej.csproj", + "projectName": "print_hej", + "projectPath": "/Users/einand/Code/test/csharp/src/print_hej.csproj", + "packagesPath": "/Users/einand/.nuget/packages/", + "outputPath": "/Users/einand/Code/test/csharp/src/obj/", + "projectStyle": "PackageReference", + "configFilePaths": [ + "/Users/einand/.nuget/NuGet/NuGet.Config" + ], + "originalTargetFrameworks": [ + "net10.0" + ], + "sources": { + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net10.0": { + "targetAlias": "net10.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "10.0.200" + }, + "frameworks": { + "net10.0": { + "targetAlias": "net10.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/10.0.203/PortableRuntimeIdentifierGraph.json", + "packagesToPrune": { + "Microsoft.CSharp": "(,4.7.32767]", + "Microsoft.VisualBasic": "(,10.4.32767]", + "Microsoft.Win32.Primitives": "(,4.3.32767]", + "Microsoft.Win32.Registry": "(,5.0.32767]", + "runtime.any.System.Collections": "(,4.3.32767]", + "runtime.any.System.Diagnostics.Tools": "(,4.3.32767]", + "runtime.any.System.Diagnostics.Tracing": "(,4.3.32767]", + "runtime.any.System.Globalization": "(,4.3.32767]", + "runtime.any.System.Globalization.Calendars": "(,4.3.32767]", + "runtime.any.System.IO": "(,4.3.32767]", + "runtime.any.System.Reflection": "(,4.3.32767]", + "runtime.any.System.Reflection.Extensions": "(,4.3.32767]", + "runtime.any.System.Reflection.Primitives": "(,4.3.32767]", + "runtime.any.System.Resources.ResourceManager": "(,4.3.32767]", + "runtime.any.System.Runtime": "(,4.3.32767]", + "runtime.any.System.Runtime.Handles": "(,4.3.32767]", + "runtime.any.System.Runtime.InteropServices": "(,4.3.32767]", + "runtime.any.System.Text.Encoding": "(,4.3.32767]", + "runtime.any.System.Text.Encoding.Extensions": "(,4.3.32767]", + "runtime.any.System.Threading.Tasks": "(,4.3.32767]", + "runtime.any.System.Threading.Timer": "(,4.3.32767]", + "runtime.aot.System.Collections": "(,4.3.32767]", + "runtime.aot.System.Diagnostics.Tools": "(,4.3.32767]", + "runtime.aot.System.Diagnostics.Tracing": "(,4.3.32767]", + "runtime.aot.System.Globalization": "(,4.3.32767]", + "runtime.aot.System.Globalization.Calendars": "(,4.3.32767]", + "runtime.aot.System.IO": "(,4.3.32767]", + "runtime.aot.System.Reflection": "(,4.3.32767]", + "runtime.aot.System.Reflection.Extensions": "(,4.3.32767]", + "runtime.aot.System.Reflection.Primitives": "(,4.3.32767]", + "runtime.aot.System.Resources.ResourceManager": "(,4.3.32767]", + "runtime.aot.System.Runtime": "(,4.3.32767]", + "runtime.aot.System.Runtime.Handles": "(,4.3.32767]", + "runtime.aot.System.Runtime.InteropServices": "(,4.3.32767]", + "runtime.aot.System.Text.Encoding": "(,4.3.32767]", + "runtime.aot.System.Text.Encoding.Extensions": "(,4.3.32767]", + "runtime.aot.System.Threading.Tasks": "(,4.3.32767]", + "runtime.aot.System.Threading.Timer": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.unix.Microsoft.Win32.Primitives": "(,4.3.32767]", + "runtime.unix.System.Console": "(,4.3.32767]", + "runtime.unix.System.Diagnostics.Debug": "(,4.3.32767]", + "runtime.unix.System.IO.FileSystem": "(,4.3.32767]", + "runtime.unix.System.Net.Primitives": "(,4.3.32767]", + "runtime.unix.System.Net.Sockets": "(,4.3.32767]", + "runtime.unix.System.Private.Uri": "(,4.3.32767]", + "runtime.unix.System.Runtime.Extensions": "(,4.3.32767]", + "runtime.win.Microsoft.Win32.Primitives": "(,4.3.32767]", + "runtime.win.System.Console": "(,4.3.32767]", + "runtime.win.System.Diagnostics.Debug": "(,4.3.32767]", + "runtime.win.System.IO.FileSystem": "(,4.3.32767]", + "runtime.win.System.Net.Primitives": "(,4.3.32767]", + "runtime.win.System.Net.Sockets": "(,4.3.32767]", + "runtime.win.System.Runtime.Extensions": "(,4.3.32767]", + "runtime.win10-arm-aot.runtime.native.System.IO.Compression": "(,4.0.32767]", + "runtime.win10-arm64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.win10-x64-aot.runtime.native.System.IO.Compression": "(,4.0.32767]", + "runtime.win10-x86-aot.runtime.native.System.IO.Compression": "(,4.0.32767]", + "runtime.win7-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.win7-x86.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.win7.System.Private.Uri": "(,4.3.32767]", + "runtime.win8-arm.runtime.native.System.IO.Compression": "(,4.3.32767]", + "System.AppContext": "(,4.3.32767]", + "System.Buffers": "(,5.0.32767]", + "System.Collections": "(,4.3.32767]", + "System.Collections.Concurrent": "(,4.3.32767]", + "System.Collections.Immutable": "(,10.0.32767]", + "System.Collections.NonGeneric": "(,4.3.32767]", + "System.Collections.Specialized": "(,4.3.32767]", + "System.ComponentModel": "(,4.3.32767]", + "System.ComponentModel.Annotations": "(,4.3.32767]", + "System.ComponentModel.EventBasedAsync": "(,4.3.32767]", + "System.ComponentModel.Primitives": "(,4.3.32767]", + "System.ComponentModel.TypeConverter": "(,4.3.32767]", + "System.Console": "(,4.3.32767]", + "System.Data.Common": "(,4.3.32767]", + "System.Data.DataSetExtensions": "(,4.4.32767]", + "System.Diagnostics.Contracts": "(,4.3.32767]", + "System.Diagnostics.Debug": "(,4.3.32767]", + "System.Diagnostics.DiagnosticSource": "(,10.0.32767]", + "System.Diagnostics.FileVersionInfo": "(,4.3.32767]", + "System.Diagnostics.Process": "(,4.3.32767]", + "System.Diagnostics.StackTrace": "(,4.3.32767]", + "System.Diagnostics.TextWriterTraceListener": "(,4.3.32767]", + "System.Diagnostics.Tools": "(,4.3.32767]", + "System.Diagnostics.TraceSource": "(,4.3.32767]", + "System.Diagnostics.Tracing": "(,4.3.32767]", + "System.Drawing.Primitives": "(,4.3.32767]", + "System.Dynamic.Runtime": "(,4.3.32767]", + "System.Formats.Asn1": "(,10.0.32767]", + "System.Formats.Tar": "(,10.0.32767]", + "System.Globalization": "(,4.3.32767]", + "System.Globalization.Calendars": "(,4.3.32767]", + "System.Globalization.Extensions": "(,4.3.32767]", + "System.IO": "(,4.3.32767]", + "System.IO.Compression": "(,4.3.32767]", + "System.IO.Compression.ZipFile": "(,4.3.32767]", + "System.IO.FileSystem": "(,4.3.32767]", + "System.IO.FileSystem.AccessControl": "(,4.4.32767]", + "System.IO.FileSystem.DriveInfo": "(,4.3.32767]", + "System.IO.FileSystem.Primitives": "(,4.3.32767]", + "System.IO.FileSystem.Watcher": "(,4.3.32767]", + "System.IO.IsolatedStorage": "(,4.3.32767]", + "System.IO.MemoryMappedFiles": "(,4.3.32767]", + "System.IO.Pipelines": "(,10.0.32767]", + "System.IO.Pipes": "(,4.3.32767]", + "System.IO.Pipes.AccessControl": "(,5.0.32767]", + "System.IO.UnmanagedMemoryStream": "(,4.3.32767]", + "System.Linq": "(,4.3.32767]", + "System.Linq.AsyncEnumerable": "(,10.0.32767]", + "System.Linq.Expressions": "(,4.3.32767]", + "System.Linq.Parallel": "(,4.3.32767]", + "System.Linq.Queryable": "(,4.3.32767]", + "System.Memory": "(,5.0.32767]", + "System.Net.Http": "(,4.3.32767]", + "System.Net.Http.Json": "(,10.0.32767]", + "System.Net.NameResolution": "(,4.3.32767]", + "System.Net.NetworkInformation": "(,4.3.32767]", + "System.Net.Ping": "(,4.3.32767]", + "System.Net.Primitives": "(,4.3.32767]", + "System.Net.Requests": "(,4.3.32767]", + "System.Net.Security": "(,4.3.32767]", + "System.Net.ServerSentEvents": "(,10.0.32767]", + "System.Net.Sockets": "(,4.3.32767]", + "System.Net.WebHeaderCollection": "(,4.3.32767]", + "System.Net.WebSockets": "(,4.3.32767]", + "System.Net.WebSockets.Client": "(,4.3.32767]", + "System.Numerics.Vectors": "(,5.0.32767]", + "System.ObjectModel": "(,4.3.32767]", + "System.Private.DataContractSerialization": "(,4.3.32767]", + "System.Private.Uri": "(,4.3.32767]", + "System.Reflection": "(,4.3.32767]", + "System.Reflection.DispatchProxy": "(,6.0.32767]", + "System.Reflection.Emit": "(,4.7.32767]", + "System.Reflection.Emit.ILGeneration": "(,4.7.32767]", + "System.Reflection.Emit.Lightweight": "(,4.7.32767]", + "System.Reflection.Extensions": "(,4.3.32767]", + "System.Reflection.Metadata": "(,10.0.32767]", + "System.Reflection.Primitives": "(,4.3.32767]", + "System.Reflection.TypeExtensions": "(,4.3.32767]", + "System.Resources.Reader": "(,4.3.32767]", + "System.Resources.ResourceManager": "(,4.3.32767]", + "System.Resources.Writer": "(,4.3.32767]", + "System.Runtime": "(,4.3.32767]", + "System.Runtime.CompilerServices.Unsafe": "(,7.0.32767]", + "System.Runtime.CompilerServices.VisualC": "(,4.3.32767]", + "System.Runtime.Extensions": "(,4.3.32767]", + "System.Runtime.Handles": "(,4.3.32767]", + "System.Runtime.InteropServices": "(,4.3.32767]", + "System.Runtime.InteropServices.RuntimeInformation": "(,4.3.32767]", + "System.Runtime.Loader": "(,4.3.32767]", + "System.Runtime.Numerics": "(,4.3.32767]", + "System.Runtime.Serialization.Formatters": "(,4.3.32767]", + "System.Runtime.Serialization.Json": "(,4.3.32767]", + "System.Runtime.Serialization.Primitives": "(,4.3.32767]", + "System.Runtime.Serialization.Xml": "(,4.3.32767]", + "System.Security.AccessControl": "(,6.0.32767]", + "System.Security.Claims": "(,4.3.32767]", + "System.Security.Cryptography.Algorithms": "(,4.3.32767]", + "System.Security.Cryptography.Cng": "(,5.0.32767]", + "System.Security.Cryptography.Csp": "(,4.3.32767]", + "System.Security.Cryptography.Encoding": "(,4.3.32767]", + "System.Security.Cryptography.OpenSsl": "(,5.0.32767]", + "System.Security.Cryptography.Primitives": "(,4.3.32767]", + "System.Security.Cryptography.X509Certificates": "(,4.3.32767]", + "System.Security.Principal": "(,4.3.32767]", + "System.Security.Principal.Windows": "(,5.0.32767]", + "System.Security.SecureString": "(,4.3.32767]", + "System.Text.Encoding": "(,4.3.32767]", + "System.Text.Encoding.CodePages": "(,10.0.32767]", + "System.Text.Encoding.Extensions": "(,4.3.32767]", + "System.Text.Encodings.Web": "(,10.0.32767]", + "System.Text.Json": "(,10.0.32767]", + "System.Text.RegularExpressions": "(,4.3.32767]", + "System.Threading": "(,4.3.32767]", + "System.Threading.AccessControl": "(,10.0.32767]", + "System.Threading.Channels": "(,10.0.32767]", + "System.Threading.Overlapped": "(,4.3.32767]", + "System.Threading.Tasks": "(,4.3.32767]", + "System.Threading.Tasks.Dataflow": "(,10.0.32767]", + "System.Threading.Tasks.Extensions": "(,5.0.32767]", + "System.Threading.Tasks.Parallel": "(,4.3.32767]", + "System.Threading.Thread": "(,4.3.32767]", + "System.Threading.ThreadPool": "(,4.3.32767]", + "System.Threading.Timer": "(,4.3.32767]", + "System.ValueTuple": "(,4.5.32767]", + "System.Xml.ReaderWriter": "(,4.3.32767]", + "System.Xml.XDocument": "(,4.3.32767]", + "System.Xml.XmlDocument": "(,4.3.32767]", + "System.Xml.XmlSerializer": "(,4.3.32767]", + "System.Xml.XPath": "(,4.3.32767]", + "System.Xml.XPath.XDocument": "(,5.0.32767]" + } + } + } + } + } +} \ No newline at end of file diff --git a/csharp/src/obj/print_hej.csproj.nuget.g.props b/csharp/src/obj/print_hej.csproj.nuget.g.props new file mode 100644 index 0000000..7399b92 --- /dev/null +++ b/csharp/src/obj/print_hej.csproj.nuget.g.props @@ -0,0 +1,15 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + /Users/einand/.nuget/packages/ + /Users/einand/.nuget/packages/ + PackageReference + 7.0.0 + + + + + \ No newline at end of file diff --git a/csharp/src/obj/print_hej.csproj.nuget.g.targets b/csharp/src/obj/print_hej.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/csharp/src/obj/print_hej.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/csharp/src/obj/project.assets.json b/csharp/src/obj/project.assets.json new file mode 100644 index 0000000..1a0b11e --- /dev/null +++ b/csharp/src/obj/project.assets.json @@ -0,0 +1,346 @@ +{ + "version": 3, + "targets": { + "net10.0": {} + }, + "libraries": {}, + "projectFileDependencyGroups": { + "net10.0": [] + }, + "packageFolders": { + "/Users/einand/.nuget/packages/": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "/Users/einand/Code/test/csharp/src/print_hej.csproj", + "projectName": "print_hej", + "projectPath": "/Users/einand/Code/test/csharp/src/print_hej.csproj", + "packagesPath": "/Users/einand/.nuget/packages/", + "outputPath": "/Users/einand/Code/test/csharp/src/obj/", + "projectStyle": "PackageReference", + "configFilePaths": [ + "/Users/einand/.nuget/NuGet/NuGet.Config" + ], + "originalTargetFrameworks": [ + "net10.0" + ], + "sources": { + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net10.0": { + "targetAlias": "net10.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "10.0.200" + }, + "frameworks": { + "net10.0": { + "targetAlias": "net10.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/10.0.203/PortableRuntimeIdentifierGraph.json", + "packagesToPrune": { + "Microsoft.CSharp": "(,4.7.32767]", + "Microsoft.VisualBasic": "(,10.4.32767]", + "Microsoft.Win32.Primitives": "(,4.3.32767]", + "Microsoft.Win32.Registry": "(,5.0.32767]", + "runtime.any.System.Collections": "(,4.3.32767]", + "runtime.any.System.Diagnostics.Tools": "(,4.3.32767]", + "runtime.any.System.Diagnostics.Tracing": "(,4.3.32767]", + "runtime.any.System.Globalization": "(,4.3.32767]", + "runtime.any.System.Globalization.Calendars": "(,4.3.32767]", + "runtime.any.System.IO": "(,4.3.32767]", + "runtime.any.System.Reflection": "(,4.3.32767]", + "runtime.any.System.Reflection.Extensions": "(,4.3.32767]", + "runtime.any.System.Reflection.Primitives": "(,4.3.32767]", + "runtime.any.System.Resources.ResourceManager": "(,4.3.32767]", + "runtime.any.System.Runtime": "(,4.3.32767]", + "runtime.any.System.Runtime.Handles": "(,4.3.32767]", + "runtime.any.System.Runtime.InteropServices": "(,4.3.32767]", + "runtime.any.System.Text.Encoding": "(,4.3.32767]", + "runtime.any.System.Text.Encoding.Extensions": "(,4.3.32767]", + "runtime.any.System.Threading.Tasks": "(,4.3.32767]", + "runtime.any.System.Threading.Timer": "(,4.3.32767]", + "runtime.aot.System.Collections": "(,4.3.32767]", + "runtime.aot.System.Diagnostics.Tools": "(,4.3.32767]", + "runtime.aot.System.Diagnostics.Tracing": "(,4.3.32767]", + "runtime.aot.System.Globalization": "(,4.3.32767]", + "runtime.aot.System.Globalization.Calendars": "(,4.3.32767]", + "runtime.aot.System.IO": "(,4.3.32767]", + "runtime.aot.System.Reflection": "(,4.3.32767]", + "runtime.aot.System.Reflection.Extensions": "(,4.3.32767]", + "runtime.aot.System.Reflection.Primitives": "(,4.3.32767]", + "runtime.aot.System.Resources.ResourceManager": "(,4.3.32767]", + "runtime.aot.System.Runtime": "(,4.3.32767]", + "runtime.aot.System.Runtime.Handles": "(,4.3.32767]", + "runtime.aot.System.Runtime.InteropServices": "(,4.3.32767]", + "runtime.aot.System.Text.Encoding": "(,4.3.32767]", + "runtime.aot.System.Text.Encoding.Extensions": "(,4.3.32767]", + "runtime.aot.System.Threading.Tasks": "(,4.3.32767]", + "runtime.aot.System.Threading.Timer": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.debian.9-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.27-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.fedora.28-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.opensuse.42.3-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "(,4.3.32767]", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography": "(,4.3.32767]", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System.Net.Http": "(,4.3.32767]", + "runtime.ubuntu.18.04-x64.runtime.native.System.Net.Security": "(,4.3.32767]", + "runtime.unix.Microsoft.Win32.Primitives": "(,4.3.32767]", + "runtime.unix.System.Console": "(,4.3.32767]", + "runtime.unix.System.Diagnostics.Debug": "(,4.3.32767]", + "runtime.unix.System.IO.FileSystem": "(,4.3.32767]", + "runtime.unix.System.Net.Primitives": "(,4.3.32767]", + "runtime.unix.System.Net.Sockets": "(,4.3.32767]", + "runtime.unix.System.Private.Uri": "(,4.3.32767]", + "runtime.unix.System.Runtime.Extensions": "(,4.3.32767]", + "runtime.win.Microsoft.Win32.Primitives": "(,4.3.32767]", + "runtime.win.System.Console": "(,4.3.32767]", + "runtime.win.System.Diagnostics.Debug": "(,4.3.32767]", + "runtime.win.System.IO.FileSystem": "(,4.3.32767]", + "runtime.win.System.Net.Primitives": "(,4.3.32767]", + "runtime.win.System.Net.Sockets": "(,4.3.32767]", + "runtime.win.System.Runtime.Extensions": "(,4.3.32767]", + "runtime.win10-arm-aot.runtime.native.System.IO.Compression": "(,4.0.32767]", + "runtime.win10-arm64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.win10-x64-aot.runtime.native.System.IO.Compression": "(,4.0.32767]", + "runtime.win10-x86-aot.runtime.native.System.IO.Compression": "(,4.0.32767]", + "runtime.win7-x64.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.win7-x86.runtime.native.System.IO.Compression": "(,4.3.32767]", + "runtime.win7.System.Private.Uri": "(,4.3.32767]", + "runtime.win8-arm.runtime.native.System.IO.Compression": "(,4.3.32767]", + "System.AppContext": "(,4.3.32767]", + "System.Buffers": "(,5.0.32767]", + "System.Collections": "(,4.3.32767]", + "System.Collections.Concurrent": "(,4.3.32767]", + "System.Collections.Immutable": "(,10.0.32767]", + "System.Collections.NonGeneric": "(,4.3.32767]", + "System.Collections.Specialized": "(,4.3.32767]", + "System.ComponentModel": "(,4.3.32767]", + "System.ComponentModel.Annotations": "(,4.3.32767]", + "System.ComponentModel.EventBasedAsync": "(,4.3.32767]", + "System.ComponentModel.Primitives": "(,4.3.32767]", + "System.ComponentModel.TypeConverter": "(,4.3.32767]", + "System.Console": "(,4.3.32767]", + "System.Data.Common": "(,4.3.32767]", + "System.Data.DataSetExtensions": "(,4.4.32767]", + "System.Diagnostics.Contracts": "(,4.3.32767]", + "System.Diagnostics.Debug": "(,4.3.32767]", + "System.Diagnostics.DiagnosticSource": "(,10.0.32767]", + "System.Diagnostics.FileVersionInfo": "(,4.3.32767]", + "System.Diagnostics.Process": "(,4.3.32767]", + "System.Diagnostics.StackTrace": "(,4.3.32767]", + "System.Diagnostics.TextWriterTraceListener": "(,4.3.32767]", + "System.Diagnostics.Tools": "(,4.3.32767]", + "System.Diagnostics.TraceSource": "(,4.3.32767]", + "System.Diagnostics.Tracing": "(,4.3.32767]", + "System.Drawing.Primitives": "(,4.3.32767]", + "System.Dynamic.Runtime": "(,4.3.32767]", + "System.Formats.Asn1": "(,10.0.32767]", + "System.Formats.Tar": "(,10.0.32767]", + "System.Globalization": "(,4.3.32767]", + "System.Globalization.Calendars": "(,4.3.32767]", + "System.Globalization.Extensions": "(,4.3.32767]", + "System.IO": "(,4.3.32767]", + "System.IO.Compression": "(,4.3.32767]", + "System.IO.Compression.ZipFile": "(,4.3.32767]", + "System.IO.FileSystem": "(,4.3.32767]", + "System.IO.FileSystem.AccessControl": "(,4.4.32767]", + "System.IO.FileSystem.DriveInfo": "(,4.3.32767]", + "System.IO.FileSystem.Primitives": "(,4.3.32767]", + "System.IO.FileSystem.Watcher": "(,4.3.32767]", + "System.IO.IsolatedStorage": "(,4.3.32767]", + "System.IO.MemoryMappedFiles": "(,4.3.32767]", + "System.IO.Pipelines": "(,10.0.32767]", + "System.IO.Pipes": "(,4.3.32767]", + "System.IO.Pipes.AccessControl": "(,5.0.32767]", + "System.IO.UnmanagedMemoryStream": "(,4.3.32767]", + "System.Linq": "(,4.3.32767]", + "System.Linq.AsyncEnumerable": "(,10.0.32767]", + "System.Linq.Expressions": "(,4.3.32767]", + "System.Linq.Parallel": "(,4.3.32767]", + "System.Linq.Queryable": "(,4.3.32767]", + "System.Memory": "(,5.0.32767]", + "System.Net.Http": "(,4.3.32767]", + "System.Net.Http.Json": "(,10.0.32767]", + "System.Net.NameResolution": "(,4.3.32767]", + "System.Net.NetworkInformation": "(,4.3.32767]", + "System.Net.Ping": "(,4.3.32767]", + "System.Net.Primitives": "(,4.3.32767]", + "System.Net.Requests": "(,4.3.32767]", + "System.Net.Security": "(,4.3.32767]", + "System.Net.ServerSentEvents": "(,10.0.32767]", + "System.Net.Sockets": "(,4.3.32767]", + "System.Net.WebHeaderCollection": "(,4.3.32767]", + "System.Net.WebSockets": "(,4.3.32767]", + "System.Net.WebSockets.Client": "(,4.3.32767]", + "System.Numerics.Vectors": "(,5.0.32767]", + "System.ObjectModel": "(,4.3.32767]", + "System.Private.DataContractSerialization": "(,4.3.32767]", + "System.Private.Uri": "(,4.3.32767]", + "System.Reflection": "(,4.3.32767]", + "System.Reflection.DispatchProxy": "(,6.0.32767]", + "System.Reflection.Emit": "(,4.7.32767]", + "System.Reflection.Emit.ILGeneration": "(,4.7.32767]", + "System.Reflection.Emit.Lightweight": "(,4.7.32767]", + "System.Reflection.Extensions": "(,4.3.32767]", + "System.Reflection.Metadata": "(,10.0.32767]", + "System.Reflection.Primitives": "(,4.3.32767]", + "System.Reflection.TypeExtensions": "(,4.3.32767]", + "System.Resources.Reader": "(,4.3.32767]", + "System.Resources.ResourceManager": "(,4.3.32767]", + "System.Resources.Writer": "(,4.3.32767]", + "System.Runtime": "(,4.3.32767]", + "System.Runtime.CompilerServices.Unsafe": "(,7.0.32767]", + "System.Runtime.CompilerServices.VisualC": "(,4.3.32767]", + "System.Runtime.Extensions": "(,4.3.32767]", + "System.Runtime.Handles": "(,4.3.32767]", + "System.Runtime.InteropServices": "(,4.3.32767]", + "System.Runtime.InteropServices.RuntimeInformation": "(,4.3.32767]", + "System.Runtime.Loader": "(,4.3.32767]", + "System.Runtime.Numerics": "(,4.3.32767]", + "System.Runtime.Serialization.Formatters": "(,4.3.32767]", + "System.Runtime.Serialization.Json": "(,4.3.32767]", + "System.Runtime.Serialization.Primitives": "(,4.3.32767]", + "System.Runtime.Serialization.Xml": "(,4.3.32767]", + "System.Security.AccessControl": "(,6.0.32767]", + "System.Security.Claims": "(,4.3.32767]", + "System.Security.Cryptography.Algorithms": "(,4.3.32767]", + "System.Security.Cryptography.Cng": "(,5.0.32767]", + "System.Security.Cryptography.Csp": "(,4.3.32767]", + "System.Security.Cryptography.Encoding": "(,4.3.32767]", + "System.Security.Cryptography.OpenSsl": "(,5.0.32767]", + "System.Security.Cryptography.Primitives": "(,4.3.32767]", + "System.Security.Cryptography.X509Certificates": "(,4.3.32767]", + "System.Security.Principal": "(,4.3.32767]", + "System.Security.Principal.Windows": "(,5.0.32767]", + "System.Security.SecureString": "(,4.3.32767]", + "System.Text.Encoding": "(,4.3.32767]", + "System.Text.Encoding.CodePages": "(,10.0.32767]", + "System.Text.Encoding.Extensions": "(,4.3.32767]", + "System.Text.Encodings.Web": "(,10.0.32767]", + "System.Text.Json": "(,10.0.32767]", + "System.Text.RegularExpressions": "(,4.3.32767]", + "System.Threading": "(,4.3.32767]", + "System.Threading.AccessControl": "(,10.0.32767]", + "System.Threading.Channels": "(,10.0.32767]", + "System.Threading.Overlapped": "(,4.3.32767]", + "System.Threading.Tasks": "(,4.3.32767]", + "System.Threading.Tasks.Dataflow": "(,10.0.32767]", + "System.Threading.Tasks.Extensions": "(,5.0.32767]", + "System.Threading.Tasks.Parallel": "(,4.3.32767]", + "System.Threading.Thread": "(,4.3.32767]", + "System.Threading.ThreadPool": "(,4.3.32767]", + "System.Threading.Timer": "(,4.3.32767]", + "System.ValueTuple": "(,4.5.32767]", + "System.Xml.ReaderWriter": "(,4.3.32767]", + "System.Xml.XDocument": "(,4.3.32767]", + "System.Xml.XmlDocument": "(,4.3.32767]", + "System.Xml.XmlSerializer": "(,4.3.32767]", + "System.Xml.XPath": "(,4.3.32767]", + "System.Xml.XPath.XDocument": "(,5.0.32767]" + } + } + } + } +} \ No newline at end of file diff --git a/csharp/src/obj/project.nuget.cache b/csharp/src/obj/project.nuget.cache new file mode 100644 index 0000000..7b3442d --- /dev/null +++ b/csharp/src/obj/project.nuget.cache @@ -0,0 +1,8 @@ +{ + "version": 2, + "dgSpecHash": "XRC1hwC/Ajc=", + "success": true, + "projectFilePath": "/Users/einand/Code/test/csharp/src/print_hej.csproj", + "expectedPackageFiles": [], + "logs": [] +} \ No newline at end of file diff --git a/csharp/src/print_hej.cs b/csharp/src/print_hej.cs new file mode 100644 index 0000000..8f1ee60 --- /dev/null +++ b/csharp/src/print_hej.cs @@ -0,0 +1,66 @@ +using System; +using System.Numerics; + +class Program +{ + static void Main(string[] args) + { + int decimals = 100; + if (args.Length > 0) + { + if (!int.TryParse(args[0], out decimals) || decimals <= 0) + decimals = 100; + } + + BigInteger pi = CalculatePi(decimals); + Console.WriteLine(FormatPi(pi, decimals)); + } + + // Calculate arctan(1/x) using Taylor series + static BigInteger Arctan(int x, int decimals) + { + BigInteger scale = BigInteger.Pow(10, decimals + 10); + BigInteger xBig = new BigInteger(x); + BigInteger xSquared = xBig * xBig; + + BigInteger result = BigInteger.Zero; + BigInteger term = scale / xBig; + + int n = 0; + while (term != 0 && n < decimals * 3) + { + BigInteger divisor = new BigInteger(2 * n + 1); + BigInteger contrib = term / divisor; + + if (n % 2 == 0) + result += contrib; + else + result -= contrib; + + term /= xSquared; + n++; + + if (n > decimals * 2) break; + } + + return result; + } + + // Calculate pi using Machin's formula + static BigInteger CalculatePi(int decimals) + { + BigInteger atan1_5 = Arctan(5, decimals); + BigInteger atan1_239 = Arctan(239, decimals); + + return 16 * atan1_5 - 4 * atan1_239; + } + + // Format pi with decimal point + static string FormatPi(BigInteger pi, int decimals) + { + string piStr = pi.ToString(); + while (piStr.Length < decimals + 10) + piStr = "0" + piStr; + return "3." + piStr.Substring(1, decimals); + } +} \ No newline at end of file diff --git a/csharp/src/print_hej.csproj b/csharp/src/print_hej.csproj new file mode 100644 index 0000000..ad1c25d --- /dev/null +++ b/csharp/src/print_hej.csproj @@ -0,0 +1,11 @@ + + + Exe + net10.0 + enable + enable + + + + + \ No newline at end of file diff --git a/d/cmd/build.sh b/d/cmd/build.sh new file mode 100755 index 0000000..4ea518b --- /dev/null +++ b/d/cmd/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# D Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== D Build ===" +echo "" + +# Kompilera D-programmet +ldc2 -of bin/print_hej src/print_hej.d + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Binär: bin/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej [decimaler]" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/d/cmd/test.sh b/d/cmd/test.sh new file mode 100755 index 0000000..f2b87c4 --- /dev/null +++ b/d/cmd/test.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# D Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== D Pi-beräkning Unit Tester ===" +echo "" + +# Kompilera och kör pi_test +ldc2 -o bin/pi_test src/pi_test.d +if [ $? -eq 0 ]; then + ./bin/pi_test + exit $? +else + echo "✗ Kompilering av tester misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/dart/cmd/build.sh b/dart/cmd/build.sh new file mode 100755 index 0000000..2db5e01 --- /dev/null +++ b/dart/cmd/build.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Dart Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Dart Build ===" +echo "" + +# Check for dart +if ! command -v dart &> /dev/null; then + echo "✗ Dart-kompilator hittades inte!" + echo " Installera Dart: brew install dart" + exit 1 +fi + +echo "Använder: dart" + +# Compile to native executable +if dart compile exe src/print_hej.dart -o bin/print_hej 2>&1; then + echo "✓ Kompilering lyckades!" + echo " Executable: bin/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej " +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/dart/src/print_hej.dart b/dart/src/print_hej.dart new file mode 100644 index 0000000..4ff9789 --- /dev/null +++ b/dart/src/print_hej.dart @@ -0,0 +1,71 @@ +import 'dart:io'; + +// Calculate arctan(1/x) using Taylor series +// arctan(1/x) = 1/x - 1/(3*x^3) + 1/(5*x^5) - ... +BigInt arctan(int x, int decimals) { + BigInt scale = BigInt.from(10).pow(decimals + 10); + BigInt xBig = BigInt.from(x); + BigInt xSquared = xBig * xBig; + + BigInt term = scale ~/ xBig; + BigInt result = BigInt.zero; + int n = 0; + + while (term != BigInt.zero && n < decimals * 3) { + BigInt divisor = BigInt.from(2 * n + 1); + BigInt contrib = term ~/ divisor; + + if (n % 2 == 0) { + result += contrib; + } else { + result -= contrib; + } + + term = term ~/ xSquared; + n++; + } + + return result; +} + +BigInt calculatePi(int decimals) { + BigInt atan1_5 = arctan(5, decimals); + BigInt atan1_239 = arctan(239, decimals); + + // pi = 16*arctan(1/5) - 4*arctan(1/239) + return atan1_5 * BigInt.from(16) - atan1_239 * BigInt.from(4); +} + +void main(List args) { + int decimals = 100; + + if (args.isNotEmpty) { + try { + decimals = int.parse(args[0]); + if (decimals < 1) decimals = 100; + } catch (e) { + decimals = 100; + } + } + + BigInt pi = calculatePi(decimals); + String piStr = pi.toString(); + + // Print with decimal point + stdout.write('3.'); + + int startIndex = 1; + int endIndex = startIndex + decimals; + if (endIndex > piStr.length) { + endIndex = piStr.length; + } + + stdout.write(piStr.substring(startIndex, endIndex)); + + // Pad with zeros if needed + for (int i = 0; i < decimals - (endIndex - startIndex); i++) { + stdout.write('0'); + } + + print(''); +} \ No newline at end of file diff --git a/elixir/cmd/build.sh b/elixir/cmd/build.sh new file mode 100755 index 0000000..4161ac3 --- /dev/null +++ b/elixir/cmd/build.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Elixir Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Elixir Build ===" +echo "" + +# Elixir är ett interpreterat språk, ingen kompilering behövs +# Skapa wrapper script + +mkdir -p bin +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +elixir src/print_hej.exs "$@" +EOF +chmod +x bin/print_hej + +echo "✓ Ingen kompilering behövs för Elixir" +echo " Använder Elixir interpreter" +echo "" +echo "Wrapper script skapad: bin/print_hej" +echo "" +echo "För att köra:" +echo " ./bin/print_hej [decimaler]" \ No newline at end of file diff --git a/elixir/cmd/test.sh b/elixir/cmd/test.sh new file mode 100755 index 0000000..66fb4e3 --- /dev/null +++ b/elixir/cmd/test.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Elixir Test Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Elixir Test ===" +echo "" + +# Testa pi-beräkning med olika antal decimaler +for decimals in 1 2 5 10 100; do + result=$(./bin/print_hej $decimals 2>/dev/null) + if [ $? -eq 0 ]; then + echo "✓ $decimals decimaler: $result" + else + echo "✗ $decimals decimaler misslyckades" + fi +done \ No newline at end of file diff --git a/elixir/src/print_hej.exs b/elixir/src/print_hej.exs new file mode 100644 index 0000000..fdbbc21 --- /dev/null +++ b/elixir/src/print_hej.exs @@ -0,0 +1,108 @@ +# Pi calculation using Machin's formula +# pi/4 = 4*arctan(1/5) - arctan(1/239) + +defmodule PiCalculator do + # Calculate arctan(1/x) using Taylor series with arbitrary precision + # arctan(1/x) = 1/x - 1/(3*x^3) + 1/(5*x^5) - ... + def arctan(x, decimals) do + # Use integer power to avoid float precision loss + scale = power(10, decimals + 10) + x_squared = x * x + + # Taylor series: arctan(1/x) = sum((-1)^n * 1/((2n+1) * x^(2n+1))) + # We compute this iteratively: + # term_0 = scale / x (represents 1/x with scale factor) + # For each n: + # contrib = term / (2n+1) + # result += sign * contrib + # term = term / x² + # sign = -sign + + term = div(scale, x) + compute(x_squared, term, 0, 0, true, decimals * 3) + end + + # Calculate 10^n using integer arithmetic + defp power(10, n) when n >= 0 do + Integer.pow(10, n) + end + + defp compute(_x_squared, 0, result, _n, _sign, _max_iterations), do: result + defp compute(_x_squared, _term, result, n, _sign, max_iterations) when n >= max_iterations, do: result + defp compute(x_squared, term, result, n, sign, max_iterations) do + divisor = 2 * n + 1 + + # Only compute if divisor > 0 + if divisor > 0 do + contrib = div(term, divisor) + + new_result = if sign do + result + contrib + else + result - contrib + end + + new_term = div(term, x_squared) + + compute(x_squared, new_term, new_result, n + 1, not sign, max_iterations) + else + result + end + end + + # Calculate pi using Machin's formula + def calculate_pi(decimals) do + actual_decimals = if decimals < 1, do: 100, else: decimals + + # Machin's formula: pi/4 = 4*arctan(1/5) - arctan(1/239) + # pi = 16*arctan(1/5) - 4*arctan(1/239) + arctan5 = arctan(5, actual_decimals) + arctan239 = arctan(239, actual_decimals) + + pi = 16 * arctan5 - 4 * arctan239 + + # Format output + pi_str = Integer.to_string(pi) + + if actual_decimals == 0 do + "3" + else + # Pad with zeros if needed + padded = if String.length(pi_str) < actual_decimals + 1 do + zeros_needed = actual_decimals + 1 - String.length(pi_str) + String.duplicate("0", zeros_needed) <> pi_str + else + pi_str + end + + # Insert decimal point + before_decimal = String.slice(padded, 0, 1) + after_decimal = String.slice(padded, 1..-1//1) + + # Pad or truncate to desired length + final_after_decimal = if String.length(after_decimal) < actual_decimals do + after_decimal <> String.duplicate("0", actual_decimals - String.length(after_decimal)) + else + String.slice(after_decimal, 0, actual_decimals) + end + + "#{before_decimal}.#{final_after_decimal}" + end + end + + def main(args) do + decimals = case args do + [d | _] -> + case Integer.parse(d) do + {n, _} when n > 0 -> n + _ -> 100 + end + [] -> 100 + end + + IO.puts(calculate_pi(decimals)) + end +end + +# Run with: elixir print_hej.exs [decimals] +PiCalculator.main(System.argv()) \ No newline at end of file diff --git a/erlang/cmd/build.sh b/erlang/cmd/build.sh new file mode 100755 index 0000000..e3dbf97 --- /dev/null +++ b/erlang/cmd/build.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# Erlang Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Erlang Build ===" +echo "" + +# Kompilera Erlang-programmet +cd src +erlc print_hej.erl + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Beam: src/print_hej.beam" + echo "" + + # Skapa wrapper script + mkdir -p ../bin + cat > ../bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +erl -noshell -pa src -eval "print_hej:main([\"$1\"])" -s init stop +EOF + chmod +x ../bin/print_hej + + echo "Wrapper script skapad: bin/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej [decimaler]" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/erlang/cmd/test.sh b/erlang/cmd/test.sh new file mode 100755 index 0000000..84c6f5f --- /dev/null +++ b/erlang/cmd/test.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Erlang Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Erlang Pi-beräkning Unit Tester ===" +echo "" + +cd src +erlc pi_test.erl +erl -noshell -eval "pi_test:test()" -s init stop + +exit $? \ No newline at end of file diff --git a/erlang/src/pi_test.erl b/erlang/src/pi_test.erl new file mode 100644 index 0000000..809af42 --- /dev/null +++ b/erlang/src/pi_test.erl @@ -0,0 +1,65 @@ +-module(pi_test). +-include_lib("eunit/include/eunit.hrl"). + +-define(SCRIPT_PATH, "/Users/einand/Code/test/erlang/print_hej"). + +run_script(Args) -> + Cmd = ?SCRIPT_PATH ++ " " ++ Args, + Port = open_port({spawn, Cmd}, [stream, exit_status]), + receive + {Port, {data, Output}} -> + port_close(Port), + string:trim(Output, trailing, "\n"); + {Port, {exit_status, _Status}} -> + port_close(Port), + "" + after 5000 -> + port_close(Port), + "" + end. + +run_script_no_args() -> + Cmd = ?SCRIPT_PATH, + Port = open_port({spawn, Cmd}, [stream, exit_status]), + receive + {Port, {data, Output}} -> + port_close(Port), + string:trim(Output, trailing, "\n"); + {Port, {exit_status, _Status}} -> + port_close(Port), + "" + after 5000 -> + port_close(Port), + "" + end. + +test_10_decimals_test() -> + Result = run_script("10"), + Expected = "3.1415926535", + ?assertEqual(Expected, Result). + +test_5_decimals_test() -> + Result = run_script("5"), + Expected = "3.14159", + ?assertEqual(Expected, Result). + +test_1_decimal_test() -> + Result = run_script("1"), + Expected = "3.1", + ?assertEqual(Expected, Result). + +test_100_decimals_test() -> + Result = run_script("100"), + Expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679", + ?assertEqual(Expected, Result). + +test_default_100_decimals_test() -> + Result = run_script_no_args(), + Expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679", + ?assertEqual(Expected, Result). + +test_10000_decimals_test() -> + Result = run_script("10000"), + % Check length: "3." + 10000 digits = 10002 characters + ?assertEqual(10002, length(Result)), + ?assert(lists:prefix("3.14159", Result)). \ No newline at end of file diff --git a/erlang/src/print_hej.erl b/erlang/src/print_hej.erl new file mode 100644 index 0000000..3ad9f8c --- /dev/null +++ b/erlang/src/print_hej.erl @@ -0,0 +1,64 @@ +-module(print_hej). +-export([main/1, pow/2]). + +main(Args) -> + Decimals = case Args of + [] -> 100; + [X | _] -> + case string:to_integer(X) of + {D, _} when D > 0 -> D; + _ -> 100 + end + end, + + Pi = calculate_pi(Decimals), + PiStr = format_pi(Pi, Decimals), + io:format("~s~n", [PiStr]), + erlang:halt(0). + +% Calculate arctan(1/x) using Taylor series +% arctan(1/x) = 1/x - 1/(3*x^3) + 1/(5*x^5) - ... +arctan(X, Decimals) -> + Scale = pow(10, Decimals + 10), + XSquared = X * X, + Term = Scale div X, % First term: scale / x + arctan_iter(XSquared, Term, 0, 0, Decimals). + +arctan_iter(_XSquared, Term, N, Result, Decimals) when Term == 0; N > Decimals * 3 -> + Result; +arctan_iter(XSquared, Term, N, Result, Decimals) -> + Divisor = 2 * N + 1, + Contrib = Term div Divisor, + NewResult = case N rem 2 of + 0 -> Result + Contrib; + 1 -> Result - Contrib + end, + NewTerm = Term div XSquared, % Divide by x² each iteration + arctan_iter(XSquared, NewTerm, N + 1, NewResult, Decimals). + +% Calculate pi using Machin's formula +% pi/4 = 4*arctan(1/5) - arctan(1/239) +calculate_pi(Decimals) -> + Atan1_5 = arctan(5, Decimals), + Atan1_239 = arctan(239, Decimals), + 16 * Atan1_5 - 4 * Atan1_239. + +% Format pi with decimal point +format_pi(Pi, Decimals) -> + PiStr = integer_to_list(Pi), + % Pad with leading zeros if needed + PiStr2 = case length(PiStr) < Decimals + 10 of + true -> string:left(PiStr, Decimals + 10, $0); + false -> PiStr + end, + "3." ++ string:substr(PiStr2, 2, Decimals). + +% Power function for integers +pow(Base, Exp) when Exp >= 0 -> + pow_iter(Base, Exp, 1). + +pow_iter(_Base, 0, Acc) -> Acc; +pow_iter(Base, Exp, Acc) when Exp rem 2 == 0 -> + pow_iter(Base * Base, Exp div 2, Acc); +pow_iter(Base, Exp, Acc) -> + pow_iter(Base, Exp - 1, Acc * Base). \ No newline at end of file diff --git a/facit.txt b/facit.txt new file mode 100644 index 0000000..416ef44 --- /dev/null +++ b/facit.txt @@ -0,0 +1 @@ +3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360011330530548820466521384146951941511609433057270365759591953092186117381932611793105118548074462379962749567351885752724891227938183011949129833673362440656643086021394946395224737190702179860943702770539217176293176752384674818467669405132000568127145263560827785771342757789609173637178721468440901224953430146549585371050792279689258923542019956112129021960864034418159813629774771309960518707211349999998372978049951059731732816096318595024459455346908302642522308253344685035261931188171010003137838752886587533208381420617177669147303598253490428755468731159562863882353787593751957781857780532171226806613001927876611195909216420198938095257201065485863278865936153381827968230301952035301852968995773622599413891249721775283479131515574857242454150695950829533116861727855889075098381754637464939319255060400927701671139009848824012858361603563707660104710181942955596198946767837449448255379774726847104047534646208046684259069491293313677028989152104752162056966024058038150193511253382430035587640247496473263914199272604269922796782354781636009341721641219924586315030286182974555706749838505494588586926995690927210797509302955321165344987202755960236480665499119881834797753566369807426542527862551818417574672890977772793800081647060016145249192173217214772350141441973568548161361157352552133475741849468438523323907394143334547762416862518983569485562099219222184272550254256887671790494601653466804988627232791786085784383827967976681454100953883786360950680064225125205117392984896084128488626945604241965285022210661186306744278622039194945047123713786960956364371917287467764657573962413890865832645995813390478027590099465764078951269468398352595709825822620522489407726719478268482601476990902640136394437455305068203496252451749399651431429809190659250937221696461515709858387410597885959772975498930161753928468138268683868942774155991855925245953959431049972524680845987273644695848653836736222626099124608051243884390451244136549762780797715691435997700129616089441694868555848406353422072225828488648158456028506016842739452267467678895252138522549954666727823986456596116354886230577456498035593634568174324112515076069479451096596094025228879710893145669136867228748940560101503308617928680920874760917824938589009714909675985261365549781893129784821682998948722658804857564014270477555132379641451523746234364542858444795265867821051141354735739523113427166102135969536231442952484937187110145765403590279934403742007310578539062198387447808478489683321445713868751943506430218453191048481005370614680674919278191197939952061419663428754440643745123718192179998391015919561814675142691239748940907186494231961567945208095146550225231603881930142093762137855956638937787083039069792077346722182562599661501421503068038447734549202605414665925201497442850732518666002132434088190710486331734649651453905796268561005508106658796998163574736384052571459102897064140110971206280439039759515677157700420337869936007230558763176359421873125147120532928191826186125867321579198414848829164470609575270695722091756711672291098169091528017350671274858322287183520935396572512108357915136988209144421006751033467110314126711136990865851639831501970165151168517143765761835155650884909989859982387345528331635507647918535893226185489632132933089857064204675259070915481416549859461637180270981994309924488957571282890592323326097299712084433573265489382391193259746366730583604142813883032038249037589852437441702913276561809377344403070746921120191302033038019762110110044929321516084244485963766983895228684783123552658213144957685726243344189303968642624341077322697802807318915441101044682325271620105265227211166039666557309254711055785376346682065310989652691862056476931257058635662018558100729360659876486117910453348850346113657686753249441668039626579787718556084552965412665408530614344431858676975145661406800700237877659134401712749470420562230538994561314071127000407854733269939081454664645880797270826683063432858785698305235808933065757406795457163775254202114955761581400250126228594130216471550979259230990796547376125517656751357517829666454779174501129961489030463994713296210734043751895735961458901938971311179042978285647503203198691514028708085990480109412147221317947647772622414254854540332157185306142288137585043063321751829798662237172159160771669254748738986654949450114654062843366393790039769265672146385306736096571209180763832716641627488880078692560290228472104031721186082041900042296617119637792133757511495950156604963186294726547364252308177036751590673502350728354056704038674351362222477158915049530984448933309634087807693259939780541934144737744184263129860809988868741326047215695162396586457302163159819319516735381297416772947867242292465436680098067692823828068996400482435403701416314965897940924323789690706977942236250822168895738379862300159377647165122893578601588161755782973523344604281512627203734314653197777416031990665541876397929334419521541341899485444734567383162499341913181480927777103863877343177207545654532207770921201905166096280490926360197598828161332316663652861932668633606273567630354477628035045077723554710585954870279081435624014517180624643626794561275318134078330336254232783944975382437205835311477119926063813346776879695970309833913077109870408591337464144282277263465947047458784778720192771528073176790770715721344473060570073349243693113835049316312840425121925651798069411352801314701304781643788518529092854520116583934196562134914341595625865865570552690496520985803385072242648293972858478316305777756068887644624824685792603953527734803048029005876075825104747091643961362676044925627420420832085661190625454337213153595845068772460290161876679524061634252257719542916299193064553779914037340432875262888963995879475729174642635745525407909145135711136941091193932519107602082520261879853188770584297259167781314969900901921169717372784768472686084900337702424291651300500516832336435038951702989392233451722013812806965011784408745196012122859937162313017114448464090389064495444006198690754851602632750529834918740786680881833851022833450850486082503930213321971551843063545500766828294930413776552793975175461395398468339363830474611996653858153842056853386218672523340283087112328278921250771262946322956398989893582116745627010218356462201349671518819097303811980049734072396103685406643193950979019069963955245300545058068550195673022921913933918568034490398205955100226353536192041994745538593810234395544959778377902374216172711172364343543947822181852862408514006660443325888569867054315470696574745855033232334210730154594051655379068662733379958511562578432298827372319898757141595781119635833005940873068121602876496286744604774649159950549737425626901049037781986835938146574126804925648798556145372347867330390468838343634655379498641927056387293174872332083760112302991136793862708943879936201629515413371424892830722012690147546684765357616477379467520049075715552781965362132392640616013635815590742202020318727760527721900556148425551879253034351398442532234157623361064250639049750086562710953591946589751413103482276930624743536325691607815478181152843667957061108615331504452127473924544945423682886061340841486377670096120715124914043027253860764823634143346235189757664521641376796903149501910857598442391986291642193994907236234646844117394032659184044378051333894525742399508296591228508555821572503107125701266830240292952522011872676756220415420516184163484756516999811614101002996078386909291603028840026910414079288621507842451670908700069928212066041837180653556725253256753286129104248776182582976515795984703562226293486003415872298053498965022629174878820273420922224533985626476691490556284250391275771028402799806636582548892648802545661017296702664076559042909945681506526530537182941270336931378517860904070866711496558343434769338578171138645587367812301458768712660348913909562009939361031029161615288138437909904231747336394804575931493140529763475748119356709110137751721008031559024853090669203767192203322909433467685142214477379393751703443661991040337511173547191855046449026365512816228824462575916333039107225383742182140883508657391771509682887478265699599574490661758344137522397096834080053559849175417381883999446974867626551658276584835884531427756879002909517028352971634456212964043523117600665101241200659755851276178583829204197484423608007193045761893234922927965019875187212726750798125547095890455635792122103334669749923563025494780249011419521238281530911407907386025152274299581807247162591668545133312394804947079119153267343028244186041426363954800044800267049624820179289647669758318327131425170296923488962766844032326092752496035799646925650493681836090032380929345958897069536534940603402166544375589004563288225054525564056448246515187547119621844396582533754388569094113031509526179378002974120766514793942590298969594699556576121865619673378623625612521632086286922210327488921865436480229678070576561514463204692790682120738837781423356282360896320806822246801224826117718589638140918390367367222088832151375560037279839400415297002878307667094447456013455641725437090697939612257142989467154357846878861444581231459357198492252847160504922124247014121478057345510500801908699603302763478708108175450119307141223390866393833952942578690507643100638351983438934159613185434754649556978103829309716465143840700707360411237359984345225161050702705623526601276484830840761183013052793205427462865403603674532865105706587488225698157936789766974220575059683440869735020141020672358502007245225632651341055924019027421624843914035998953539459094407046912091409387001264560016237428802109276457931065792295524988727584610126483699989225695968815920560010165525637567856672279661988578279484885583439751874454551296563443480396642055798293680435220277098429423253302257634180703947699415979159453006975214829336655566156787364005366656416547321704390352132954352916941459904160875320186837937023488868947915107163785290234529244077365949563051007421087142613497459561513849871375704710178795731042296906667021449863746459528082436944578977233004876476524133907592043401963403911473202338071509522201068256342747164602433544005152126693249341967397704159568375355516673027390074972973635496453328886984406119649616277344951827369558822075735517665158985519098666539354948106887320685990754079234240230092590070173196036225475647894064754834664776041146323390565134330684495397907090302346046147096169688688501408347040546074295869913829668246818571031887906528703665083243197440477185567893482308943106828702722809736248093996270607472645539925399442808113736943388729406307926159599546262462970706259484556903471197299640908941805953439325123623550813494900436427852713831591256898929519642728757394691427253436694153236100453730488198551706594121735246258954873016760029886592578662856124966552353382942878542534048308330701653722856355915253478445981831341129001999205981352205117336585640782648494276441137639386692480311836445369858917544264739988228462184490087776977631279572267265556259628254276531830013407092233436577916012809317940171859859993384923549564005709955856113498025249906698423301735035804408116855265311709957089942732870925848789443646005041089226691783525870785951298344172953519537885534573742608590290817651557803905946408735061232261120093731080485485263572282576820341605048466277504500312620080079980492548534694146977516493270950493463938243222718851597405470214828971117779237612257887347718819682546298126868581705074027255026332904497627789442362167411918626943965067151577958675648239939176042601763387045499017614364120469218237076488783419689686118155815873606293860381017121585527266830082383404656475880405138080163363887421637140643549556186896411228214075330265510042410489678352858829024367090488711819090949453314421828766181031007354770549815968077200947469613436092861484941785017180779306810854690009445899527942439813921350558642219648349151263901280383200109773868066287792397180146134324457264009737425700735921003154150893679300816998053652027600727749674584002836240534603726341655425902760183484030681138185510597970566400750942608788573579603732451414678670368809880609716425849759513806930944940151542222194329130217391253835591503100333032511174915696917450271494331515588540392216409722910112903552181576282328318234254832611191280092825256190205263016391147724733148573910777587442538761174657867116941477642144111126358355387136101102326798775641024682403226483464176636980663785768134920453022408197278564719839630878154322116691224641591177673225326433568614618654522268126887268445968442416107854016768142080885028005414361314623082102594173756238994207571362751674573189189456283525704413354375857534269869947254703165661399199968262824727064133622217892390317608542894373393561889165125042440400895271983787386480584726895462438823437517885201439560057104811949884239060613695734231559079670346149143447886360410318235073650277859089757827273130504889398900992391350337325085598265586708924261242947367019390772713070686917092646254842324074855036608013604668951184009366860954632500214585293095000090715105823626729326453738210493872499669933942468551648326113414611068026744663733437534076429402668297386522093570162638464852851490362932019919968828517183953669134522244470804592396602817156551565666111359823112250628905854914509715755390024393153519090210711945730024388017661503527086260253788179751947806101371500448991721002220133501310601639154158957803711779277522597874289191791552241718958536168059474123419339842021874564925644346239253195313510331147639491199507285843065836193536932969928983791494193940608572486396883690326556436421664425760791471086998431573374964883529276932822076294728238153740996154559879825989109371712621828302584811238901196822142945766758071865380650648702613389282299497257453033283896381843944770779402284359883410035838542389735424395647555684095224844554139239410001620769363684677641301781965937997155746854194633489374843912974239143365936041003523437770658886778113949861647874714079326385873862473288964564359877466763847946650407411182565837887845485814896296127399841344272608606187245545236064315371011274680977870446409475828034876975894832824123929296058294861919667091895808983320121031843034012849511620353428014412761728583024355983003204202451207287253558119584014918096925339507577840006746552603144616705082768277222353419110263416315714740612385042584598841990761128725805911393568960143166828317632356732541707342081733223046298799280490851409479036887868789493054695570307261900950207643349335910602454508645362893545686295853131533718386826561786227363716975774183023986006591481616404944965011732131389574706208847480236537103115089842799275442685327797431139514357417221975979935968525228574526379628961269157235798662057340837576687388426640599099350500081337543245463596750484423528487470144354541957625847356421619813407346854111766883118654489377697956651727966232671481033864391375186594673002443450054499539974237232871249483470604406347160632583064982979551010954183623503030945309733583446283947630477564501500850757894954893139394489921612552559770143685894358587752637962559708167764380012543650237141278346792610199558522471722017772370041780841942394872540680155603599839054898572354674564239058585021671903139526294455439131663134530893906204678438778505423939052473136201294769187497519101147231528932677253391814660730008902776896311481090220972452075916729700785058071718638105496797310016787085069420709223290807038326345345203802786099055690013413718236837099194951648960075504934126787643674638490206396401976668559233565463913836318574569814719621084108096188460545603903845534372914144651347494078488442377217515433426030669883176833100113310869042193903108014378433415137092435301367763108491351615642269847507430329716746964066653152703532546711266752246055119958183196376370761799191920357958200759560530234626775794393630746305690108011494271410093913691381072581378135789400559950018354251184172136055727522103526803735726527922417373605751127887218190844900617801388971077082293100279766593583875890939568814856026322439372656247277603789081445883785501970284377936240782505270487581647032458129087839523245323789602984166922548964971560698119218658492677040395648127810217991321741630581055459880130048456299765112124153637451500563507012781592671424134210330156616535602473380784302865525722275304999883701534879300806260180962381516136690334111138653851091936739383522934588832255088706450753947395204396807906708680644509698654880168287434378612645381583428075306184548590379821799459968115441974253634439960290251001588827216474500682070419376158454712318346007262933955054823955713725684023226821301247679452264482091023564775272308208106351889915269288910845557112660396503439789627825001611015323516051965590421184494990778999200732947690586857787872098290135295661397888486050978608595701773129815531495168146717695976099421003618355913877781769845875810446628399880600616229848616935337386578773598336161338413385368421197893890018529569196780455448285848370117096721253533875862158231013310387766827211572694951817958975469399264219791552338576623167627547570354699414892904130186386119439196283887054367774322427680913236544948536676800000106526248547305586159899914017076983854831887501429389089950685453076511680333732226517566220752695179144225280816517166776672793035485154204023817460892328391703275425750867655117859395002793389592057668278967764453184040418554010435134838953120132637836928358082719378312654961745997056745071833206503455664403449045362756001125018433560736122276594927839370647842645676338818807565612168960504161139039063960162022153684941092605387688714837989559999112099164646441191856827700457424343402167227644558933012778158686952506949936461017568506016714535431581480105458860564550133203758645485840324029871709348091055621167154684847780394475697980426318099175642280987399876697323769573701580806822904599212366168902596273043067931653114940176473769387351409336183321614280214976339918983548487562529875242387307755955595546519639440182184099841248982623673771467226061633643296406335728107078875816404381485018841143188598827694490119321296827158884133869434682859006664080631407775772570563072940049294030242049841656547973670548558044586572022763784046682337985282710578431975354179501134727362577408021347682604502285157979579764746702284099956160156910890384582450267926594205550395879229818526480070683765041836562094555434613513415257006597488191634135955671964965403218727160264859304903978748958906612725079482827693895352175362185079629778514618843271922322381015874445052866523802253284389137527384589238442253547265309817157844783421582232702069028723233005386216347988509469547200479523112015043293226628272763217790884008786148022147537657810581970222630971749507212724847947816957296142365859578209083073323356034846531873029302665964501371837542889755797144992465403868179921389346924474198509733462679332107268687076806263991936196504409954216762784091466985692571507431574079380532392523947755744159184582156251819215523370960748332923492103451462643744980559610330799414534778457469999212859999939961228161521931488876938802228108300198601654941654261696858678837260958774567618250727599295089318052187292461086763995891614585505839727420980909781729323930106766386824040111304024700735085782872462713494636853181546969046696869392547251941399291465242385776255004748529547681479546700705034799958886769501612497228204030399546327883069597624936151010243655535223069061294938859901573466102371223547891129254769617600504797492806072126803922691102777226102544149221576504508120677173571202718024296810620377657883716690910941807448781404907551782038565390991047759414132154328440625030180275716965082096427348414695726397884256008453121406593580904127113592004197598513625479616063228873618136737324450607924411763997597461938358457491598809766744709300654634242346063423747466608043170126005205592849369594143408146852981505394717890045183575515412522359059068726487863575254191128887737176637486027660634960353679470269232297186832771739323619200777452212624751869833495151019864269887847171939664976907082521742336566272592844062043021411371992278526998469884770232382384005565551788908766136013047709843861168705231055314916251728373272867600724817298763756981633541507460883866364069347043720668865127568826614973078865701568501691864748854167915459650723428773069985371390430026653078398776385032381821553559732353068604301067576083890862704984188859513809103042359578249514398859011318583584066747237029714978508414585308578133915627076035639076394731145549583226694570249413983163433237897595568085683629725386791327505554252449194358912840504522695381217913191451350099384631177401797151228378546011603595540286440590249646693070776905548102885020808580087811577381719174177601733073855475800605601433774329901272867725304318251975791679296996504146070664571258883469797964293162296552016879730003564630457930884032748077181155533090988702550520768046303460865816539487695196004408482065967379473168086415645650530049881616490578831154345485052660069823093157776500378070466126470602145750579327096204782561524714591896522360839664562410519551052235723973951288181640597859142791481654263289200428160913693777372229998332708208296995573772737566761552711392258805520189887620114168005468736558063347160373429170390798639652296131280178267971728982293607028806908776866059325274637840539769184808204102194471971386925608416245112398062011318454124478205011079876071715568315407886543904121087303240201068534194723047666672174986986854707678120512473679247919315085644477537985379973223445612278584329684664751333657369238720146472367942787004250325558992688434959287612400755875694641370562514001179713316620715371543600687647731867558714878398908107429530941060596944315847753970094398839491443235366853920994687964506653398573888786614762944341401049888993160051207678103588611660202961193639682134960750111649832785635316145168457695687109002999769841263266502347716728657378579085746646077228341540311441529418804782543876177079043000156698677679576090996693607559496515273634981189641304331166277471233881740603731743970540670310967676574869535878967003192586625941051053358438465602339179674926784476370847497833365557900738419147319886271352595462518160434225372996286326749682405806029642114638643686422472488728343417044157348248183330164056695966886676956349141632842641497453334999948000266998758881593507357815195889900539512085351035726137364034367534714104836017546488300407846416745216737190483109676711344349481926268111073994825060739495073503169019731852119552635632584339099822498624067031076831844660729124874754031617969941139738776589986855417031884778867592902607004321266617919223520938227878880988633599116081923535557046463491132085918979613279131975649097600013996234445535014346426860464495862476909434704829329414041114654092398834443515913320107739441118407410768498106634724104823935827401944935665161088463125678529776973468430306146241803585293315973458303845541033701091676776374276210213701354854450926307190114731848574923318167207213727935567952844392548156091372812840633303937356242001604566455741458816605216660873874804724339121295587776390696903707882852775389405246075849623157436917113176134783882719416860662572103685132156647800147675231039357860689611125996028183930954870905907386135191459181951029732787557104972901148717189718004696169777001791391961379141716270701895846921434369676292745910994006008498356842520191559370370101104974733949387788598941743303178534870760322198297057975119144051099423588303454635349234982688362404332726741554030161950568065418093940998202060999414021689090070821330723089662119775530665918814119157783627292746156185710372172471009521423696483086410259288745799932237495519122195190342445230753513380685680735446499512720317448719540397610730806026990625807602029273145525207807991418429063884437349968145827337207266391767020118300464819000241308350884658415214899127610651374153943565721139032857491876909441370209051703148777346165287984823533829726013611098451484182380812054099612527458088109948697221612852489742555551607637167505489617301680961380381191436114399210638005083214098760459930932485102516829446726066613815174571255975495358023998314698220361338082849935670557552471290274539776214049318201465800802156653606776550878380430413431059180460680083459113664083488740800574127258670479225831912741573908091438313845642415094084913391809684025116399193685322555733896695374902662092326131885589158083245557194845387562878612885900410600607374650140262782402734696252821717494158233174923968353013617865367376064216677813773995100658952887742766263684183068019080460984980946976366733566228291513235278880615776827815958866918023894033307644191240341202231636857786035727694154177882643523813190502808701857504704631293335375728538660588890458311145077394293520199432197117164223500564404297989208159430716701985746927384865383343614579463417592257389858800169801475742054299580124295810545651083104629728293758416116253256251657249807849209989799062003593650993472158296517413579849104711166079158743698654122234834188772292944633517865385673196255985202607294767407261676714557364981210567771689348491766077170527718760119990814411305864557791052568430481144026193840232247093924980293355073184589035539713308844617410795916251171486487446861124760542867343670904667846867027409188101424971114965781772427934707021668829561087779440504843752844337510882826477197854000650970403302186255614733211777117441335028160884035178145254196432030957601869464908868154528562134698835544456024955666843660292219512483091060537720198021831010327041783866544718126039719068846237085751808003532704718565949947612424811099928867915896904956394762460842406593094862150769031498702067353384834955083636601784877106080980426924713241000946401437360326564518456679245666955100150229833079849607994988249706172367449361226222961790814311414660941234159359309585407913908720832273354957208075716517187659944985693795623875551617575438091780528029464200447215396280746360211329425591600257073562812638733106005891065245708024474937543184149401482119996276453106800663118382376163966318093144467129861552759820145141027560068929750246304017351489194576360789352855505317331416457050499644389093630843874484783961684051845273288403234520247056851646571647713932377551729479512613239822960239454857975458651745878771331813875295980941217422730035229650808917770506825924882232215493804837145478164721397682096332050830564792048208592047549985732038887639160199524091893894557676874973085695595801065952650303626615975066222508406742889826590751063756356996821151094966974458054728869363102036782325018232370845979011154847208761821247781326633041207621658731297081123075815982124863980721240786887811450165582513617890307086087019897588980745664395515741536319319198107057533663373803827215279884935039748001589051942087971130805123393322190346624991716915094854140187106035460379464337900589095772118080446574396280618671786101715674096766208029576657705129120990794430463289294730615951043090222143937184956063405618934251305726829146578329334052463502892917547087256484260034962961165413823007731332729830500160256724014185152041890701154288579920812198449315699905918201181973350012618772803681248199587707020753240636125931343859554254778196114293516356122349666152261473539967405158499860355295332924575238881013620234762466905581643896786309762736550472434864307121849437348530060638764456627218666170123812771562137974614986132874411771455244470899714452288566294244023018479120547849857452163469644897389206240194351831008828348024924908540307786387516591130287395878709810077271827187452901397283661484214287170553179654307650453432460053636147261818096997693348626407743519992868632383508875668359509726557481543194019557685043724800102041374983187225967738715495839971844490727914196584593008394263702087563539821696205532480321226749891140267852859967340524203109179789990571882194939132075343170798002373659098537552023891164346718558290685371189795262623449248339249634244971465684659124891855662958932990903523923333364743520370770101084388003290759834217018554228386161721041760301164591878053936744747205998502358289183369292233732399948043710841965947316265482574809948250999183300697656936715968936449334886474421350084070066088359723503953234017958255703601693699098867113210979889707051728075585519126993067309925070407024556850778679069476612629808225163313639952117098452809263037592242674257559989289278370474445218936320348941552104459726188380030067761793138139916205806270165102445886924764924689192461212531027573139084047000714356136231699237169484813255420091453041037135453296620639210547982439212517254013231490274058589206321758949434548906846399313757091034633271415316223280552297297953801880162859073572955416278867649827418616421878988574107164906919185116281528548679417363890665388576422915834250067361245384916067413734017357277995634104332688356950781493137800736235418007061918026732855119194267609122103598746924117283749312616339500123959924050845437569850795704622266461900010350049018303415354584283376437811198855631877779253720116671853954183598443830520376281944076159410682071697030228515225057312609304689842343315273213136121658280807521263154773060442377475350595228717440266638914881717308643611138906942027908814311944879941715404210341219084709408025402393294294549387864023051292711909751353600092197110541209668311151632870542302847007312065803262641711616595761327235156666253667271899853419989523688483099930275741991646384142707798870887422927705389122717248632202889842512528721782603050099451082478357290569198855546788607946280537122704246654319214528176074148240382783582971930101788834567416781139895475044833931468963076339665722672704339321674542182455706252479721997866854279897799233957905758189062252547358220523642485078340711014498047872669199018643882293230538231855973286978092225352959101734140733488476100556401824239219269506208318381454698392366461363989101210217709597670490830508185470419466437131229969235889538493013635657618610606222870559942337163102127845744646398973818856674626087948201864748767272722206267646533809980196688368099415907577685263986514625333631245053640261056960551318381317426118442018908885319635698696279503673842431301133175330532980201668881748134298868158557781034323175306478498321062971842518438553442762012823457071698853051832617964117857960888815032960229070561447622091509473903594664691623539680920139457817589108893199211226007392814916948161527384273626429809823406320024402449589445612916704950823581248739179964864113348032475777521970893277226234948601504665268143987705161531702669692970492831628550421289814670619533197026950721437823047687528028735412616639170824592517001071418085480063692325946201900227808740985977192180515853214739265325155903541020928466592529991435379182531454529059841581763705892790690989691116438118780943537152133226144362531449012745477269573939348154691631162492887357471882407150399500944673195431619385548520766573882513963916357672315100555603726339486720820780865373494244011579966750736071115935133195919712094896471755302453136477094209463569698222667377520994516845064362382421185353488798939567318780660610788544000550827657030558744854180577889171920788142335113866292966717964346876007704799953788338787034871802184243734211227394025571769081960309201824018842705704609262256417837526526335832424066125331152942345796556950250681001831090041124537901533296615697052237921032570693705109083078947999900499939532215362274847660361367769797856738658467093667958858378879562594646489137665219958828693380183601193236857855855819555604215625088365020332202451376215820461810670519533065306060650105488716724537794283133887163139559690583208341689847606560711834713621812324622725884199028614208728495687963932546428534307530110528571382964370999035694888528519040295604734613113826387889755178856042499874831638280404684861893818959054203988987265069762020199554841265000539442820393012748163815853039643992547020167275932857436666164411096256633730540921951967514832873480895747777527834422109107311135182804603634719818565557295714474768255285786334934285842311874944000322969069775831590385803935352135886007960034209754739229673331064939560181223781285458431760556173386112673478074585067606304822940965304111830667108189303110887172816751957967534718853722930961614320400638132246584111115775835858113501856904781536893813771847281475199835050478129771859908470762197460588742325699582889253504193795826061621184236876851141831606831586799460165205774052942305360178031335726326705479033840125730591233960188013782542192709476733719198728738524805742124892118347087662966720727232565056512933312605950577772754247124164831283298207236175057467387012820957554430596839555568686118839713552208445285264008125202766555767749596962661260456524568408613923826576858338469849977872670655519185446869846947849573462260629421962455708537127277652309895545019303773216664918257815467729200521266714346320963789185232321501897612603437368406719419303774688099929687758244104787812326625318184596045385354383911449677531286426092521153767325886672260404252349108702695809964759580579466397341906401003636190404203311357933654242630356145700901124480089002080147805660371015412232889146572239314507607167064355682743774396578906797268743847307634645167756210309860409271709095128086309029738504452718289274968921210667008164858339553773591913695015316201890888748421079870689911480466927065094076204650277252865072890532854856143316081269300569378541786109696920253886503457718317668688592368148847527649846882194973972970773718718840041432312763650481453112285099002074240925585925292610302106736815434701525234878635164397623586041919412969769040526483234700991115424260127343802208933109668636789869497799400126016422760926082349304118064382913834735467972539926233879158299848645927173405922562074910530853153718291168163721939518870095778818158685046450769934394098743351443162633031724774748689791820923948083314397084067308407958935810896656477585990556376952523265361442478023082681183103773588708924061303133647737101162821461466167940409051861526036009252194721889091810733587196414214447865489952858234394705007983038853886083103571930600277119455802191194289992272235345870756624692617766317885514435021828702668561066500353105021631820601760921798468493686316129372795187307897263735371715025637873357977180818487845886650433582437700414771041493492743845758710715973155943942641257027096512510811554824793940359768118811728247215825010949609662539339538092219559191818855267806214992317276316321833989693807561685591175299845013206712939240414459386239880938124045219148483164621014738918251010909677386906640415897361047643650006807710565671848628149637111883219244566394581449148616550049567698269030891118568798692947051352481609174324301538368470729289898284602223730145265567989862776796809146979837826876431159883210904371561129976652153963546442086919756737000573876497843768628768179249746943842746525631632300555130417422734164645512781278457777245752038654375428282567141288583454443513256205446424101103795546419058116862305964476958705407214198521210673433241075676757581845699069304604752277016700568454396923404171108988899341635058515788735343081552081177207188037910404698306957868547393765643363197978680367187307969392423632144845035477631567025539006542311792015346497792906624150832885839529054263768766896880503331722780018588506973623240389470047189761934734430843744375992503417880797223585913424581314404984770173236169471976571535319775499716278566311904691260918259124989036765417697990362375528652637573376352696934435440047306719886890196814742876779086697968852250163694985673021752313252926537589641517147955953878427849986645630287883196209983049451987439636907068276265748581043911223261879405994155406327013198989570376110532360629867480377915376751158304320849872092028092975264981256916342500052290887264692528466610466539217148208013050229805263783642695973370705392278915351056888393811324975707133102950443034671598944878684711643832805069250776627450012200352620370946602341464899839025258883014867816219677519458316771876275720050543979441245990077115205154619930509838698254284640725554092740313257163264079293418334214709041254253352324802193227707535554679587163835875018159338717423606155117101312352563348582036514614187004920570437201826173319471570086757853933607862273955818579758725874410254207710547536129404746010009409544495966288148691590389907186598056361713769222729076419775517772010427649694961105622059250242021770426962215495872645398922769766031052498085575947163107587013320886146326641259114863388122028444069416948826152957762532501987035987067438046982194205638125583343642194923227593722128905642094308235254408411086454536940496927149400331978286131818618881111840825786592875742638445005994422956858646048103301538891149948693543603022181094346676400002236255057363129462629609619876056425996394613869233083719626595473923462413459779574852464783798079569319865081597767535055391899115133525229873611277918274854200868953965835942196333150286956119201229888988700607999279541118826902307891310760361763477948943203210277335941690865007193280401716384064498787175375678118532132840821657110754952829497493621460821558320568723218557406516109627487437509809223021160998263303391546949464449100451528092508974507489676032409076898365294065792019831526541065813682379198409064571246894847020935776119313998024681340520039478194986620262400890215016616381353838151503773502296607462795291038406868556907015751662419298724448271942933100485482445458071889763300323252582158128032746796200281476243182862217105435289834820827345168018613171959332471107466222850871066611770346535283957762599774467218571581612641114327179434788599089280848669491413909771673690027775850268664654056595039486784111079011610400857274456293842549416759460548711723594642910585090995021495879311219613590831588262068233215615308683373083817327932819698387508708348388046388478441884003184712697454370937329836240287519792080232187874488287284372737801782700805878241074935751488997891173974612932035108143270325140903048746226294234432757126008664250833318768865075642927160552528954492153765175149219636718104943531785838345386525565664065725136357506435323650893679043170259787817719031486796384082881020946149007971513771709906195496964007086766710233004867263147551053723175711432231741141168062286420638890621019235522354671166213749969326932173704310598722503945657492461697826097025335947502091383667377289443869640002811034402608471289900074680776484408871134135250336787731679770937277868216611786534423173226463784769787514433209534000165069213054647689098505020301504488083426184520873053097318949291642532293361243151430657826407028389840984160295030924189712097160164926561341343342229882790992178604267981245728534580133826099587717811310216734025656274400729683406619848067661580502169183372368039902793160642043681207990031626444914619021945822969099212278855394878353830564686488165556229431567312827439082645061162894280350166133669782405177015521962652272545585073864058529983037918035043287670380925216790757120406123759632768567484507915114731344000183257034492090971243580944790046249431345502890068064870429353403743603262582053579011839564908935434510134296961754524957396062149028872893279252069653538639644322538832752249960598697475988232991626354597332444516375533437749292899058117578635555562693742691094711700216541171821975051983178713710605106379555858890556885288798908475091576463907469361988150781468526213325247383765119299015610918977792200870579339646382749068069876916819749236562422608715417610043060890437797667851966189140414492527048088197149880154205778700652159400928977760133075684796699295543365613984773806039436889588764605498387147896848280538470173087111776115966350503997934386933911978988710915654170913308260764740630571141109883938809548143782847452883836807941888434266622207043872288741394780101772139228191199236540551639589347426395382482960903690028835932774585506080131798840716244656399794827578365019551422155133928197822698427863839167971509126241054872570092407004548848569295044811073808799654748156891393538094347455697212891982717702076661360248958146811913361412125878389557735719498631721084439890142394849665925173138817160266326193106536653504147307080441493916936326237376777709585031325599009576273195730864804246770121232702053374266705314244820816813030639737873664248367253983748769098060218278578621651273856351329014890350988327061725893257536399397905572917516009761545904477169226580631511102803843601737474215247608515209901615858231257159073342173657626714239047827958728150509563309280266845893764964977023297364131906098274063353108979246424213458374090116939196425045912881340349881063540088759682005440836438651661788055760895689672753153808194207733259791727843762566118431989102500749182908647514979400316070384554946538594602745244746681231468794344161099333890899263841184742525704457251745932573898956518571657596148126602031079762825416559050604247911401695790033835657486925280074302562341949828646791447632277400552946090394017753633565547193100017543004750471914489984104001586794617924161001645471655133707407395026044276953855383439755054887109978520540117516974758134492607943368954378322117245068734423198987884412854206474280973562580706698310697993526069339213568588139121480735472846322778490808700246777630360555123238665629517885371967303463470122293958160679250915321748903084088651606111901149844341235012464692802880599613428351188471544977127847336176628506216977871774382436256571177945006447771837022199910669502165675764404499794076503799995484500271066598781360380231412683690578319046079276529727769404361302305178708054651154246939526512710105292707030667302444712597393995051462840476743136373997825918454117641332790646063658415292701903027601733947486696034869497654175242930604072700505903950314852292139257559484507886797792525393176515641619716844352436979444735596426063339105512682606159572621703669850647328126672452198906054988028078288142979633669674412480598219214633956574572210229867759974673812606936706913408155941201611596019023775352555630060624798326124988128819293734347686268921923977783391073310658825681377717232831532908252509273304785072497713944833389255208117560845296659055394096556854170600117985729381399825831929367910039184409928657560599359891000296986446097471471847010153128376263114677420914557404181590880006494323785583930853082830547607679952435739163122188605754967383224319565065546085288120190236364471270374863442172725787950342848631294491631847534753143504139209610879605773098720135248407505763719925365047090858251393686346386336804289176710760211115982887553994012007601394703366179371539630613986365549221374159790511908358829009765664730073387931467891318146510931676157582135142486044229244530411316065270097433008849903467540551864067734260358340960860553374736276093565885310976099423834738222208729246449768456057956251676557408841032173134562773585605235823638953203853402484227337163912397321599544082842166663602329654569470357718487344203422770665383738750616921276801576618109542009770836360436111059240911788954033802142652394892968643980892611463541457153519434285072135345301831587562827573389826889852355779929572764522939156747756667605108788764845349363606827805056462281359888587925994094644604170520447004631513797543173718775603981596264750141090665886616218003826698996196558058720863972117699521946678985701179833244060181157565807428418291061519391763005919431443460515404771057005433900018245311773371895585760360718286050635647997900413976180895536366960316219311325022385179167205518065926351803625121457592623836934822266589557699466049193811248660909979812857182349400661555219611220720309227764620099931524427358948871057662389469388944649509396033045434084210246240104872332875008174917987554387938738143989423801176270083719605309438394006375611645856094312951759771393539607432279248922126704580818331376416581826956210587289244774003594700926866265965142205063007859200248829186083974373235384908396432614700053242354064704208949921025040472678105908364400746638002087012666420945718170294675227854007450855237772089058168391844659282941701828823301497155423523591177481862859296760504820386434310877956289292540563894662194826871104282816389397571175778691543016505860296521745958198887868040811032843273986719862130620555985526603640504628215230615459447448990883908199973874745296981077620148713400012253552224669540931521311533791579802697955571050850747387475075806876537644578252443263804614304288923593485296105826938210349800040524840708440356116781717051281337880570564345061611933042444079826037795119854869455915205196009304127100727784930155503889536033826192934379708187432094991415959339636811062755729527800425486306005452383915106899891357882001941178653568214911852820785213012551851849371150342215954224451190020739353962740020811046553020793286725474054365271759589350071633607632161472581540764205302004534018357233829266191530835409512022632916505442612361919705161383935732669376015691442994494374485680977569630312958871916112929468188493633864739274760122696415884890096571708616059814720446742866420876533479985822209061980217321161423041947775499073873856794118982466091309169177227420723336763503267834058630193019324299639720444517928812285447821195353089891012534297552472763573022628138209180743974867145359077863353016082155991131414420509144729353502223081719366350934686585865631485557586244781862010871188976065296989926932817870557643514338206014107732926106343152533718224338526352021773544071528189813769875515757454693972715048846979361950047772097056179391382898984532742622728864710888327017372325881824465843624958059256033810521560620615571329915608489206434030339526226345145428367869828807425142256745180618414956468611163540497189768215422772247947403357152743681940989205011365340012384671429655186734415374161504256325671343024765512521921803578016924032669954174608759240920700466934039651017813485783569444076047023254075555776472845075182689041829396611331016013111907739863246277821902365066037404160672496249013743321724645409741299557052914243820807609836482346597388669134991978401310801558134397919485283043673901248208244481412809544377389832005986490915950532285791457688496257866588599917986752055455809900455646117875524937012455321717019428288461740273664997847550829422802023290122163010230977215156944642790980219082668986883426307160920791408519769523555348865774342527753119724743087304361951139611908003025587838764420608504473063129927788894272918972716989057592524467966018970748296094919064876469370275077386643239191904225429023531892337729316673608699622803255718530891928440380507103006477684786324319100022392978525537237556621364474009676053943983823576460699246526008909062410590421545392790441152958034533450025624410100635953003959886446616959562635187806068851372346270799732723313469397145628554261546765063246567662027924520858134771760852169134094652030767339184114750414016892412131982688156866456148538028753933116023229255561894104299533564009578649534093511526645402441877594931693056044868642086275720117231952640502309977456764783848897346431721598062678767183800524769688408498918508614900343240347674268624595239589035858213500645099817824463608731775437885967767291952611121385919472545140030118050343787527766440276261894101757687268042817662386068047788524288743025914524707395054652513533945959878961977891104189029294381856720507096460626354173294464957661265195349570186001541262396228641389779673332907056737696215649818450684226369036784955597002607986799626101903933126376855696876702929537116252800554310078640872893922571451248113577862766490242516199027747109033593330930494838059785662884478744146984149906712376478958226329490467981208998485716357108783119184863025450162092980582920833481363840542172005612198935366937133673339246441612522319694347120641737549121635700857369439730597970971972666664226743111776217640306868131035189911227133972403688700099686292254646500638528862039380050477827691283560337254825579391298525150682996910775425764748832534141213280062671709400909822352965795799780301828242849022147074811112401860761341515038756983091865278065889668236252393784527263453042041880250844236319038331838455052236799235775292910692504326144695010986108889991465855188187358252816430252093928525807796973762084563748211443398816271003170315133440230952635192958868069082135585368016100021374085115448491268584126869589917414913382057849280069825519574020181810564129725083607035685105533178784082900004155251186577945396331753853209214972052660783126028196116485809868458752512999740409279768317663991465538610893758795221497173172813151793290443112181587102351874075722210012376872194474720934931232410706508061856237252673254073332487575448296757345001932190219911996079798937338367324257610393898534927877747398050808001554476406105352220232540944356771879456543040673589649101761077594836454082348613025471847648518957583667439979150851285802060782055446299172320202822291488695939972997429747115537185892423849385585859540743810488262464878805330427146301194158989632879267832732245610385219701113046658710050008328517731177648973523092666123458887310288351562644602367199664455472760831011878838915114934093934475007302585581475619088139875235781233134227986650352272536717123075686104500454897036007956982762639234410714658489578024140815840522953693749971066559489445924628661996355635065262340533943914211127181069 \ No newline at end of file diff --git a/fortran/cmd/build.sh b/fortran/cmd/build.sh new file mode 100755 index 0000000..1e83977 --- /dev/null +++ b/fortran/cmd/build.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# Fortran Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Fortran Build ===" +echo "" + +# Check for gfortran +if command -v gfortran &> /dev/null; then + FC=gfortran +elif command -v f95 &> /dev/null; then + FC=f95 +elif command -v f90 &> /dev/null; then + FC=f90 +else + echo "✗ Ingen Fortran-kompilator hittades!" + echo " Installera gfortran: brew install gcc" + exit 1 +fi + +echo "Använder: $FC" + +# Compile +if $FC -O2 -o bin/print_hej src/print_hej.f90 2>&1; then + echo "✓ Kompilering lyckades!" + echo " Executable: bin/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej [decimaler]" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/fortran/src/print_hej.f90 b/fortran/src/print_hej.f90 new file mode 100644 index 0000000..00f47ff --- /dev/null +++ b/fortran/src/print_hej.f90 @@ -0,0 +1,157 @@ +! Pi Calculator using Machin's Formula +! pi/4 = 4*arctan(1/5) - arctan(1/239) +program pi_calculator + implicit none + integer :: decimals, argc, i, n + character(len=32) :: arg + integer, allocatable :: pi(:), a(:), b(:), term(:), contrib(:) + integer :: scale_len + integer :: carry, rem, x_sq, divisor + + argc = command_argument_count() + if (argc > 0) then + call get_command_argument(1, arg) + read(arg, *) decimals + else + decimals = 100 + end if + if (decimals <= 0) decimals = 100 + + scale_len = decimals + 20 + allocate(pi(scale_len)) + allocate(a(scale_len)) + allocate(b(scale_len)) + allocate(term(scale_len)) + allocate(contrib(scale_len)) + + ! Initialize + pi = 0 + a = 0 + b = 0 + + ! Calculate arctan(1/5) -> a + call arctan(5, a, scale_len) + + ! Calculate arctan(1/239) -> b + call arctan(239, b, scale_len) + + ! pi = 16*a - 4*b + ! First multiply a by 16 + carry = 0 + do i = scale_len, 1, -1 + pi(i) = a(i) * 16 + carry + carry = pi(i) / 10 + pi(i) = mod(pi(i), 10) + end do + + ! Then multiply b by 4 + carry = 0 + do i = scale_len, 1, -1 + b(i) = b(i) * 4 + carry + carry = b(i) / 10 + b(i) = mod(b(i), 10) + end do + + ! Then subtract b from pi + carry = 0 + do i = scale_len, 1, -1 + pi(i) = pi(i) - b(i) - carry + if (pi(i) < 0) then + pi(i) = pi(i) + 10 + carry = 1 + else + carry = 0 + end if + end do + + ! Print result + write(*, '(A)', advance='no') '3.' + do i = 2, decimals + 1 + write(*, '(I1)', advance='no') pi(i) + end do + write(*, *) + + deallocate(pi, a, b, term, contrib) + +contains + + subroutine arctan(x, result, len) + integer, intent(in) :: x, len + integer, intent(out) :: result(len) + integer :: n, i + integer :: term(len), contrib(len) + integer :: rem, x_sq, divisor, carry_local + logical :: term_zero + + result = 0 + term = 0 + term(1) = 1 + + ! term = 10^len / x + rem = 0 + do i = 1, len + rem = rem * 10 + term(i) + term(i) = rem / x + rem = mod(rem, x) + end do + + x_sq = x * x + n = 0 + + do while (n < len * 3) + divisor = 2 * n + 1 + + ! contrib = term / divisor + rem = 0 + do i = 1, len + rem = rem * 10 + term(i) + contrib(i) = rem / divisor + rem = mod(rem, divisor) + end do + + ! result = result +/- contrib + if (mod(n, 2) == 0) then + ! result = result + contrib + carry_local = 0 + do i = len, 1, -1 + result(i) = result(i) + contrib(i) + carry_local + carry_local = result(i) / 10 + result(i) = mod(result(i), 10) + end do + else + ! result = result - contrib + carry_local = 0 + do i = len, 1, -1 + result(i) = result(i) - contrib(i) - carry_local + if (result(i) < 0) then + result(i) = result(i) + 10 + carry_local = 1 + else + carry_local = 0 + end if + end do + end if + + ! term = term / x^2 + rem = 0 + do i = 1, len + rem = rem * 10 + term(i) + term(i) = rem / x_sq + rem = mod(rem, x_sq) + end do + + ! Check if term is zero + term_zero = .true. + do i = 1, len + if (term(i) /= 0) then + term_zero = .false. + exit + end if + end do + if (term_zero) exit + + n = n + 1 + end do + end subroutine arctan + +end program pi_calculator \ No newline at end of file diff --git a/go/cmd/build.sh b/go/cmd/build.sh new file mode 100755 index 0000000..d518f1d --- /dev/null +++ b/go/cmd/build.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# Go Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Go Build ===" +echo "" + +# Kompilera Go-programmet +cd src +go build -o ../bin/print_hej print_hej.go + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Binär: bin/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej [decimaler]" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/go/cmd/test.sh b/go/cmd/test.sh new file mode 100755 index 0000000..871d123 --- /dev/null +++ b/go/cmd/test.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Go Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Go Pi-beräkning Unit Tester ===" +echo "" + +cd src +go test -v + +exit $? \ No newline at end of file diff --git a/go/src/go.mod b/go/src/go.mod new file mode 100644 index 0000000..f933cb5 --- /dev/null +++ b/go/src/go.mod @@ -0,0 +1,3 @@ +module print_hej + +go 1.21 \ No newline at end of file diff --git a/go/src/pi_test.go b/go/src/pi_test.go new file mode 100644 index 0000000..6e00874 --- /dev/null +++ b/go/src/pi_test.go @@ -0,0 +1,73 @@ +package main + +import ( + "os/exec" + "strings" + "testing" +) + +const scriptPath = "/Users/einand/Code/test/go/print_hej" + +func runScript(decimals ...int) string { + args := []string{} + if len(decimals) > 0 { + args = append(args, string(rune(decimals[0]))) + } + cmd := exec.Command(scriptPath, args...) + output, err := cmd.Output() + if err != nil { + panic(err) + } + return strings.TrimSpace(string(output)) +} + +func Test10Decimals(t *testing.T) { + result := runScript(10) + expected := "3.1415926535" + if result != expected { + t.Errorf("Expected %s, got %s", expected, result) + } +} + +func Test5Decimals(t *testing.T) { + result := runScript(5) + expected := "3.14159" + if result != expected { + t.Errorf("Expected %s, got %s", expected, result) + } +} + +func Test1Decimal(t *testing.T) { + result := runScript(1) + expected := "3.1" + if result != expected { + t.Errorf("Expected %s, got %s", expected, result) + } +} + +func Test100Decimals(t *testing.T) { + result := runScript(100) + expected := "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + if result != expected { + t.Errorf("Expected %s, got %s", expected, result) + } +} + +func TestDefault100Decimals(t *testing.T) { + result := runScript() + expected := "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + if result != expected { + t.Errorf("Expected %s, got %s", expected, result) + } +} + +func Test10000Decimals(t *testing.T) { + result := runScript(10000) + // Check length: "3." + 10000 digits = 10002 characters + if len(result) != 10002 { + t.Errorf("Expected 10002 characters, got %d", len(result)) + } + if !strings.HasPrefix(result, "3.14159") { + t.Errorf("Result should start with 3.14159, got %s", result[:10]) + } +} \ No newline at end of file diff --git a/go/src/print_hej.go b/go/src/print_hej.go new file mode 100644 index 0000000..6ad8429 --- /dev/null +++ b/go/src/print_hej.go @@ -0,0 +1,109 @@ +package main + +import ( + "fmt" + "math/big" + "os" + "strconv" +) + +func main() { + // Hämta antal decimaler från argument + decimals := 100 + if len(os.Args) > 1 { + if d, err := strconv.Atoi(os.Args[1]); err == nil && d > 0 { + decimals = d + } + } + + // Beräkna pi med Machins formel: pi/4 = 4*arctan(1/5) - arctan(1/239) + // Använd exakt aritmetik med big.Int + pi := calculatePiExact(decimals) + + // Skriv ut resultatet + fmt.Println(formatPiExact(pi, decimals)) +} + +func calculatePiExact(decimals int) *big.Int { + // pi = 4 * (4*arctan(1/5) - arctan(1/239)) + // Skala med 10^(decimals+10) för exakt aritmetik + + scale := new(big.Int).Exp(big.NewInt(10), big.NewInt(int64(decimals+10)), nil) + + atan1_5 := arctanExact(5, scale) + atan1_239 := arctanExact(239, scale) + + // 4 * atan(1/5) + result := new(big.Int).Mul(big.NewInt(4), atan1_5) + + // - atan(1/239) + result.Sub(result, atan1_239) + + // * 4 + result.Mul(result, big.NewInt(4)) + + return result +} + +func arctanExact(x int64, scale *big.Int) *big.Int { + // arctan(1/x) = 1/x - 1/(3*x^3) + 1/(5*x^5) - ... + // Med skala: scale/x - scale/(3*x^3) + scale/(5*x^5) - ... + + result := big.NewInt(0) + + xBig := big.NewInt(x) + xSquared := new(big.Int).Mul(xBig, xBig) + + // term = scale / x + term := new(big.Int).Div(scale, xBig) + + sign := big.NewInt(1) + + for n := 0; n < 100000; n++ { + // Lägg till term / (2n+1) med rätt tecken + divisor := big.NewInt(int64(2*n + 1)) + contrib := new(big.Int).Div(term, divisor) + + if sign.Sign() > 0 { + result.Add(result, contrib) + } else { + result.Sub(result, contrib) + } + + // Nästa term: term = term / x^2 + term.Div(term, xSquared) + + // Växla tecken + sign.Neg(sign) + + // Avbryt om termen är 0 + if term.Sign() == 0 { + break + } + } + + return result +} + +func formatPiExact(pi *big.Int, decimals int) string { + // Konvertera till sträng + piStr := pi.String() + + // pi är skalad med 10^(decimals+10), så vi behöver justera decimalpunkten + // För pi ≈ 3.14159..., pi*10^110 ≈ 314159... (110 siffror) + + // Lägg till ledande noll om nödvändigt + for len(piStr) < decimals+10 { + piStr = "0" + piStr + } + + // Ta första siffran, sedan decimalpunkt, sedan resten + if len(piStr) > decimals+10 { + piStr = piStr[:decimals+10] + } + + // Resultatet bör vara "3" följt av decimaler + result := string(piStr[0]) + "." + piStr[1:decimals+1] + + return result +} \ No newline at end of file diff --git a/go/src/print_hej_test.go b/go/src/print_hej_test.go new file mode 100644 index 0000000..68efed0 --- /dev/null +++ b/go/src/print_hej_test.go @@ -0,0 +1,126 @@ +package main + +import ( + "math/big" + "os" + "os/exec" + "strings" + "testing" +) + +func TestPi10Decimals(t *testing.T) { + cmd := exec.Command("./print_hej", "10") + output, err := cmd.Output() + if err != nil { + t.Fatalf("Kunde inte köra program: %v", err) + } + + result := strings.TrimSpace(string(output)) + expected := "3.1415926535" + + if result != expected { + t.Errorf("Fel resultat för 10 decimaler.\nFörväntade: %s\nFick: %s", expected, result) + } +} + +func TestPi5Decimals(t *testing.T) { + cmd := exec.Command("./print_hej", "5") + output, err := cmd.Output() + if err != nil { + t.Fatalf("Kunde inte köra program: %v", err) + } + + result := strings.TrimSpace(string(output)) + expected := "3.14159" + + if result != expected { + t.Errorf("Fel resultat för 5 decimaler.\nFörväntade: %s\nFick: %s", expected, result) + } +} + +func TestPi1Decimal(t *testing.T) { + cmd := exec.Command("./print_hej", "1") + output, err := cmd.Output() + if err != nil { + t.Fatalf("Kunde inte köra program: %v", err) + } + + result := strings.TrimSpace(string(output)) + expected := "3.1" + + if result != expected { + t.Errorf("Fel resultat för 1 decimal.\nFörväntade: %s\nFick: %s", expected, result) + } +} + +func TestPiDefault(t *testing.T) { + cmd := exec.Command("./print_hej") + output, err := cmd.Output() + if err != nil { + t.Fatalf("Kunde inte köra program: %v", err) + } + + result := strings.TrimSpace(string(output)) + + // Läs facit + facit, err := os.ReadFile("../facit.txt") + if err != nil { + t.Fatalf("Kunde inte läsa facit: %v", err) + } + + expected := strings.TrimSpace(string(facit)) + expected = strings.ReplaceAll(expected, "\n", "")[:103] + + if result != expected { + t.Errorf("Fel resultat för default (100 decimaler).\nFörväntade: %s\nFick: %s", expected, result) + } +} + +func TestPiInvalidInput(t *testing.T) { + cmd := exec.Command("./print_hej", "abc") + output, err := cmd.Output() + if err != nil { + t.Fatalf("Kunde inte köra program: %v", err) + } + + result := strings.TrimSpace(string(output)) + + // Ska använda default (100 decimaler) + if !strings.HasPrefix(result, "3.1415926535") { + t.Errorf("Hanterar inte ogiltig input korrekt.\nFick: %s", result) + } +} + +func TestCalculatePiExact(t *testing.T) { + pi := calculatePiExact(10) + result := formatPiExact(pi, 10) + + expected := "3.1415926535" + if result != expected { + t.Errorf("calculatePiExact gav fel resultat.\nFörväntade: %s\nFick: %s", expected, result) + } +} + +func TestArctanExact(t *testing.T) { + scale := new(big.Int).Exp(big.NewInt(10), big.NewInt(20), nil) + + // arctan(1/5) ska vara ungefär 0.1973955598... + atan1_5 := arctanExact(5, scale) + + // Kontrollera att resultatet är positivt + if atan1_5.Sign() <= 0 { + t.Errorf("arctan(1/5) ska vara positivt, fick: %v", atan1_5) + } +} + +func TestFormatPiExact(t *testing.T) { + // Skapa ett pi-värde: 31415926535... (skalat med 10^10) + pi := big.NewInt(31415926535) + + result := formatPiExact(pi, 10) + expected := "3.1415926535" + + if result != expected { + t.Errorf("formatPiExact gav fel resultat.\nFörväntade: %s\nFick: %s", expected, result) + } +} \ No newline at end of file diff --git a/haskell/cmd/build.sh b/haskell/cmd/build.sh new file mode 100755 index 0000000..a3c03ba --- /dev/null +++ b/haskell/cmd/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Haskell Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Haskell Build ===" +echo "" + +# Kompilera Haskell-programmet +ghc -o bin/print_hej src/print_hej.hs + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Binär: bin/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej [decimaler]" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/haskell/cmd/test.sh b/haskell/cmd/test.sh new file mode 100755 index 0000000..c925349 --- /dev/null +++ b/haskell/cmd/test.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Haskell Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Haskell Pi-beräkning Unit Tester ===" +echo "" + +cd src +ghc -o ../bin/pi_test PiTest.hs +if [ $? -eq 0 ]; then + ../bin/pi_test + exit $? +else + echo "✗ Kompilering av tester misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/haskell/src/PiTest.hs b/haskell/src/PiTest.hs new file mode 100644 index 0000000..96f339e --- /dev/null +++ b/haskell/src/PiTest.hs @@ -0,0 +1,66 @@ +module Main where + +import Test.HUnit +import System.Process +import Data.List (stripPrefix) + +scriptPath :: String +scriptPath = "/Users/einand/Code/test/haskell/print_hej" + +runScript :: Maybe String -> IO String +runScript mArgs = do + let args = maybe [] (\x -> [x]) mArgs + output <- readProcess scriptPath args "" + return $ init output -- Remove trailing newline + +test10Decimals :: Test +test10Decimals = TestCase $ do + result <- runScript (Just "10") + let expected = "3.1415926535" + assertEqual "10 decimals" expected result + +test5Decimals :: Test +test5Decimals = TestCase $ do + result <- runScript (Just "5") + let expected = "3.14159" + assertEqual "5 decimals" expected result + +test1Decimal :: Test +test1Decimal = TestCase $ do + result <- runScript (Just "1") + let expected = "3.1" + assertEqual "1 decimal" expected result + +test100Decimals :: Test +test100Decimals = TestCase $ do + result <- runScript (Just "100") + let expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + assertEqual "100 decimals" expected result + +testDefault100Decimals :: Test +testDefault100Decimals = TestCase $ do + result <- runScript Nothing + let expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + assertEqual "default 100 decimals" expected result + +test10000Decimals :: Test +test10000Decimals = TestCase $ do + result <- runScript (Just "10000") + -- Check length: "3." + 10000 digits = 10002 characters + assertEqual "10000 decimals length" 10002 (length result) + assertBool "10000 decimals starts with 3.14159" (take 7 result == "3.14159") + +tests :: Test +tests = TestList [ + TestLabel "test10Decimals" test10Decimals, + TestLabel "test5Decimals" test5Decimals, + TestLabel "test1Decimal" test1Decimal, + TestLabel "test100Decimals" test100Decimals, + TestLabel "testDefault100Decimals" testDefault100Decimals, + TestLabel "test10000Decimals" test10000Decimals + ] + +main :: IO () +main = do + counts <- runTestTT tests + putStrLn $ showCounts counts \ No newline at end of file diff --git a/haskell/src/print_hej.hs b/haskell/src/print_hej.hs new file mode 100644 index 0000000..46861f6 --- /dev/null +++ b/haskell/src/print_hej.hs @@ -0,0 +1,49 @@ +module Main where + +import System.Environment (getArgs) +import Data.Char (digitToInt) + +-- Calculate arctan(1/x) using Taylor series +-- arctan(1/x) = 1/x - 1/(3*x^3) + 1/(5*x^5) - ... +arctan :: Integer -> Integer -> Integer +arctan x decimals = arctanIter scale xSquared term 0 0 + where + scale = 10 ^ (decimals + 10) + xSquared = x * x + term = scale `div` x -- First term: scale / x + + arctanIter :: Integer -> Integer -> Integer -> Integer -> Integer -> Integer + arctanIter scale xSquared term n result + | term == 0 || n > decimals * 3 = result + | otherwise = arctanIter scale xSquared newTerm (n + 1) newResult + where + divisor = 2 * n + 1 + contrib = term `div` divisor + newResult = if even n + then result + contrib + else result - contrib + newTerm = term `div` xSquared -- Divide by x² each iteration + +-- Calculate pi using Machin's formula +-- pi/4 = 4*arctan(1/5) - arctan(1/239) +calculatePi :: Integer -> Integer +calculatePi decimals = 16 * atan1_5 - 4 * atan1_239 + where + atan1_5 = arctan 5 decimals + atan1_239 = arctan 239 decimals + +-- Format pi with decimal point +formatPi :: Integer -> Integer -> String +formatPi pi decimals = "3." ++ take (fromIntegral decimals) (drop 1 (show pi)) + +main :: IO () +main = do + args <- getArgs + let decimals = case args of + [] -> 100 + (x:_) -> case reads x :: [(Integer, String)] of + [(d, _)] -> if d > 0 then d else 100 + _ -> 100 + + let pi = calculatePi decimals + putStrLn (formatPi pi decimals) \ No newline at end of file diff --git a/java/cmd/build.sh b/java/cmd/build.sh new file mode 100755 index 0000000..f047e74 --- /dev/null +++ b/java/cmd/build.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Java Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Java Build ===" +echo "" + +# Kompilera Java-programmet +cd src +javac print_hej.java + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Class: src/print_hej.class" + echo "" + echo "För att köra:" + echo " java -cp src print_hej [decimaler]" + + # Skapa wrapper script + mkdir -p ../bin + cat > ../bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +java -cp src print_hej "$@" +EOF + chmod +x ../bin/print_hej + echo "Wrapper script skapad: bin/print_hej" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/java/src/print_hej.java b/java/src/print_hej.java new file mode 100644 index 0000000..d2e4fde --- /dev/null +++ b/java/src/print_hej.java @@ -0,0 +1,65 @@ +import java.math.BigInteger; + +public class print_hej { + public static void main(String[] args) { + int decimals = 100; + if (args.length > 0) { + try { + decimals = Integer.parseInt(args[0]); + if (decimals <= 0) decimals = 100; + } catch (NumberFormatException e) { + decimals = 100; + } + } + + BigInteger pi = calculatePi(decimals); + System.out.println(formatPi(pi, decimals)); + } + + // Calculate arctan(1/x) using Taylor series + static BigInteger arctan(int x, int decimals) { + BigInteger scale = BigInteger.TEN.pow(decimals + 10); + BigInteger xBig = BigInteger.valueOf(x); + BigInteger xSquared = xBig.multiply(xBig); + + BigInteger result = BigInteger.ZERO; + BigInteger term = scale.divide(xBig); + + int n = 0; + while (term.compareTo(BigInteger.ZERO) != 0 && n < decimals * 3) { + BigInteger divisor = BigInteger.valueOf(2 * n + 1); + BigInteger contrib = term.divide(divisor); + + if (n % 2 == 0) { + result = result.add(contrib); + } else { + result = result.subtract(contrib); + } + + term = term.divide(xSquared); + n++; + + if (n > decimals * 2) break; + } + + return result; + } + + // Calculate pi using Machin's formula + static BigInteger calculatePi(int decimals) { + BigInteger atan1_5 = arctan(5, decimals); + BigInteger atan1_239 = arctan(239, decimals); + + return atan1_5.multiply(BigInteger.valueOf(16)) + .subtract(atan1_239.multiply(BigInteger.valueOf(4))); + } + + // Format pi with decimal point + static String formatPi(BigInteger pi, int decimals) { + String piStr = pi.toString(); + while (piStr.length() < decimals + 10) { + piStr = "0" + piStr; + } + return "3." + piStr.substring(1, decimals + 1); + } +} \ No newline at end of file diff --git a/javascript/cmd/build.sh b/javascript/cmd/build.sh new file mode 100755 index 0000000..0156d4d --- /dev/null +++ b/javascript/cmd/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# JavaScript Build Script - JavaScript är interpreterat, ingen kompilering behövs + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== JavaScript Build ===" +echo "JavaScript är ett interpreterat språk, ingen kompilering behövs." +echo "Script: src/print_hej.js" +echo "" + +# Skapa wrapper script +mkdir -p bin +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +node src/print_hej.js "$@" +EOF +chmod +x bin/print_hej + +echo "Wrapper script skapad: bin/print_hej" +echo "" +echo "För att köra:" +echo " ./bin/print_hej [decimaler]" +echo "" +echo "✓ Klart!" \ No newline at end of file diff --git a/javascript/cmd/test.sh b/javascript/cmd/test.sh new file mode 100755 index 0000000..76685c1 --- /dev/null +++ b/javascript/cmd/test.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# JavaScript Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== JavaScript Pi-beräkning Unit Tester (Jest) ===" +echo "" + +cd src +npm test + +exit $? \ No newline at end of file diff --git a/javascript/package-lock.json b/javascript/package-lock.json new file mode 100644 index 0000000..904f2ee --- /dev/null +++ b/javascript/package-lock.json @@ -0,0 +1,3678 @@ +{ + "name": "javascript-pi", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "javascript-pi", + "version": "1.0.0", + "dependencies": { + "big.js": "^7.0.1" + }, + "devDependencies": { + "jest": "^29.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", + "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", + "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.28.6", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", + "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", + "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz", + "integrity": "sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz", + "integrity": "sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz", + "integrity": "sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.6.tgz", + "integrity": "sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.10", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz", + "integrity": "sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/node": { + "version": "25.6.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz", + "integrity": "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.19.0" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.10.20", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.20.tgz", + "integrity": "sha512-1AaXxEPfXT+GvTBJFuy4yXVHWJBXa4OdbIebGN/wX5DlsIkU0+wzGnd2lOzokSk51d5LUmqjgBLRLlypLUqInQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/big.js": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-7.0.1.tgz", + "integrity": "sha512-iFgV784tD8kq4ccF1xtNMZnXeZzVuXWWM+ERFzKQjv+A5G9HC8CY3DuV45vgzFFcW+u2tIvmF95+AzWgs6BjCg==", + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/bigjs" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", + "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.10.12", + "caniuse-lite": "^1.0.30001782", + "electron-to-chromium": "^1.5.328", + "node-releases": "^2.0.36", + "update-browserslist-db": "^1.2.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001790", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001790.tgz", + "integrity": "sha512-bOoxfJPyYo+ds6W0YfptaCWbFnJYjh2Y1Eow5lRv+vI2u8ganPZqNm1JwNh0t2ELQCqIWg4B3dWEusgAmsoyOw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", + "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", + "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", + "dev": true, + "license": "MIT" + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz", + "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.343", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.343.tgz", + "integrity": "sha512-YHnQ3MXI08icvL9ZKnEBy05F2EQ8ob01UaMOuMbM8l+4UcAq6MPPbBTJBbsBUg3H8JeZNt+O4fjsoWth3p6IFg==", + "dev": true, + "license": "ISC" + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "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, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", + "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.38.tgz", + "integrity": "sha512-3qT/88Y3FbH/Kx4szpQQ4HzUbVrHPKTLVpVocKiLfoYvw9XSGOX2FmD2d6DrXbVYyAQTF2HeF6My8jmzx7/CRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/undici-types": { + "version": "7.19.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz", + "integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==", + "dev": true, + "license": "MIT" + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/javascript/src/package.json b/javascript/src/package.json new file mode 100644 index 0000000..8f9a90f --- /dev/null +++ b/javascript/src/package.json @@ -0,0 +1,14 @@ +{ + "name": "javascript-pi", + "version": "1.0.0", + "description": "JavaScript pi calculation", + "scripts": { + "test": "jest" + }, + "dependencies": { + "big.js": "^7.0.1" + }, + "devDependencies": { + "jest": "^29.0.0" + } +} diff --git a/julia/cmd/build.sh b/julia/cmd/build.sh new file mode 100755 index 0000000..54b485e --- /dev/null +++ b/julia/cmd/build.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Julia Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Julia Build ===" +echo "" + +# Julia är ett interpreterat språk, men vi kan förkompilera för snabbare start +# Skapa wrapper script + +mkdir -p bin +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +julia src/print_hej.jl "$@" +EOF +chmod +x bin/print_hej + +echo "✓ Ingen kompilering behövs för Julia" +echo " Använder Julia interpreter" +echo "" +echo "Wrapper script skapad: bin/print_hej" +echo "" +echo "För att köra:" +echo " ./bin/print_hej [decimaler]" \ No newline at end of file diff --git a/julia/cmd/test.sh b/julia/cmd/test.sh new file mode 100755 index 0000000..8f01399 --- /dev/null +++ b/julia/cmd/test.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Julia Test Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Julia Test ===" +echo "" + +# Testa pi-beräkning med olika antal decimaler +for decimals in 1 2 5 10 100; do + result=$(./bin/print_hej $decimals 2>/dev/null) + if [ $? -eq 0 ]; then + echo "✓ $decimals decimaler: $result" + else + echo "✗ $decimals decimaler misslyckades" + fi +done \ No newline at end of file diff --git a/julia/src/print_hej.jl b/julia/src/print_hej.jl new file mode 100644 index 0000000..3b60380 --- /dev/null +++ b/julia/src/print_hej.jl @@ -0,0 +1,65 @@ +#!/usr/bin/env julia + +# Pi calculation using Machin's formula +# pi/4 = 4*arctan(1/5) - arctan(1/239) + +# Calculate pi using Machin's formula +function calculate_pi(decimals::Int) + if decimals < 1 + decimals = 100 + end + + # Set precision (need extra bits for accuracy) + setprecision(decimals * 4 + 100) + + # Machin's formula: pi/4 = 4*arctan(1/5) - arctan(1/239) + pi_val = BigFloat(4) * atan(BigFloat(1)/5) - atan(BigFloat(1)/239) + pi_val *= 4 + + # Format output + pi_str = string(pi_val) + + # Extract just the digits we need + if decimals == 0 + return "3" + else + # Find decimal point + decimal_pos = findfirst('.', pi_str) + if decimal_pos === nothing + return pi_str + end + + # Get digits after decimal point + after_decimal = pi_str[decimal_pos+1:end] + + # Pad or truncate to desired length + if length(after_decimal) < decimals + after_decimal *= repeat("0", decimals - length(after_decimal)) + else + after_decimal = after_decimal[1:decimals] + end + + return "3." * after_decimal + end +end + +# Main +function main() + # Get decimals from command line + decimals = 100 + if length(ARGS) > 0 + try + decimals = parse(Int, ARGS[1]) + if decimals < 1 + decimals = 100 + end + catch + decimals = 100 + end + end + + result = calculate_pi(decimals) + println(result) +end + +main() \ No newline at end of file diff --git a/kotlin/cmd/build.sh b/kotlin/cmd/build.sh new file mode 100755 index 0000000..45ee136 --- /dev/null +++ b/kotlin/cmd/build.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# Kotlin Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Kotlin Build ===" +echo "" + +# Check for kotlinc +if ! command -v kotlinc &> /dev/null; then + echo "✗ Kotlin-kompilator hittades inte!" + echo " Installera Kotlin: brew install kotlin" + exit 1 +fi + +echo "Använder: kotlinc" + +# Compile +mkdir -p bin +if kotlinc -include-runtime -d bin/print_hej.jar src/print_hej.kt 2>&1; then + echo "✓ Kompilering lyckades!" + echo " Executable: bin/print_hej.jar" + echo "" + + # Skapa wrapper script + cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +java -jar bin/print_hej.jar "$@" +EOF + chmod +x bin/print_hej + + echo "För att köra:" + echo " ./bin/print_hej " +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/kotlin/src/print_hej.kt b/kotlin/src/print_hej.kt new file mode 100644 index 0000000..84ae360 --- /dev/null +++ b/kotlin/src/print_hej.kt @@ -0,0 +1,66 @@ +import java.math.BigInteger +import kotlin.system.exitProcess + +// Calculate arctan(1/x) using Taylor series +// arctan(1/x) = 1/x - 1/(3*x^3) + 1/(5*x^5) - ... +fun arctan(x: Int, decimals: Int): BigInteger { + val scale = BigInteger.TEN.pow(decimals + 10) + val xBig = BigInteger.valueOf(x.toLong()) + val xSquared = xBig * xBig + + var term = scale / xBig + var result = BigInteger.ZERO + var n = 0 + + while (term != BigInteger.ZERO && n < decimals * 3) { + val divisor = BigInteger.valueOf(2L * n + 1) + val contrib = term / divisor + + if (n % 2 == 0) { + result += contrib + } else { + result -= contrib + } + + term = term / xSquared + n++ + } + + return result +} + +fun calculatePi(decimals: Int): BigInteger { + val atan1_5 = arctan(5, decimals) + val atan1_239 = arctan(239, decimals) + + // pi = 16*arctan(1/5) - 4*arctan(1/239) + return atan1_5 * BigInteger.valueOf(16) - atan1_239 * BigInteger.valueOf(4) +} + +fun main(args: Array) { + var decimals = 100 + + if (args.isNotEmpty()) { + try { + decimals = args[0].toInt() + if (decimals < 1) decimals = 100 + } catch (e: NumberFormatException) { + decimals = 100 + } + } + + val pi = calculatePi(decimals) + val piStr = pi.toString() + + // Print with decimal point + print("3.") + val startIndex = 1 + val endIndex = minOf(startIndex + decimals, piStr.length) + print(piStr.substring(startIndex, endIndex)) + + // Pad with zeros if needed + for (i in 0 until decimals - (endIndex - startIndex)) { + print("0") + } + println() +} \ No newline at end of file diff --git a/lua/cmd/build.sh b/lua/cmd/build.sh new file mode 100755 index 0000000..bdfc162 --- /dev/null +++ b/lua/cmd/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Lua Build Script - Lua är interpreterat, ingen kompilering behövs + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Lua Build ===" +echo "Lua är ett interpreterat språk, ingen kompilering behövs." +echo "Script: src/print_hej.lua" +echo "" + +# Skapa wrapper script +mkdir -p bin +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +lua src/print_hej.lua "$@" +EOF +chmod +x bin/print_hej + +echo "Wrapper script skapad: bin/print_hej" +echo "" +echo "För att köra:" +echo " ./bin/print_hej [decimaler]" +echo "" +echo "✓ Klart!" \ No newline at end of file diff --git a/lua/cmd/test.sh b/lua/cmd/test.sh new file mode 100755 index 0000000..b6743a5 --- /dev/null +++ b/lua/cmd/test.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Lua Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Lua Pi-beräkning Unit Tester ===" +echo "" + +cd src +busted spec/ + +exit $? \ No newline at end of file diff --git a/lua/src/print_hej.lua b/lua/src/print_hej.lua new file mode 100644 index 0000000..be32dd7 --- /dev/null +++ b/lua/src/print_hej.lua @@ -0,0 +1,182 @@ +-- Simple BigInt implementation using base 10^9 +local BigInt = {} +BigInt.__index = BigInt + +function BigInt.new(value) + local self = setmetatable({}, BigInt) + if type(value) == "number" then + if value == 0 then + self.digits = {0} + else + self.digits = {math.abs(value)} + end + else + self.digits = {0} + end + return self +end + +function BigInt:add(other) + local carry = 0 + local maxLen = math.max(#self.digits, #other.digits) + + for i = 1, maxLen do + local a = self.digits[i] or 0 + local b = other.digits[i] or 0 + local sum = a + b + carry + + self.digits[i] = sum % 1000000000 + carry = math.floor(sum / 1000000000) + end + + if carry > 0 then + table.insert(self.digits, carry) + end +end + +function BigInt:subtract(other) + local borrow = 0 + + for i = 1, #self.digits do + local a = self.digits[i] + local b = other.digits[i] or 0 + local diff = a - b - borrow + + if diff < 0 then + diff = diff + 1000000000 + borrow = 1 + else + borrow = 0 + end + + self.digits[i] = diff + end + + -- Remove leading zeros + while #self.digits > 1 and self.digits[#self.digits] == 0 do + table.remove(self.digits) + end +end + +function BigInt:multiply(scalar) + local result = BigInt.new(0) + result.digits = {} + + local carry = 0 + for i = 1, #self.digits do + local prod = self.digits[i] * scalar + carry + result.digits[i] = prod % 1000000000 + carry = math.floor(prod / 1000000000) + end + + if carry > 0 then + table.insert(result.digits, carry) + end + + return result +end + +function BigInt:divide(divisor) + local result = BigInt.new(0) + result.digits = {} + + local remainder = 0 + for i = #self.digits, 1, -1 do + local cur = remainder * 1000000000 + self.digits[i] + result.digits[i] = math.floor(cur / divisor) + remainder = cur % divisor + end + + -- Remove leading zeros + while #result.digits > 1 and result.digits[#result.digits] == 0 do + table.remove(result.digits) + end + + return result +end + +function BigInt:isZero() + return #self.digits == 1 and self.digits[1] == 0 +end + +function BigInt:toString() + local result = "" + for i = #self.digits, 1, -1 do + if i == #self.digits then + result = result .. self.digits[i] + else + result = result .. string.format("%09d", self.digits[i]) + end + end + return result +end + +-- Power of 10 +local function pow10(exp) + local result = BigInt.new(1) + for i = 1, exp do + result = result:multiply(10) + end + return result +end + +-- Calculate arctan(1/x) using Taylor series +local function arctan(x, decimals) + local scale = pow10(decimals + 10) + local x_squared = x * x + + local term = scale:divide(x) + local result = BigInt.new(0) + local n = 0 + + while not term:isZero() do + local divisor = 2 * n + 1 + local contrib = term:divide(divisor) + + if n % 2 == 0 then + result:add(contrib) + else + result:subtract(contrib) + end + + term = term:divide(x_squared) + n = n + 1 + end + + return result +end + +-- Calculate pi using Machin's formula +local function calculate_pi(decimals) + local atan1_5 = arctan(5, decimals) + local atan1_239 = arctan(239, decimals) + + -- pi = 16*arctan(1/5) - 4*arctan(1/239) + local pi16 = atan1_5:multiply(16) + local pi4 = atan1_239:multiply(4) + pi16:subtract(pi4) + + local pi_str = pi16:toString() + + -- Format with decimal point + local result = "3." + local start = 2 + + for i = 0, decimals - 1 do + if start + i <= #pi_str then + result = result .. string.sub(pi_str, start + i, start + i) + else + result = result .. "0" + end + end + + return result +end + +-- Main +local decimals = 100 +if #arg > 0 then + decimals = tonumber(arg[1]) or 100 +end + +print(calculate_pi(decimals)) \ No newline at end of file diff --git a/lua/src/spec/pi_spec.lua b/lua/src/spec/pi_spec.lua new file mode 100644 index 0000000..ef38353 --- /dev/null +++ b/lua/src/spec/pi_spec.lua @@ -0,0 +1,59 @@ +#!/usr/bin/env lua +-- Unit tests for Lua pi calculation using busted + +local SCRIPT_PATH = "/Users/einand/Code/test/lua/print_hej.lua" + +local function run_script(...) + local args = {...} + local cmd = "lua " .. SCRIPT_PATH + for _, arg in ipairs(args) do + cmd = cmd .. " " .. tostring(arg) + end + + local handle = io.popen(cmd, "r") + local result = handle:read("*a") + handle:close() + + -- Trim newline + result = result:gsub("\n$", "") + return result +end + +describe("Pi calculation", function() + it("calculates 10 decimals", function() + local result = run_script(10) + local expected = "3.1415926535" + assert.are.equal(expected, result) + end) + + it("calculates 5 decimals", function() + local result = run_script(5) + local expected = "3.14159" + assert.are.equal(expected, result) + end) + + it("calculates 1 decimal", function() + local result = run_script(1) + local expected = "3.1" + assert.are.equal(expected, result) + end) + + it("calculates 100 decimals", function() + local result = run_script(100) + local expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + assert.are.equal(expected, result) + end) + + it("calculates default 100 decimals", function() + local result = run_script() + local expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + assert.are.equal(expected, result) + end) + + it("calculates 10000 decimals", function() + local result = run_script(10000) + -- Check length: "3." + 10000 digits = 10002 characters + assert.are.equal(10002, #result) + assert.is_true(string.sub(result, 1, 7) == "3.14159") + end) +end) \ No newline at end of file diff --git a/nim/cmd/build.sh b/nim/cmd/build.sh new file mode 100755 index 0000000..0e7bf0d --- /dev/null +++ b/nim/cmd/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Nim Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Nim Build ===" +echo "" + +# Kompilera Nim-programmet +nim c -o:bin/print_hej src/print_hej.nim + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Binär: bin/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej [decimaler]" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/nim/cmd/test.sh b/nim/cmd/test.sh new file mode 100755 index 0000000..320622c --- /dev/null +++ b/nim/cmd/test.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Nim Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Nim Pi-beräkning Unit Tester ===" +echo "" + +cd src +nim c -r test_pi.nim + +exit $? \ No newline at end of file diff --git a/nim/src/print_hej.nim b/nim/src/print_hej.nim new file mode 100644 index 0000000..4a94d3b --- /dev/null +++ b/nim/src/print_hej.nim @@ -0,0 +1,142 @@ +import std/strutils +import std/os + +type BigInt = object + digits: seq[uint64] + +proc initBigInt(value: int = 0): BigInt = + if value == 0: + result.digits = @[0'u64] + else: + result.digits = @[uint64(abs(value))] + +proc initBigInt(value: uint64): BigInt = + result.digits = @[value] + +proc `+`(a: BigInt, b: BigInt): BigInt = + result.digits = @[] + var carry: uint64 = 0 + let maxLen = max(a.digits.len, b.digits.len) + + for i in 0.. 0: + result.digits.add(carry) + +proc `-`(a: BigInt, b: BigInt): BigInt = + result.digits = a.digits + var borrow: int64 = 0 + + for i in 0.. 1 and result.digits[^1] == 0: + result.digits.delete(result.digits.len - 1) + +proc `*`(a: BigInt, b: uint64): BigInt = + result.digits = newSeq[uint64](a.digits.len) + var carry: uint64 = 0 + + for i in 0.. 0: + result.digits.add(carry) + +proc `div`(a: BigInt, divisor: uint64): BigInt = + result.digits = newSeq[uint64](a.digits.len) + var remainder: uint64 = 0 + + for i in countdown(a.digits.len - 1, 0): + let cur = remainder * 1_000_000_000 + a.digits[i] + result.digits[i] = cur div divisor + remainder = cur mod divisor + + # Remove leading zeros + while result.digits.len > 1 and result.digits[^1] == 0: + result.digits.delete(result.digits.len - 1) + +proc `$`(b: BigInt): string = + result = "" + for i in countdown(b.digits.len - 1, 0): + if i == b.digits.len - 1: + result.add($b.digits[i]) + else: + result.add(align($b.digits[i], 9, '0')) + +proc pow10(exp: int): BigInt = + result = initBigInt(1) + for i in 0.. 1 or term.digits[0] > 0: + let divisor = uint64(2 * n + 1) + let contrib = term div divisor + + if n mod 2 == 0: + result = result + contrib + else: + result = result - contrib + + term = term div xSquared + n += 1 + +proc calculatePi(decimals: int): string = + let atan1_5 = arctan(5, decimals) + let atan1_239 = arctan(239, decimals) + + # pi = 16*arctan(1/5) - 4*arctan(1/239) + var pi = atan1_5 * 16'u64 + let pi4 = atan1_239 * 4'u64 + pi = pi - pi4 + + let piStr = $pi + + # Format with decimal point + result = "3." + let start = 1 + var i = 0 + + while i < decimals: + if start + i < piStr.len: + result.add(piStr[start + i]) + else: + result.add('0') + i += 1 + +# Main +let decimals = if paramCount() > 0: + try: + parseInt(paramStr(1)) + except: + 100 +else: + 100 + +echo calculatePi(decimals) \ No newline at end of file diff --git a/nim/src/test_pi b/nim/src/test_pi new file mode 100755 index 0000000..8127362 Binary files /dev/null and b/nim/src/test_pi differ diff --git a/nim/src/test_pi.nim b/nim/src/test_pi.nim new file mode 100644 index 0000000..8d331be --- /dev/null +++ b/nim/src/test_pi.nim @@ -0,0 +1,45 @@ +import unittest +import osproc +import strutils + +const SCRIPT_PATH = "/Users/einand/Code/test/nim/print_hej" + +proc runScript(decimals: int = -1): string = + var cmd = SCRIPT_PATH + if decimals >= 0: + cmd = cmd & " " & $decimals + + let (output, exitCode) = execCmdEx(cmd) + result = output.strip() + +suite "Pi calculation tests": + test "10 decimals": + let result = runScript(10) + let expected = "3.1415926535" + check result == expected + + test "5 decimals": + let result = runScript(5) + let expected = "3.14159" + check result == expected + + test "1 decimal": + let result = runScript(1) + let expected = "3.1" + check result == expected + + test "100 decimals": + let result = runScript(100) + let expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + check result == expected + + test "default 100 decimals": + let result = runScript() + let expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + check result == expected + + test "10000 decimals": + let result = runScript(10000) + # Check length: "3." + 10000 digits = 10002 characters + check len(result) == 10002 + check result.startsWith("3.14159") \ No newline at end of file diff --git a/nim/test_pi b/nim/test_pi new file mode 100755 index 0000000..ccbb37d Binary files /dev/null and b/nim/test_pi differ diff --git a/nim/test_pi.py b/nim/test_pi.py new file mode 100644 index 0000000..833a151 --- /dev/null +++ b/nim/test_pi.py @@ -0,0 +1,47 @@ +import unittest +import subprocess +import sys + +SCRIPT_PATH = "/Users/einand/Code/test/nim/print_hej" + +def run_script(decimals=None): + cmd = [SCRIPT_PATH] + if decimals is not None: + cmd.append(str(decimals)) + result = subprocess.run(cmd, capture_output=True, text=True) + return result.stdout.strip() + +class TestPi(unittest.TestCase): + def test_10_decimals(self): + result = run_script(10) + expected = "3.1415926535" + self.assertEqual(result, expected) + + def test_5_decimals(self): + result = run_script(5) + expected = "3.14159" + self.assertEqual(result, expected) + + def test_1_decimal(self): + result = run_script(1) + expected = "3.1" + self.assertEqual(result, expected) + + def test_100_decimals(self): + result = run_script(100) + expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + self.assertEqual(result, expected) + + def test_default_100_decimals(self): + result = run_script() + expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + self.assertEqual(result, expected) + + def test_10000_decimals(self): + result = run_script(10000) + # Check length: "3." + 10000 digits = 10002 characters + self.assertEqual(len(result), 10002) + self.assertTrue(result.startswith("3.14159")) + +if __name__ == "__main__": + unittest.main() \ No newline at end of file diff --git a/objective-c/cmd/build.sh b/objective-c/cmd/build.sh new file mode 100755 index 0000000..0616288 --- /dev/null +++ b/objective-c/cmd/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Objective-C Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Objective-C Build ===" +echo "" + +# Kompilera Objective-C-programmet med GMP +gcc -framework Foundation -I/opt/homebrew/opt/gmp/include -L/opt/homebrew/opt/gmp/lib -o bin/print_hej src/print_hej.m -lgmp + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Binär: bin/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej [decimaler]" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/objective-c/cmd/test.sh b/objective-c/cmd/test.sh new file mode 100755 index 0000000..e6414ac --- /dev/null +++ b/objective-c/cmd/test.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Objective-C Test Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Objective-C Test ===" +echo "" + +# Testa pi-beräkning med olika antal decimaler +for decimals in 1 2 5 10 100; do + result=$(./bin/print_hej $decimals 2>/dev/null) + if [ $? -eq 0 ]; then + echo "✓ $decimals decimaler: $result" + else + echo "✗ $decimals decimaler misslyckades" + fi +done \ No newline at end of file diff --git a/objective-c/src/print_hej.m b/objective-c/src/print_hej.m new file mode 100644 index 0000000..d04572d --- /dev/null +++ b/objective-c/src/print_hej.m @@ -0,0 +1,124 @@ +// Pi calculation using Machin's formula +// pi/4 = 4*arctan(1/5) - arctan(1/239) + +#import +#include + +// Calculate arctan(1/x) using Taylor series with arbitrary precision +// arctan(1/x) = 1/x - 1/(3*x^3) + 1/(5*x^5) - ... +void arctan(mpz_t result, unsigned long x, unsigned long decimals) { + mpz_t scale, term, x_squared, temp; + mpz_init(scale); + mpz_init(term); + mpz_init(x_squared); + mpz_init(temp); + + // scale = 10^(decimals + 10) + mpz_ui_pow_ui(scale, 10, decimals + 10); + + // x_squared = x * x + mpz_ui_pow_ui(x_squared, x, 2); + + // term = scale / x + mpz_fdiv_q_ui(term, scale, x); + + // result = 0 + mpz_set_ui(result, 0); + + int sign = 1; + unsigned long n = 1; + + while (mpz_cmp_ui(term, 0) > 0) { + // result += sign * term / n + mpz_fdiv_q_ui(temp, term, n); + if (sign > 0) { + mpz_add(result, result, temp); + } else { + mpz_sub(result, result, temp); + } + + // term = term / x² + mpz_fdiv_q(term, term, x_squared); + + n += 2; + sign = -sign; + } + + mpz_clear(scale); + mpz_clear(term); + mpz_clear(x_squared); + mpz_clear(temp); +} + +// Calculate pi using Machin's formula +NSString* calculatePi(int decimals) { + if (decimals < 1) { + decimals = 100; + } + + mpz_t arctan5, arctan239, pi; + mpz_init(arctan5); + mpz_init(arctan239); + mpz_init(pi); + + // Machin's formula: pi/4 = 4*arctan(1/5) - arctan(1/239) + arctan(arctan5, 5, decimals); + arctan(arctan239, 239, decimals); + + // pi = 16*arctan(1/5) - 4*arctan(1/239) + mpz_mul_ui(arctan5, arctan5, 16); + mpz_mul_ui(arctan239, arctan239, 4); + mpz_sub(pi, arctan5, arctan239); + + // Convert to string + char* piStr = mpz_get_str(NULL, 10, pi); + NSString* result = [NSString stringWithUTF8String:piStr]; + free(piStr); + + // Format output + if (decimals == 0) { + return @"3"; + } + + // Pad with zeros if needed + NSString* padded = result; + if ([result length] < decimals + 1) { + NSUInteger zerosNeeded = decimals + 1 - [result length]; + padded = [@"0" stringByPaddingToLength:zerosNeeded withString:@"0" startingAtIndex:0]; + padded = [padded stringByAppendingString:result]; + } + + // Insert decimal point + NSString* beforeDecimal = [padded substringWithRange:NSMakeRange(0, 1)]; + NSString* afterDecimal = [padded substringWithRange:NSMakeRange(1, [padded length] - 1)]; + + // Pad or truncate to desired length + if ([afterDecimal length] < decimals) { + afterDecimal = [afterDecimal stringByPaddingToLength:decimals withString:@"0" startingAtIndex:0]; + } else { + afterDecimal = [afterDecimal substringWithRange:NSMakeRange(0, decimals)]; + } + + mpz_clear(arctan5); + mpz_clear(arctan239); + mpz_clear(pi); + + return [NSString stringWithFormat:@"%@.%@", beforeDecimal, afterDecimal]; +} + +int main(int argc, const char* argv[]) { + @autoreleasepool { + int decimals = 100; + + if (argc > 1) { + decimals = atoi(argv[1]); + if (decimals < 1) { + decimals = 100; + } + } + + NSString* pi = calculatePi(decimals); + printf("%s\n", [pi UTF8String]); + } + return 0; +} \ No newline at end of file diff --git a/odin/cmd/build.sh b/odin/cmd/build.sh new file mode 100755 index 0000000..94a9250 --- /dev/null +++ b/odin/cmd/build.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# Odin Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Odin Build ===" +echo "" + +# Kompilera Odin-programmet +cd src +odin build print_hej.odin -file -out:../bin/print_hej + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Binär: bin/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej [decimaler]" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/odin/cmd/test.sh b/odin/cmd/test.sh new file mode 100755 index 0000000..321bf16 --- /dev/null +++ b/odin/cmd/test.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Odin Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Odin Pi-beräkning Unit Tester ===" +echo "" + +# Kompilera och kör pi_test +cd src +odin build pi_test.odin -file -o:../bin/pi_test +if [ $? -eq 0 ]; then + ../bin/pi_test + exit $? +else + echo "✗ Kompilering av tester misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/odin/src/pi_test.odin b/odin/src/pi_test.odin new file mode 100644 index 0000000..a960172 --- /dev/null +++ b/odin/src/pi_test.odin @@ -0,0 +1,77 @@ +package pi_test + +import "core:os" +import "core:fmt" +import "core:strings" +import "core:testing" + +SCRIPT_PATH :: "/Users/einand/Code/test/odin/print_hej" + +run_script :: proc(args: []string) -> string { + cmd: strings.Builder + strings.init_builder(&cmd) + defer strings.free_builder(&cmd) + + strings.write_string(&cmd, SCRIPT_PATH) + for arg in args { + strings.write_byte(&cmd, ' ') + strings.write_string(&cmd, arg) + } + + process := os.create_process(strings.to_string(cmd)) + defer os.destroy_process(process) + + output := os.read_entire_file_from_process(process) + defer free(output.data) + + // Remove trailing newline + result := string(output.data[:]) + if len(result) > 0 && result[len(result)-1] == '\n' { + result = result[:len(result)-1] + } + + return result +} + +@test "10 decimals" +{ + result := run_script([]string{"10"}) + expected := "3.1415926535" + testing.expect(result == expected) +} + +@test "5 decimals" +{ + result := run_script([]string{"5"}) + expected := "3.14159" + testing.expect(result == expected) +} + +@test "1 decimal" +{ + result := run_script([]string{"1"}) + expected := "3.1" + testing.expect(result == expected) +} + +@test "100 decimals" +{ + result := run_script([]string{"100"}) + expected := "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + testing.expect(result == expected) +} + +@test "default 100 decimals" +{ + result := run_script([]string{}) + expected := "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + testing.expect(result == expected) +} + +@test "10000 decimals" +{ + result := run_script([]string{"10000"}) + // Check length: "3." + 10000 digits = 10002 characters + testing.expect(len(result) == 10002) + testing.expect(strings.has_prefix(result, "3.14159")) +} \ No newline at end of file diff --git a/odin/src/print_hej.odin b/odin/src/print_hej.odin new file mode 100644 index 0000000..9f78006 --- /dev/null +++ b/odin/src/print_hej.odin @@ -0,0 +1,228 @@ +package main + +import "core:fmt" +import "core:os" +import "core:strings" +import "core:strconv" + +// Simple BigInt implementation using base 10^9 +BigInt :: struct { + digits: [dynamic]u64, +} + +big_int_init :: proc(value: u64) -> BigInt { + result: BigInt + if value == 0 { + append(&result.digits, 0) + } else { + append(&result.digits, value) + } + return result +} + +big_int_add :: proc(a: ^BigInt, b: BigInt) { + carry: u64 = 0 + max_len := max(len(a.digits), len(b.digits)) + + for i in 0.. 0 { + append(&a.digits, carry) + } +} + +big_int_sub :: proc(a: ^BigInt, b: BigInt) { + borrow: i64 = 0 + + for i in 0.. 1 && a.digits[len(a.digits) - 1] == 0 { + pop(&a.digits) + } +} + +big_int_mul :: proc(a: BigInt, b: u64) -> BigInt { + result: BigInt + resize(&result.digits, len(a.digits)) + + carry: u64 = 0 + for i in 0.. 0 { + append(&result.digits, carry) + } + + return result +} + +big_int_div :: proc(a: BigInt, divisor: u64) -> BigInt { + result: BigInt + resize(&result.digits, len(a.digits)) + + remainder: u64 = 0 + for i in 0.. 1 && result.digits[len(result.digits) - 1] == 0 { + pop(&result.digits) + } + + return result +} + +big_int_is_zero :: proc(a: BigInt) -> bool { + return len(a.digits) == 1 && a.digits[0] == 0 +} + +big_int_to_string :: proc(a: BigInt) -> string { + // Build string using dynamic array of bytes + result_bytes: [dynamic]u8 + + // Print digits from most significant to least significant + for i in 0.. BigInt { + result := big_int_init(1) + for i in 0.. BigInt { + // Use base 10^9 for efficiency + num_digits := (decimals + 10) / 9 + 10 + + result := big_int_init(0) + term := big_int_init(1) + + // Initialize term = 10^(decimals+10) / x + for i in 0..<(decimals + 10) { + temp := big_int_mul(term, 10) + term = temp + } + term = big_int_div(term, x) + + x_squared := x * x + n: int = 0 + + for !big_int_is_zero(term) && n < decimals * 2 { + divisor := u64(2 * n + 1) + contrib := big_int_div(term, divisor) + + if n % 2 == 0 { + big_int_add(&result, contrib) + } else { + big_int_sub(&result, contrib) + } + + term = big_int_div(term, x_squared) + n += 1 + } + + return result +} + +calculate_pi :: proc(decimals: int) -> string { + atan1_5 := arctan(5, decimals) + atan1_239 := arctan(239, decimals) + + // pi = 16*arctan(1/5) - 4*arctan(1/239) + pi16 := big_int_mul(atan1_5, 16) + pi4 := big_int_mul(atan1_239, 4) + big_int_sub(&pi16, pi4) + + pi_str := big_int_to_string(pi16) + + // Format with decimal point using dynamic array of bytes + result_bytes: [dynamic]u8 + + // First digit before decimal point + if len(pi_str) > 0 { + append(&result_bytes, pi_str[0]) + } else { + append(&result_bytes, '3') + } + append(&result_bytes, '.') + + // Remaining digits after decimal point + for i in 1..<(len(pi_str)) { + if i <= decimals { + append(&result_bytes, pi_str[i]) + } + } + + // Pad with zeros if needed + for i in len(pi_str)..<(decimals + 1) { + append(&result_bytes, '0') + } + + return string(result_bytes[:]) +} + +main :: proc() { + decimals: int = 100 + + if len(os.args) > 1 { + val, ok := strconv.parse_int(os.args[1]) + if ok { + decimals = int(val) + } + } + + pi := calculate_pi(decimals) + fmt.println(pi) +} \ No newline at end of file diff --git a/odin/src/test_string.odin b/odin/src/test_string.odin new file mode 100644 index 0000000..0b3346d --- /dev/null +++ b/odin/src/test_string.odin @@ -0,0 +1,27 @@ +package main + +import "core:fmt" +import "core:strings" + +main :: proc() { + // Test string building + builder: strings.Builder + strings.builder_init(&builder, context.temp_allocator) + + // Test 1: Using fmt.sbprintf + fmt.sbprintf(&builder, "{}", 123) + fmt.sbprintf(&builder, "{:09}", 456) + + result := strings.to_string(builder) + fmt.println("Result:", result) + + // Test 2: Using append to dynamic array + bytes: [dynamic]u8 + append(&bytes, 51) // 3 + append(&bytes, 46) // . + append(&bytes, 49) // 1 + append(&bytes, 52) // 4 + + str := string(bytes[:]) + fmt.println("String from bytes:", str) +} diff --git a/odin/test_string b/odin/test_string new file mode 100755 index 0000000..497e639 Binary files /dev/null and b/odin/test_string differ diff --git a/perl/cmd/build.sh b/perl/cmd/build.sh new file mode 100755 index 0000000..5b20b7a --- /dev/null +++ b/perl/cmd/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Perl Build Script - Perl är interpreterat, ingen kompilering behövs + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Perl Build ===" +echo "Perl är ett interpreterat språk, ingen kompilering behövs." +echo "Script: src/print_hej.pl" +echo "" + +# Skapa wrapper script +mkdir -p bin +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +perl src/print_hej.pl "$@" +EOF +chmod +x bin/print_hej + +echo "Wrapper script skapad: bin/print_hej" +echo "" +echo "För att köra:" +echo " ./bin/print_hej [decimaler]" +echo "" +echo "✓ Klart!" \ No newline at end of file diff --git a/perl/cmd/test.sh b/perl/cmd/test.sh new file mode 100755 index 0000000..6198685 --- /dev/null +++ b/perl/cmd/test.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Perl Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Perl Pi-beräkning Unit Tester ===" +echo "" + +cd src +perl test_pi.t + +exit $? \ No newline at end of file diff --git a/perl/src/print_hej.pl b/perl/src/print_hej.pl new file mode 100755 index 0000000..de2ac97 --- /dev/null +++ b/perl/src/print_hej.pl @@ -0,0 +1,67 @@ +#!/usr/bin/perl +use strict; +use warnings; +use Math::BigInt; + +# Calculate arctan(1/x) using Taylor series +sub arctan { + my ($x, $decimals) = @_; + + my $scale = Math::BigInt->new(10)->bpow($decimals + 10); + my $x_squared = $x * $x; + + my $term = $scale->copy()->bdiv($x); + my $result = Math::BigInt->new(0); + my $n = 0; + + while ($term > 0) { + my $divisor = 2 * $n + 1; + my $contrib = $term->copy()->bdiv($divisor); + + if ($n % 2 == 0) { + $result->badd($contrib); + } else { + $result->bsub($contrib); + } + + $term = $term->copy()->bdiv($x_squared); + $n++; + } + + return $result; +} + +# Calculate pi using Machin's formula +sub calculate_pi { + my ($decimals) = @_; + + my $atan1_5 = arctan(5, $decimals); + my $atan1_239 = arctan(239, $decimals); + + # pi = 16*arctan(1/5) - 4*arctan(1/239) + my $pi = $atan1_5->copy()->bmul(16)->bsub($atan1_239->copy()->bmul(4)); + + # Format with decimal point + my $pi_str = $pi->bstr(); + + my $result = "3."; + my $start = 1; + + for (my $i = 0; $i < $decimals; $i++) { + if ($start + $i < length($pi_str)) { + $result .= substr($pi_str, $start + $i, 1); + } else { + $result .= "0"; + } + } + + return $result; +} + +# Main +my $decimals = 100; +if (@ARGV > 0) { + $decimals = $ARGV[0] =~ /^\d+$/ ? $ARGV[0] : 100; +} + +print calculate_pi($decimals) . "\n"; \ No newline at end of file diff --git a/perl/src/test_pi.t b/perl/src/test_pi.t new file mode 100644 index 0000000..f068f12 --- /dev/null +++ b/perl/src/test_pi.t @@ -0,0 +1,73 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::More tests => 7; +use IPC::Open3; + +my $SCRIPT_PATH = '/Users/einand/Code/test/perl/print_hej.pl'; + +sub run_script { + my ($args) = @_; + my @cmd = ($SCRIPT_PATH); + push @cmd, $args if defined $args; + + my $pid = open3(my $in, my $out, my $err, @cmd); + close($in); + my $result = <$out>; + close($out); + close($err); + waitpid($pid, 0); + + chomp $result if defined $result; + return $result // ''; +} + +# Test 10 decimals +{ + my $result = run_script('10'); + my $expected = '3.1415926535'; + is($result, $expected, '10 decimals'); +} + +# Test 5 decimals +{ + my $result = run_script('5'); + my $expected = '3.14159'; + is($result, $expected, '5 decimals'); +} + +# Test 1 decimal +{ + my $result = run_script('1'); + my $expected = '3.1'; + is($result, $expected, '1 decimal'); +} + +# Test 100 decimals +{ + my $result = run_script('100'); + my $expected = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679'; + is($result, $expected, '100 decimals'); +} + +# Test default 100 decimals +{ + my $result = run_script(); + my $expected = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679'; + is($result, $expected, 'default 100 decimals'); +} + +# Test invalid input +{ + my $result = run_script('invalid'); + my $expected = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679'; + is($result, $expected, 'invalid input uses default'); +} + +# Test 10000 decimals +{ + my $result = run_script('10000'); + # Check length: "3." + 10000 digits = 10002 characters + is(length($result), 10002, '10000 decimals length'); + ok(index($result, '3.14159') == 0, '10000 decimals starts with 3.14159'); +} \ No newline at end of file diff --git a/php/cmd/build.sh b/php/cmd/build.sh new file mode 100755 index 0000000..c94cc54 --- /dev/null +++ b/php/cmd/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# PHP Build Script - PHP är interpreterat, ingen kompilering behövs + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== PHP Build ===" +echo "PHP är ett interpreterat språk, ingen kompilering behövs." +echo "Script: src/print_hej.php" +echo "" + +# Skapa wrapper script +mkdir -p bin +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +php src/print_hej.php "$@" +EOF +chmod +x bin/print_hej + +echo "Wrapper script skapad: bin/print_hej" +echo "" +echo "För att köra:" +echo " ./bin/print_hej [decimaler]" +echo "" +echo "✓ Klart!" \ No newline at end of file diff --git a/php/cmd/test.sh b/php/cmd/test.sh new file mode 100755 index 0000000..14de165 --- /dev/null +++ b/php/cmd/test.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# PHP Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== PHP Pi-beräkning Unit Tester (PHPUnit) ===" +echo "" + +cd src +php PiTest.php + +exit $? \ No newline at end of file diff --git a/php/src/PiTest.php b/php/src/PiTest.php new file mode 100644 index 0000000..c85de50 --- /dev/null +++ b/php/src/PiTest.php @@ -0,0 +1,63 @@ +runScript('10'); + $expected = '3.1415926535'; + $this->assertEquals($expected, $result); + } + + public function test5Decimals(): void + { + $result = $this->runScript('5'); + $expected = '3.14159'; + $this->assertEquals($expected, $result); + } + + public function test1Decimal(): void + { + $result = $this->runScript('1'); + $expected = '3.1'; + $this->assertEquals($expected, $result); + } + + public function test100Decimals(): void + { + $result = $this->runScript('100'); + $expected = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679'; + $this->assertEquals($expected, $result); + } + + public function testDefault100Decimals(): void + { + $result = $this->runScript(); + $expected = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679'; + $this->assertEquals($expected, $result); + } + + public function test10000Decimals(): void + { + $result = $this->runScript('10000'); + // Check length: "3." + 10000 digits = 10002 characters + $this->assertEquals(10002, strlen($result)); + $this->assertTrue(strpos($result, '3.14159') === 0); + } +} \ No newline at end of file diff --git a/php/src/print_hej.php b/php/src/print_hej.php new file mode 100755 index 0000000..be0ef33 --- /dev/null +++ b/php/src/print_hej.php @@ -0,0 +1,54 @@ + $decimals * 2) break; + } + + return $result; +} + +// Calculate pi using Machin's formula +function calculate_pi($decimals) { + $atan1_5 = arctan(5, $decimals); + $atan1_239 = arctan(239, $decimals); + + return bcsub(bcmul($atan1_5, '16'), bcmul($atan1_239, '4')); +} + +// Format pi with decimal point +function format_pi($pi, $decimals) { + $piStr = $pi; + while (strlen($piStr) < $decimals + 10) { + $piStr = '0' . $piStr; + } + return '3.' . substr($piStr, 1, $decimals); +} + +// Main +$decimals = isset($argv[1]) ? (int)$argv[1] : 100; +if ($decimals <= 0) $decimals = 100; + +$pi = calculate_pi($decimals); +echo format_pi($pi, $decimals) . "\n"; +?> \ No newline at end of file diff --git a/python/cmd/build.sh b/python/cmd/build.sh new file mode 100755 index 0000000..5a3249c --- /dev/null +++ b/python/cmd/build.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Python Build Script - Python är interpreterat, ingen kompilering behövs + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Python Build ===" +echo "Python är ett interpreterat språk, ingen kompilering behövs." +echo "Script: src/print_hej.py" +echo "" +echo "Skapar wrapper script i bin/" +mkdir -p bin +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +python3 src/print_hej.py "$@" +EOF +chmod +x bin/print_hej +echo "✓ Klart!" \ No newline at end of file diff --git a/python/src/print_hej.py b/python/src/print_hej.py new file mode 100755 index 0000000..9540422 --- /dev/null +++ b/python/src/print_hej.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python3 +""" +Beräknar pi med angivet antal decimaler +Användning: python3 print_hej.py +""" + +import sys +from decimal import Decimal, getcontext + +def arctan(x, precision): + """ + Beräknar arctan(1/x) med Taylor-serien + arctan(1/x) = 1/x - 1/(3*x^3) + 1/(5*x^5) - ... + """ + result = Decimal(0) + x = Decimal(x) + x_squared = x * x + + term = Decimal(1) / x + sign = 1 + + for n in range(1000000): + divisor = Decimal(2 * n + 1) + contrib = term / divisor + + if sign > 0: + result += contrib + else: + result -= contrib + + term = term / x_squared + sign = -sign + + # Avbryt om termen är tillräckligt liten + if term < Decimal(10) ** (-precision - 10): + break + + return result + +def calculate_pi(decimals): + """ + Beräknar pi med Machins formel: pi/4 = 4*arctan(1/5) - arctan(1/239) + """ + # Sätt precision + getcontext().prec = decimals + 20 + + atan1_5 = arctan(5, decimals) + atan1_239 = arctan(239, decimals) + + # pi = 4 * (4*arctan(1/5) - arctan(1/239)) + pi = Decimal(4) * atan1_5 + pi = pi - atan1_239 + pi = pi * Decimal(4) + + return pi + +def main(): + # Hämta antal decimaler från argument + if len(sys.argv) > 1: + try: + decimals = int(sys.argv[1]) + if decimals < 1: + decimals = 100 + except ValueError: + decimals = 100 + else: + decimals = 100 + + # Beräkna pi + pi = calculate_pi(decimals) + + # Skriv ut resultatet med rätt antal decimaler + pi_str = str(pi) + + # Hitta decimalpunkten + if '.' in pi_str: + int_part, dec_part = pi_str.split('.') + # Ta exakt decimals decimaler + if len(dec_part) > decimals: + dec_part = dec_part[:decimals] + else: + dec_part = dec_part.ljust(decimals, '0') + print(f"{int_part}.{dec_part}") + else: + print(pi_str) + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/python/src/test_pi.py b/python/src/test_pi.py new file mode 100644 index 0000000..80b7caa --- /dev/null +++ b/python/src/test_pi.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python3 +""" +Unit tests for Python pi calculation using pytest +""" + +import subprocess +import pytest + +SCRIPT_PATH = "/Users/einand/Code/test/python/print_hej.py" + +def run_script(decimals=None): + """Run the Python script with optional decimals argument""" + cmd = ["python3", SCRIPT_PATH] + if decimals is not None: + cmd.append(str(decimals)) + result = subprocess.run(cmd, capture_output=True, text=True) + return result.stdout.strip() + +class TestPiCalculation: + """Test cases for pi calculation""" + + def test_10_decimals(self): + """Test with 10 decimal places""" + result = run_script(10) + expected = "3.1415926535" + assert result == expected, f"Expected {expected}, got {result}" + + def test_5_decimals(self): + """Test with 5 decimal places""" + result = run_script(5) + expected = "3.14159" + assert result == expected, f"Expected {expected}, got {result}" + + def test_1_decimal(self): + """Test with 1 decimal place""" + result = run_script(1) + expected = "3.1" + assert result == expected, f"Expected {expected}, got {result}" + + def test_100_decimals(self): + """Test with 100 decimal places""" + result = run_script(100) + expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + assert result == expected, f"Expected {expected}, got {result}" + + def test_default_100_decimals(self): + """Test default (100 decimal places)""" + result = run_script() + expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + assert result == expected, f"Expected {expected}, got {result}" + + def test_invalid_input(self): + """Test with invalid input (should use default 100)""" + result = run_script("invalid") + expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + assert result == expected, f"Expected {expected}, got {result}" + + def test_10000_decimals(self): + """Test with 10000 decimal places""" + result = run_script(10000) + # Check length: "3." + 10000 digits = 10002 characters + assert len(result) == 10002, f"Expected 10002 characters, got {len(result)}" + assert result.startswith("3.14159"), f"Result should start with 3.14159, got {result[:10]}" + +if __name__ == "__main__": + pytest.main([__file__, "-v"]) \ No newline at end of file diff --git a/python/test.py b/python/test.py new file mode 100755 index 0000000..9ae430f --- /dev/null +++ b/python/test.py @@ -0,0 +1,123 @@ +#!/usr/bin/env python3 +""" +Unit tests for Python pi calculation +""" + +import subprocess +import sys + +SCRIPT_DIR = "/Users/einand/Code/test/python" +SCRIPT = f"{SCRIPT_DIR}/print_hej.py" + +def run_test(decimals, expected_prefix): + """Run the program and check output""" + result = subprocess.run( + ["python3", SCRIPT, str(decimals)], + capture_output=True, + text=True, + timeout=30 + ) + + output = result.stdout.strip() + + if output.startswith(expected_prefix): + print(f"✓ PASS: {decimals} decimaler - {output[:50]}...") + return True + else: + print(f"✗ FAIL: {decimals} decimaler") + print(f" Förväntade: {expected_prefix}...") + print(f" Fick: {output[:100]}") + return False + +def main(): + print("=== Python Pi-beräkning Unit Tester ===") + print() + + tests_passed = 0 + tests_failed = 0 + + # Test 1: 10 decimaler + print("Test 1: 10 decimaler") + if run_test(10, "3.1415926535"): + tests_passed += 1 + else: + tests_failed += 1 + print() + + # Test 2: 5 decimaler + print("Test 2: 5 decimaler") + if run_test(5, "3.14159"): + tests_passed += 1 + else: + tests_failed += 1 + print() + + # Test 3: 1 decimal + print("Test 3: 1 decimal") + if run_test(1, "3.1"): + tests_passed += 1 + else: + tests_failed += 1 + print() + + # Test 4: 100 decimaler + print("Test 4: 100 decimaler") + expected_100 = "3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067" + if run_test(100, expected_100): + tests_passed += 1 + else: + tests_failed += 1 + print() + + # Test 5: Default (100 decimaler) + print("Test 5: Default (100 decimaler)") + result = subprocess.run( + ["python3", SCRIPT], + capture_output=True, + text=True, + timeout=30 + ) + output = result.stdout.strip() + if output.startswith(expected_100): + print(f"✓ PASS: Default - {output[:50]}...") + tests_passed += 1 + else: + print(f"✗ FAIL: Default") + print(f" Förväntade: {expected_100}...") + print(f" Fick: {output[:100]}") + tests_failed += 1 + print() + + # Test 6: Ogiltig input + print("Test 6: Ogiltig input (ska använda default 100)") + result = subprocess.run( + ["python3", SCRIPT, "invalid"], + capture_output=True, + text=True, + timeout=30 + ) + output = result.stdout.strip() + if output.startswith(expected_100): + print(f"✓ PASS: Ogiltig input hanterad korrekt") + tests_passed += 1 + else: + print(f"✗ FAIL: Ogiltig input") + print(f" Förväntade: {expected_100}...") + print(f" Fick: {output[:100]}") + tests_failed += 1 + print() + + # Summary + print("=== Sammanfattning ===") + print(f"Passerade: {tests_passed}") + print(f"Misslyckade: {tests_failed}") + + if tests_failed == 0: + print("✓ Alla tester passerade!") + sys.exit(0) + else: + print("✗ Några tester misslyckades") + sys.exit(1) + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/r/cmd/build.sh b/r/cmd/build.sh new file mode 100755 index 0000000..38bb48b --- /dev/null +++ b/r/cmd/build.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# R Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== R Build ===" +echo "" + +# Check for Rscript +if ! command -v Rscript &> /dev/null; then + echo "✗ R hittades inte!" + echo " Installera R: brew install r" + exit 1 +fi + +echo "✓ R är installerat" +echo " Script: src/print_hej.R" +echo "" + +# Skapa wrapper script +mkdir -p bin +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +Rscript src/print_hej.R "$@" +EOF +chmod +x bin/print_hej + +echo "Wrapper script skapad: bin/print_hej" +echo "" +echo "För att köra:" +echo " ./bin/print_hej " \ No newline at end of file diff --git a/r/src/print_hej.R b/r/src/print_hej.R new file mode 100644 index 0000000..d85f6f3 --- /dev/null +++ b/r/src/print_hej.R @@ -0,0 +1,85 @@ +#!/usr/bin/env Rscript + +# Pi Calculator using Machin's Formula +# pi/4 = 4*arctan(1/5) - arctan(1/239) + +# Load gmp package for big integers +library(gmp) + +# Calculate arctan(1/x) using Taylor series +# arctan(1/x) = 1/x - 1/(3*x^3) + 1/(5*x^5) - ... +arctan <- function(x, decimals) { + scale <- as.bigz(10)^(decimals + 10) + x_big <- as.bigz(x) + x_sq <- x_big * x_big + + term <- scale %/% x_big + result <- as.bigz(0) + n <- 0 + + while (term != 0 && n < decimals * 3) { + divisor <- as.bigz(2 * n + 1) + contrib <- term %/% divisor + + if (n %% 2 == 0) { + result <- result + contrib + } else { + result <- result - contrib + } + + term <- term %/% x_sq + n <- n + 1 + } + + return(result) +} + +# Main function +main <- function() { + args <- commandArgs(trailingOnly = TRUE) + decimals <- 100 + + if (length(args) > 0) { + decimals <- as.integer(args[1]) + if (is.na(decimals) || decimals < 1) { + decimals <- 100 + } + } + + # Calculate arctan(1/5) and arctan(1/239) + atan1_5 <- arctan(5, decimals) + atan1_239 <- arctan(239, decimals) + + # pi = 16*arctan(1/5) - 4*arctan(1/239) + pi_val <- atan1_5 * as.bigz(16) - atan1_239 * as.bigz(4) + + # Convert to string + pi_str <- as.character(pi_val) + + # Print with decimal point + cat("3.") + + # Extract digits after the first digit (which is 3) + if (nchar(pi_str) > 1) { + # Skip the first digit (3) and take the rest + digits <- substring(pi_str, 2) + if (nchar(digits) >= decimals) { + cat(substr(digits, 1, decimals)) + } else { + cat(digits) + # Pad with zeros if needed + for (i in 1:(decimals - nchar(digits))) { + cat("0") + } + } + } else { + # Pad with zeros + for (i in 1:decimals) { + cat("0") + } + } + + cat("\n") +} + +main() \ No newline at end of file diff --git a/ruby/cmd/build.sh b/ruby/cmd/build.sh new file mode 100755 index 0000000..6edac05 --- /dev/null +++ b/ruby/cmd/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Ruby Build Script - Ruby är interpreterat, ingen kompilering behövs + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Ruby Build ===" +echo "Ruby är ett interpreterat språk, ingen kompilering behövs." +echo "Script: src/print_hej.rb" +echo "" + +# Skapa wrapper script +mkdir -p bin +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +ruby src/print_hej.rb "$@" +EOF +chmod +x bin/print_hej + +echo "Wrapper script skapad: bin/print_hej" +echo "" +echo "För att köra:" +echo " ./bin/print_hej [decimaler]" +echo "" +echo "✓ Klart!" \ No newline at end of file diff --git a/ruby/cmd/test.sh b/ruby/cmd/test.sh new file mode 100755 index 0000000..cf9912f --- /dev/null +++ b/ruby/cmd/test.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Ruby Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Ruby Pi-beräkning Unit Tester ===" +echo "" + +cd src +ruby test_pi.rb + +exit $? \ No newline at end of file diff --git a/ruby/src/print_hej.rb b/ruby/src/print_hej.rb new file mode 100755 index 0000000..c9c572f --- /dev/null +++ b/ruby/src/print_hej.rb @@ -0,0 +1,50 @@ +# Calculate arctan(1/x) using Taylor series with integer arithmetic +def arctan(x, decimals) + scale = 10 ** (decimals + 10) + x_squared = x * x + + result = 0 + term = scale / x + + n = 0 + while term != 0 && n < decimals * 3 + divisor = 2 * n + 1 + contrib = term / divisor + + if n % 2 == 0 + result += contrib + else + result -= contrib + end + + term = term / x_squared + n += 1 + end + + result +end + +# Calculate pi using Machin's formula +def calculate_pi(decimals) + atan1_5 = arctan(5, decimals) + atan1_239 = arctan(239, decimals) + + 16 * atan1_5 - 4 * atan1_239 +end + +# Format pi with decimal point +def format_pi(pi, decimals) + pi_str = pi.to_s + # Pad with leading zeros if needed + while pi_str.length < decimals + 10 + pi_str = '0' + pi_str + end + "3.#{pi_str[1, decimals]}" +end + +# Main +decimals = ARGV[0]&.to_i || 100 +decimals = 100 if decimals <= 0 + +pi = calculate_pi(decimals) +print format_pi(pi, decimals) \ No newline at end of file diff --git a/ruby/src/test_pi.rb b/ruby/src/test_pi.rb new file mode 100644 index 0000000..1a9deca --- /dev/null +++ b/ruby/src/test_pi.rb @@ -0,0 +1,49 @@ +require 'test/unit' +require 'open3' + +class PiTest < Test::Unit::TestCase + SCRIPT_PATH = '/Users/einand/Code/test/ruby/print_hej.rb' + + def run_script(*args) + cmd = ['ruby', SCRIPT_PATH] + args.map(&:to_s) + stdout, _ = Open3.capture2(*cmd) + stdout.strip + end + + def test_10_decimals + result = run_script(10) + expected = '3.1415926535' + assert_equal expected, result + end + + def test_5_decimals + result = run_script(5) + expected = '3.14159' + assert_equal expected, result + end + + def test_1_decimal + result = run_script(1) + expected = '3.1' + assert_equal expected, result + end + + def test_100_decimals + result = run_script(100) + expected = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679' + assert_equal expected, result + end + + def test_default_100_decimals + result = run_script + expected = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679' + assert_equal expected, result + end + + def test_10000_decimals + result = run_script(10000) + # Check length: "3." + 10000 digits = 10002 characters + assert_equal 10002, result.length + assert result.start_with?('3.14159') + end +end \ No newline at end of file diff --git a/run_all.sh b/run_all.sh new file mode 100755 index 0000000..ce1058e --- /dev/null +++ b/run_all.sh @@ -0,0 +1,149 @@ +#!/bin/bash + +# Run all pi calculation programs and measure performance +# Run each program 3 times and take the average + +set -e + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +cd "$SCRIPT_DIR" + +# Check if argument provided +if [ $# -eq 0 ]; then + echo "Usage: $0 " + echo "Example: $0 100" + exit 1 +fi + +DECIMALS=$1 + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +NC='\033[0m' # No Color + +# Function to verify result against facit +verify() { + local result="$1" + local decimals="$2" + local expected=$(head -c $((decimals + 2)) facit.txt) + + if [ "$result" = "$expected" ]; then + return 0 + else + return 1 + fi +} + +echo "=== Pi-beräkning med $DECIMALS decimaler (4 körningar, genomsnitt av 3 efter warmup) ===" +echo "" + +# Array to store results +declare -a results + +# Run each program 4 times, discard first run (warmup), take average of last 3 +run_program() { + local name="$1" + shift + + printf "%-12s " "$name" + + local total_time=0 + local success_count=0 + local result + + # Run 4 times, discard first run (warmup) + for i in 1 2 3 4; do + local start=$(date +%s%N) + + if result=$("$@" 2>/dev/null); then + local end=$(date +%s%N) + local elapsed=$(( (end - start) / 1000000 )) + + # Skip first run (warmup) + if [ $i -gt 1 ]; then + total_time=$((total_time + elapsed)) + + if verify "$result" "$DECIMALS"; then + ((success_count++)) + fi + fi + else + # If any run fails, mark as error + echo -e "${RED}ERROR${NC}" + results+=("999999 $name ERROR") + return + fi + done + + # Calculate average + local avg_time=$((total_time / 3)) + + if [ $success_count -eq 3 ]; then + echo -e "${GREEN}SUCCESS${NC} $avg_time ms (avg)" + results+=("$avg_time $name SUCCESS") + else + echo -e "${RED}FAILED${NC} $avg_time ms (avg)" + results+=("$avg_time $name FAILED") + fi +} + +# Run all programs (no timeouts) +run_program Bash bash bash/bin/print_hej "$DECIMALS" +run_program Brainfuck brainfuck/bin/print_hej "$DECIMALS" +run_program C c/bin/print_hej "$DECIMALS" +run_program C++ cpp/bin/print_hej "$DECIMALS" +run_program Crystal crystal/bin/print_hej "$DECIMALS" +run_program CSharp csharp/bin/print_hej "$DECIMALS" +run_program D d/bin/print_hej "$DECIMALS" +run_program Dart dart/bin/print_hej "$DECIMALS" +run_program Elixir elixir/bin/print_hej "$DECIMALS" +run_program Erlang erlang/bin/print_hej "$DECIMALS" +run_program Fortran fortran/bin/print_hej "$DECIMALS" +run_program Go go/bin/print_hej "$DECIMALS" +run_program Haskell haskell/bin/print_hej "$DECIMALS" +run_program Java java/bin/print_hej "$DECIMALS" +run_program JavaScript javascript/bin/print_hej "$DECIMALS" +run_program Julia julia/bin/print_hej "$DECIMALS" +run_program Kotlin kotlin/bin/print_hej "$DECIMALS" +run_program Objective-C objective-c/bin/print_hej "$DECIMALS" +run_program Scala scala/bin/print_hej "$DECIMALS" +run_program TypeScript typescript/bin/print_hej "$DECIMALS" +run_program Lua lua/bin/print_hej "$DECIMALS" +run_program Nim nim/bin/print_hej "$DECIMALS" +run_program Odin odin/bin/print_hej "$DECIMALS" +run_program Perl perl/bin/print_hej "$DECIMALS" +run_program PHP php/bin/print_hej "$DECIMALS" +run_program Python python/bin/print_hej "$DECIMALS" +run_program R r/bin/print_hej "$DECIMALS" +run_program Ruby ruby/bin/print_hej "$DECIMALS" +run_program Rust rust/bin/print_hej "$DECIMALS" +run_program Swift swift/bin/print_hej "$DECIMALS" +run_program Zig zig/bin/print_hej "$DECIMALS" +run_program Assembly assembly/bin/print_hej "$DECIMALS" +run_program Wolfram wolfram/bin/print_hej "$DECIMALS" +run_program Vimscript vimscript/bin/print_hej "$DECIMALS" + +echo "" +echo "=== Sammanfattning (sorterad efter prestanda) ===" +echo "" + +# Sort and print results +IFS=$'\n' sorted=($(printf '%s\n' "${results[@]}" | sort -n)) +unset IFS + +for entry in "${sorted[@]}"; do + time_ms=$(echo "$entry" | awk '{print $1}') + name=$(echo "$entry" | awk '{print $2}') + status=$(echo "$entry" | awk '{print $3}') + + printf "%-12s " "$name" + + if [ "$status" = "SUCCESS" ]; then + echo -e "${GREEN}$status${NC} $time_ms ms" + else + echo -e "${RED}$status${NC} $time_ms ms" + fi +done + +echo "" diff --git a/run_all_tests.sh b/run_all_tests.sh new file mode 100644 index 0000000..3316db8 --- /dev/null +++ b/run_all_tests.sh @@ -0,0 +1,320 @@ +#!/bin/bash + +# Run all unit tests for all languages + +set -e + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +cd "$SCRIPT_DIR" + +echo "=========================================" +echo "Running Unit Tests for All Languages" +echo "=========================================" +echo "" + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +NC='\033[0m' # No Color + +total_passed=0 +total_failed=0 +total_languages=0 + +# List of all languages +LANGUAGES="bash brainfuck c cpp crystal csharp d dart elixir erlang fortran go haskell java javascript julia kotlin objective-c scala typescript lua nim odin perl php python r ruby rust swift zig assembly wolfram vimscript" + +# Test each language +for lang in $LANGUAGES; do + echo "Testing $lang..." + if [ -f "$lang/cmd/test.sh" ]; then + cd "$lang" + if cmd/test.sh 2>&1; then + echo -e "${GREEN}✓${NC} $lang tests passed" + ((total_passed++)) + else + echo -e "${RED}✗${NC} $lang tests failed" + ((total_failed++)) + fi + cd "$SCRIPT_DIR" + else + echo "⊘ $lang tests skipped (no cmd/test.sh)" + fi + ((total_languages++)) + echo "" +done + +echo "=========================================" +echo "Test Summary" +echo "=========================================" +echo "Total languages: $total_languages" +echo -e "Passed: ${GREEN}$total_passed${NC}" +echo -e "Failed: ${RED}$total_failed${NC}" + +if [ $total_failed -eq 0 ]; then + echo -e "${GREEN}✓ All tests passed!${NC}" + exit 0 +else + echo -e "${RED}✗ Some tests failed${NC}" + exit 1 +fi +fi +((total_languages++)) +echo "" + +# Go +echo "Testing Go..." +cd /Users/einand/Code/test/go +if go test -v 2>&1 | grep -E "PASS"; then + echo "✓ Go tests passed" + ((total_passed++)) +else + echo "✗ Go tests failed" + ((total_failed++)) +fi +((total_languages++)) +echo "" + +# Java +echo "Testing Java..." +cd /Users/einand/Code/test/java +if [ -f PiTest.class ] || javac -cp .:junit-4.13.2.jar:hamcrest-core-1.3.jar PiTest.java 2>/dev/null; then + if java -cp .:junit-4.13.2.jar:hamcrest-core-1.3.jar org.junit.runner.JUnitCore PiTest 2>&1 | grep -E "OK"; then + echo "✓ Java tests passed" + ((total_passed++)) + else + echo "✗ Java tests failed" + ((total_failed++)) + fi +else + echo "⊘ Java tests skipped (JUnit not available)" +fi +((total_languages++)) +echo "" + +# C +echo "Testing C..." +cd /Users/einand/Code/test/c +if gcc -o pi_test pi_test.c 2>/dev/null && ./pi_test 2>&1 | grep -E "All tests passed"; then + echo "✓ C tests passed" + ((total_passed++)) +else + echo "✗ C tests failed" + ((total_failed++)) +fi +((total_languages++)) +echo "" + +# C++ +echo "Testing C++..." +cd /Users/einand/Code/test/cpp +if g++ -o pi_test pi_test.cpp -lgtest -lgtest_main -pthread 2>/dev/null && ./pi_test 2>&1 | grep -E "PASSED"; then + echo "✓ C++ tests passed" + ((total_passed++)) +else + echo "⊘ C++ tests skipped (Google Test not available)" +fi +((total_languages++)) +echo "" + +# Rust +echo "Testing Rust..." +cd /Users/einand/Code/test/rust +if cargo test 2>&1 | grep -E "test result: ok"; then + echo "✓ Rust tests passed" + ((total_passed++)) +else + echo "✗ Rust tests failed" + ((total_failed++)) +fi +((total_languages++)) +echo "" + +# Ruby +echo "Testing Ruby..." +cd /Users/einand/Code/test/ruby +if ruby test_pi.rb 2>&1 | grep -E "tests,.*assertions,.*failures,.*errors"; then + echo "✓ Ruby tests passed" + ((total_passed++)) +else + echo "✗ Ruby tests failed" + ((total_failed++)) +fi +((total_languages++)) +echo "" + +# PHP +echo "Testing PHP..." +cd /Users/einand/Code/test/php +if [ -f vendor/bin/phpunit ] || composer install --no-interaction 2>/dev/null; then + if php vendor/bin/phpunit PiTest.php 2>&1 | grep -E "OK"; then + echo "✓ PHP tests passed" + ((total_passed++)) + else + echo "✗ PHP tests failed" + ((total_failed++)) + fi +else + echo "⊘ PHP tests skipped (PHPUnit not available)" +fi +((total_languages++)) +echo "" + +# Swift +echo "Testing Swift..." +cd /Users/einand/Code/test/swift +if swift test 2>&1 | grep -E "Test Suite"; then + echo "✓ Swift tests passed" + ((total_passed++)) +else + echo "✗ Swift tests failed" + ((total_failed++)) +fi +((total_languages++)) +echo "" + +# D +echo "Testing D..." +cd /Users/einand/Code/test/d +if ldc2 -unittest -run pi_test.d 2>&1 | grep -E "All tests passed"; then + echo "✓ D tests passed" + ((total_passed++)) +else + echo "✗ D tests failed" + ((total_failed++)) +fi +((total_languages++)) +echo "" + +# Nim +echo "Testing Nim..." +cd /Users/einand/Code/test/nim +if nim c -r test_pi.py 2>&1 | grep -E "tests passed"; then + echo "✓ Nim tests passed" + ((total_passed++)) +else + echo "✗ Nim tests failed" + ((total_failed++)) +fi +((total_languages++)) +echo "" + +# Crystal +echo "Testing Crystal..." +cd /Users/einand/Code/test/crystal +if crystal spec spec/pi_spec.cr 2>&1 | grep -E "examples,.*failures"; then + echo "✓ Crystal tests passed" + ((total_passed++)) +else + echo "✗ Crystal tests failed" + ((total_failed++)) +fi +((total_languages++)) +echo "" + +# Haskell +echo "Testing Haskell..." +cd /Users/einand/Code/test/haskell +if ghc -o pi_test PiTest.hs 2>/dev/null && ./pi_test 2>&1 | grep -E "Cases:.*Tried:.*Errors: 0"; then + echo "✓ Haskell tests passed" + ((total_passed++)) +else + echo "⊘ Haskell tests skipped (HUnit not available)" +fi +((total_languages++)) +echo "" + +# Erlang +echo "Testing Erlang..." +cd /Users/einand/Code/test/erlang +if erlc pi_test.erl 2>/dev/null && erl -noshell -eval "eunit:test(pi_test, [verbose])" -s init stop 2>&1 | grep -E "All.*tests passed"; then + echo "✓ Erlang tests passed" + ((total_passed++)) +else + echo "✗ Erlang tests failed" + ((total_failed++)) +fi +((total_languages++)) +echo "" + +# Perl +echo "Testing Perl..." +cd /Users/einand/Code/test/perl +if perl test_pi.t 2>&1 | grep -E "All tests successful"; then + echo "✓ Perl tests passed" + ((total_passed++)) +else + echo "✗ Perl tests failed" + ((total_failed++)) +fi +((total_languages++)) +echo "" + +# Lua +echo "Testing Lua..." +cd /Users/einand/Code/test/lua +if busted spec/pi_spec.lua 2>&1 | grep -E "successes"; then + echo "✓ Lua tests passed" + ((total_passed++)) +else + echo "⊘ Lua tests skipped (Busted not available)" +fi +((total_languages++)) +echo "" + +# Zig +echo "Testing Zig..." +cd /Users/einand/Code/test/zig +if zig test pi_test.zig 2>&1 | grep -E "All.*tests passed"; then + echo "✓ Zig tests passed" + ((total_passed++)) +else + echo "✗ Zig tests failed" + ((total_failed++)) +fi +((total_languages++)) +echo "" + +# Odin +echo "Testing Odin..." +cd /Users/einand/Code/test/odin +if odin test pi_test.odin 2>&1 | grep -E "passed"; then + echo "✓ Odin tests passed" + ((total_passed++)) +else + echo "✗ Odin tests failed" + ((total_failed++)) +fi +((total_languages++)) +echo "" + +# C# +echo "Testing C#..." +cd /Users/einand/Code/test/csharp +if dotnet test 2>&1 | grep -E "Passed"; then + echo "✓ C# tests passed" + ((total_passed++)) +else + echo "✗ C# tests failed" + ((total_failed++)) +fi +((total_languages++)) +echo "" + +# Summary +echo "=========================================" +echo "Summary" +echo "=========================================" +echo "Languages tested: $total_languages" +echo "Tests passed: $total_passed" +echo "Tests failed: $total_failed" +echo "Tests skipped: $((total_languages - total_passed - total_failed))" +echo "" + +if [ $total_failed -eq 0 ]; then + echo "✓ All tests passed!" + exit 0 +else + echo "✗ Some tests failed" + exit 1 +fi \ No newline at end of file diff --git a/rust/cmd/build.sh b/rust/cmd/build.sh new file mode 100755 index 0000000..8fb3875 --- /dev/null +++ b/rust/cmd/build.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Rust Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Rust Build ===" +echo "" + +# Kompilera Rust-programmet med cargo +cd src +cargo build --release + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Binär: target/release/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej [decimaler]" + + # Kopiera till bin/ katalogen + mkdir -p ../bin + cp target/release/print_hej ../bin/ + echo "Binär kopierad till: bin/print_hej" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/rust/cmd/test.sh b/rust/cmd/test.sh new file mode 100755 index 0000000..6865d83 --- /dev/null +++ b/rust/cmd/test.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Rust Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Rust Pi-beräkning Unit Tester ===" +echo "" + +cd src +cargo test + +exit $? \ No newline at end of file diff --git a/rust/src/Cargo.lock b/rust/src/Cargo.lock new file mode 100644 index 0000000..77b4cf7 --- /dev/null +++ b/rust/src/Cargo.lock @@ -0,0 +1,45 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "print_hej" +version = "0.1.0" +dependencies = [ + "num-bigint", + "num-traits", +] diff --git a/rust/src/Cargo.toml b/rust/src/Cargo.toml new file mode 100644 index 0000000..378250a --- /dev/null +++ b/rust/src/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "print_hej" +version = "0.1.0" +edition = "2021" + +[[bin]] +name = "print_hej" +path = "print_hej.rs" + +[dependencies] +num-bigint = "0.4" +num-traits = "0.2" \ No newline at end of file diff --git a/rust/src/pi_test.rs b/rust/src/pi_test.rs new file mode 100644 index 0000000..b3ffdfd --- /dev/null +++ b/rust/src/pi_test.rs @@ -0,0 +1,58 @@ +#[cfg(test)] +mod tests { + use std::process::Command; + + const SCRIPT_PATH: &str = "/Users/einand/Code/test/rust/print_hej"; + + fn run_script(args: Option<&str>) -> String { + let mut cmd = Command::new(SCRIPT_PATH); + if let Some(arg) = args { + cmd.arg(arg); + } + let output = cmd.output().expect("Failed to execute script"); + String::from_utf8_lossy(&output.stdout).trim().to_string() + } + + #[test] + fn test_10_decimals() { + let result = run_script(Some("10")); + let expected = "3.1415926535"; + assert_eq!(result, expected); + } + + #[test] + fn test_5_decimals() { + let result = run_script(Some("5")); + let expected = "3.14159"; + assert_eq!(result, expected); + } + + #[test] + fn test_1_decimal() { + let result = run_script(Some("1")); + let expected = "3.1"; + assert_eq!(result, expected); + } + + #[test] + fn test_100_decimals() { + let result = run_script(Some("100")); + let expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"; + assert_eq!(result, expected); + } + + #[test] + fn test_default_100_decimals() { + let result = run_script(None); + let expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"; + assert_eq!(result, expected); + } + + #[test] + fn test_10000_decimals() { + let result = run_script(Some("10000")); + // Check length: "3." + 10000 digits = 10002 characters + assert_eq!(result.len(), 10002); + assert!(result.starts_with("3.14159")); + } +} \ No newline at end of file diff --git a/rust/src/print_hej.rs b/rust/src/print_hej.rs new file mode 100644 index 0000000..618d9a2 --- /dev/null +++ b/rust/src/print_hej.rs @@ -0,0 +1,85 @@ +use std::env; +use num_bigint::BigUint; +use num_traits::{One, Zero}; + +fn main() { + // Hämta antal decimaler från argument + let args: Vec = env::args().collect(); + let decimals: usize = if args.len() > 1 { + args[1].parse().unwrap_or(100) + } else { + 100 + }; + + // Beräkna pi med Machins formel: pi/4 = 4*arctan(1/5) - arctan(1/239) + // Använd num-bigint för exakt aritmetik + let scale = BigUint::from(10u32).pow(decimals as u32 + 10); + + let atan1_5 = arctan_big(5u32, &scale); + let atan1_239 = arctan_big(239u32, &scale); + + // 4 * atan(1/5) - atan(1/239) + let mut result = &atan1_5 * 4u32; + result = &result - &atan1_239; + // * 4 + result = &result * 4u32; + + // Skriv ut resultatet + println!("{}", format_pi(&result, decimals)); +} + +fn arctan_big(x: u32, scale: &BigUint) -> BigUint { + // arctan(1/x) = 1/x - 1/(3*x^3) + 1/(5*x^5) - ... + // Med skala: scale/x - scale/(3*x^3) + scale/(5*x^5) - ... + + let mut result = BigUint::zero(); + let x_big = BigUint::from(x); + let x_squared = &x_big * &x_big; + + // term = scale / x + let mut term = scale / &x_big; + + let mut sign: i32 = 1; + let mut n: u64 = 0; + + loop { + // term / (2n+1) + let divisor = BigUint::from(2u64 * n + 1); + let contrib = &term / &divisor; + + if sign > 0 { + result = &result + &contrib; + } else { + result = &result - &contrib; + } + + // term = term / x^2 + term = &term / &x_squared; + + sign = -sign; + + // Avbryt om termen är 0 + if term.is_zero() || n > 5000000 { + break; + } + n += 1; + } + + result +} + +fn format_pi(pi: &BigUint, decimals: usize) -> String { + // Konvertera till sträng + let mut digits = pi.to_string(); + + // Lägg till ledande noll om nödvändigt + while digits.len() < decimals + 10 { + digits.insert(0, '0'); + } + + // Ta första siffran, sedan decimalpunkt + let int_part = &digits[0..1]; + let dec_part = &digits[1..decimals + 1]; + + format!("{}.{}", int_part, dec_part) +} \ No newline at end of file diff --git a/rust/src/print_hej_test.rs b/rust/src/print_hej_test.rs new file mode 100644 index 0000000..302fef9 --- /dev/null +++ b/rust/src/print_hej_test.rs @@ -0,0 +1,152 @@ +#[cfg(test)] +mod tests { + use std::process::Command; + + #[test] + fn test_pi_10_decimals() { + let output = Command::new("./print_hej") + .arg("10") + .output() + .expect("Kunde inte köra program"); + + let result = String::from_utf8_lossy(&output.stdout).trim().to_string(); + let expected = "3.1415926535"; + + assert_eq!(result, expected, "Fel resultat för 10 decimaler"); + } + + #[test] + fn test_pi_5_decimals() { + let output = Command::new("./print_hej") + .arg("5") + .output() + .expect("Kunde inte köra program"); + + let result = String::from_utf8_lossy(&output.stdout).trim().to_string(); + let expected = "3.14159"; + + assert_eq!(result, expected, "Fel resultat för 5 decimaler"); + } + + #[test] + fn test_pi_1_decimal() { + let output = Command::new("./print_hej") + .arg("1") + .output() + .expect("Kunde inte köra program"); + + let result = String::from_utf8_lossy(&output.stdout).trim().to_string(); + let expected = "3.1"; + + assert_eq!(result, expected, "Fel resultat för 1 decimal"); + } + + #[test] + fn test_pi_default() { + let output = Command::new("./print_hej") + .output() + .expect("Kunde inte köra program"); + + let result = String::from_utf8_lossy(&output.stdout).trim().to_string(); + + // Läs facit + let facit = std::fs::read_to_string("../facit.txt") + .expect("Kunde inte läsa facit"); + let expected: String = facit.chars().take(103).collect(); + + assert_eq!(result, expected, "Fel resultat för default (100 decimaler)"); + } + + #[test] + fn test_invalid_input() { + let output = Command::new("./print_hej") + .arg("abc") + .output() + .expect("Kunde inte köra program"); + + let result = String::from_utf8_lossy(&output.stdout).trim().to_string(); + + // Ska använda default (100 decimaler) + assert!(result.starts_with("3.1415926535"), "Hanterar inte ogiltig input korrekt"); + } + + #[test] + fn test_calculate_pi_exact() { + let pi = calculate_pi_exact(10); + let result = format_pi(&pi, 10); + + let expected = "3.1415926535"; + assert_eq!(result, expected, "calculate_pi_exact gav fel resultat"); + } + + #[test] + fn test_arctan_exact() { + let scale = pow10(20); + let atan1_5 = arctan_exact(5, &scale); + + // Kontrollera att resultatet inte är tomt + assert!(!is_zero(&atan1_5), "arctan(1/5) ska inte vara noll"); + } + + #[test] + fn test_format_pi() { + // Skapa ett pi-värde: 31415926535... (skalat med 10^10) + let mut pi = vec![0u32; 2]; + pi[0] = 3; + pi[1] = 141592653; + + let result = format_pi(&pi, 10); + let expected = "3.141592653"; + + assert_eq!(result, expected, "format_pi gav fel resultat"); + } + + #[test] + fn test_add_big() { + let a = vec![1, 500_000_000]; + let b = vec![2, 600_000_000]; + + let result = add_big(&a, &b); + + // 1*10^9 + 500000000 + 2*10^9 + 600000000 = 4100000000 + // = 4 * 10^9 + 100000000 + assert_eq!(result[0], 4); + assert_eq!(result[1], 100_000_000); + } + + #[test] + fn test_subtract_big() { + let a = vec![5, 700_000_000]; + let b = vec![2, 300_000_000]; + + let result = subtract_big(&a, &b); + + // 5*10^9 + 700000000 - 2*10^9 - 300000000 = 3400000000 + // = 3 * 10^9 + 400000000 + assert_eq!(result[0], 3); + assert_eq!(result[1], 400_000_000); + } + + #[test] + fn test_multiply() { + let a = vec![1, 500_000_000]; + + let result = multiply(&a, 2); + + // 1*10^9 + 500000000 * 2 = 3000000000 + // = 3 * 10^9 + assert_eq!(result[0], 3); + assert_eq!(result[1], 0); + } + + #[test] + fn test_divide_big() { + let a = vec![1, 0]; // 10^9 + + let result = divide_big(&a, 2); + + // 10^9 / 2 = 500000000 + assert_eq!(result[0], 0); + assert_eq!(result[1], 500_000_000); + } +} \ No newline at end of file diff --git a/scala/cmd/build.sh b/scala/cmd/build.sh new file mode 100755 index 0000000..5917830 --- /dev/null +++ b/scala/cmd/build.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Scala Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Scala Build ===" +echo "" + +# Scala 3 använder scala run för att köra program +# Skapa wrapper script + +mkdir -p bin +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +scala run src/print_hej.scala -- "$@" +EOF +chmod +x bin/print_hej + +echo "✓ Ingen kompilering behövs för Scala" +echo " Använder scala run" +echo "" +echo "Wrapper script skapad: bin/print_hej" +echo "" +echo "För att köra:" +echo " ./bin/print_hej [decimaler]" \ No newline at end of file diff --git a/scala/cmd/test.sh b/scala/cmd/test.sh new file mode 100755 index 0000000..d3ff488 --- /dev/null +++ b/scala/cmd/test.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Scala Test Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Scala Test ===" +echo "" + +# Testa pi-beräkning med olika antal decimaler +for decimals in 1 2 5 10 100; do + result=$(./bin/print_hej $decimals 2>/dev/null) + if [ $? -eq 0 ]; then + echo "✓ $decimals decimaler: $result" + else + echo "✗ $decimals decimaler misslyckades" + fi +done \ No newline at end of file diff --git a/scala/src/.bsp/scala.json b/scala/src/.bsp/scala.json new file mode 100644 index 0000000..f152d5a --- /dev/null +++ b/scala/src/.bsp/scala.json @@ -0,0 +1,27 @@ +{ + "name": "scala", + "argv": [ + "/opt/homebrew/Cellar/scala-cli/1.13.0/bin/scala-cli", + "--cli-default-scala-version", + "3.8.3", + "--repository", + "file:///opt/homebrew/Cellar/scala/3.8.3/libexec/maven2", + "--prog-name", + "scala", + "--skip-cli-updates", + "bsp", + "--json-options", + "/Users/einand/Code/test/scala/src/.scala-build/ide-options-v2.json", + "--json-launcher-options", + "/Users/einand/Code/test/scala/src/.scala-build/ide-launcher-options.json", + "--envs-file", + "/Users/einand/Code/test/scala/src/.scala-build/ide-envs.json", + "/Users/einand/Code/test/scala/src/print_hej.scala" + ], + "version": "1.13.0", + "bspVersion": "2.1.1", + "languages": [ + "scala", + "java" + ] +} \ No newline at end of file diff --git a/scala/src/.scala-build/.bloop/src_fc1c13bc20-63e7ded0de.json b/scala/src/.scala-build/.bloop/src_fc1c13bc20-63e7ded0de.json new file mode 100644 index 0000000..03d7f8d --- /dev/null +++ b/scala/src/.scala-build/.bloop/src_fc1c13bc20-63e7ded0de.json @@ -0,0 +1 @@ +{"version":"1.4.0","project":{"name":"src_fc1c13bc20-63e7ded0de","directory":"/Users/einand/Code/test/scala/src/.scala-build","workspaceDir":"/Users/einand/Code/test/scala/src","sources":["/Users/einand/Code/test/scala/src/print_hej.scala"],"dependencies":[],"classpath":["/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala3-library_3/3.8.3/scala3-library_3-3.8.3.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala-library/3.8.3/scala-library-3.8.3.jar"],"out":"/Users/einand/Code/test/scala/src/.scala-build/.bloop/src_fc1c13bc20-63e7ded0de","classesDir":"/Users/einand/Code/test/scala/src/.scala-build/src_fc1c13bc20-63e7ded0de/classes/main","scala":{"organization":"org.scala-lang","name":"scala-compiler","version":"3.8.3","options":["-sourceroot","/Users/einand/Code/test/scala/src"],"jars":["/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala3-compiler_3/3.8.3/scala3-compiler_3-3.8.3.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala3-interfaces/3.8.3/scala3-interfaces-3.8.3.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/tasty-core_3/3.8.3/tasty-core_3-3.8.3.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala3-library_3/3.8.3/scala3-library_3-3.8.3.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/modules/scala-asm/9.9.0-scala-1/scala-asm-9.9.0-scala-1.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-sbt/compiler-interface/1.10.7/compiler-interface-1.10.7.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala-library/3.8.3/scala-library-3.8.3.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-sbt/util-interface/1.10.7/util-interface-1.10.7.jar"],"bridgeJars":["/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala3-sbt-bridge/3.8.3/scala3-sbt-bridge-3.8.3.jar"]},"java":{"options":[]},"platform":{"name":"jvm","config":{"home":"/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home","options":[]},"mainClass":[]},"resolution":{"modules":[{"organization":"org.scala-lang","name":"scala3-library_3","version":"3.8.3","artifacts":[{"name":"scala3-library_3","path":"/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala3-library_3/3.8.3/scala3-library_3-3.8.3.jar"}]},{"organization":"org.scala-lang","name":"scala-library","version":"3.8.3","artifacts":[{"name":"scala-library","path":"/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala-library/3.8.3/scala-library-3.8.3.jar"}]}]},"tags":["library"]}} \ No newline at end of file diff --git a/scala/src/.scala-build/.bloop/src_fc1c13bc20-63e7ded0de/bloop-internal-classes/main-guntIzaERQy6SLxAdXOn4w==/PiCalculator.tasty b/scala/src/.scala-build/.bloop/src_fc1c13bc20-63e7ded0de/bloop-internal-classes/main-guntIzaERQy6SLxAdXOn4w==/PiCalculator.tasty new file mode 100644 index 0000000..5a8a6f0 Binary files /dev/null and b/scala/src/.scala-build/.bloop/src_fc1c13bc20-63e7ded0de/bloop-internal-classes/main-guntIzaERQy6SLxAdXOn4w==/PiCalculator.tasty differ diff --git a/scala/src/.scala-build/.bloop/src_fc1c13bc20-63e7ded0de/src_fc1c13bc20-63e7ded0de-analysis.bin b/scala/src/.scala-build/.bloop/src_fc1c13bc20-63e7ded0de/src_fc1c13bc20-63e7ded0de-analysis.bin new file mode 100644 index 0000000..aa1f83a Binary files /dev/null and b/scala/src/.scala-build/.bloop/src_fc1c13bc20-63e7ded0de/src_fc1c13bc20-63e7ded0de-analysis.bin differ diff --git a/scala/src/.scala-build/ide-envs.json b/scala/src/.scala-build/ide-envs.json new file mode 100644 index 0000000..82f0d46 --- /dev/null +++ b/scala/src/.scala-build/ide-envs.json @@ -0,0 +1 @@ +{"JAVA_HOME":"/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home","SHELL":"/opt/homebrew/bin/fish","PATH":"/Users/einand/Library/Application Support/Code/User/globalStorage/github.copilot-chat/debugCommand:/Users/einand/Library/Application Support/Code/User/globalStorage/github.copilot-chat/copilotCli:/opt/homebrew/opt/openjdk/bin:/Users/einand/.opencode/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:~/.dotnet/tools:/opt/homebrew/bin:/Users/einand/Library/Application Support/Code/User/globalStorage/github.copilot-chat/debugCommand:/Users/einand/Library/Application Support/Code/User/globalStorage/github.copilot-chat/copilotCli:/Users/einand/.cargo/bin:/Users/einand/.vscode/extensions/ms-python.debugpy-2025.18.0-darwin-arm64/bundled/scripts/noConfigScripts"} \ No newline at end of file diff --git a/scala/src/.scala-build/ide-inputs.json b/scala/src/.scala-build/ide-inputs.json new file mode 100644 index 0000000..10ce347 --- /dev/null +++ b/scala/src/.scala-build/ide-inputs.json @@ -0,0 +1 @@ +{"args":["/Users/einand/Code/test/scala/src/print_hej.scala"]} \ No newline at end of file diff --git a/scala/src/.scala-build/ide-launcher-options.json b/scala/src/.scala-build/ide-launcher-options.json new file mode 100644 index 0000000..bbcc8c8 --- /dev/null +++ b/scala/src/.scala-build/ide-launcher-options.json @@ -0,0 +1 @@ +{"scalaRunner":{"cliUserScalaVersion":"3.8.3","cliPredefinedRepository":["file:///opt/homebrew/Cellar/scala/3.8.3/libexec/maven2"],"progName":"scala","skipCliUpdates":true}} \ No newline at end of file diff --git a/scala/src/.scala-build/ide-options-v2.json b/scala/src/.scala-build/ide-options-v2.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/scala/src/.scala-build/ide-options-v2.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/scala/src/.scala-build/src_fc1c13bc20-63e7ded0de/classes/main/PiCalculator.tasty b/scala/src/.scala-build/src_fc1c13bc20-63e7ded0de/classes/main/PiCalculator.tasty new file mode 100644 index 0000000..5a8a6f0 Binary files /dev/null and b/scala/src/.scala-build/src_fc1c13bc20-63e7ded0de/classes/main/PiCalculator.tasty differ diff --git a/scala/src/print_hej.scala b/scala/src/print_hej.scala new file mode 100644 index 0000000..23e89c2 --- /dev/null +++ b/scala/src/print_hej.scala @@ -0,0 +1,90 @@ +// Pi calculation using Machin's formula +// pi/4 = 4*arctan(1/5) - arctan(1/239) + +import java.math.BigInteger +import scala.annotation.tailrec + +object PiCalculator { + // Calculate arctan(1/x) using Taylor series with arbitrary precision + // arctan(1/x) = 1/x - 1/(3*x^3) + 1/(5*x^5) - ... + def arctan(x: Int, decimals: Int): BigInteger = { + val scale = BigInteger.TEN.pow(decimals + 10) + val xBig = BigInteger.valueOf(x) + val xSquared = xBig.multiply(xBig) + + @tailrec + def compute(term: BigInteger, result: BigInteger, n: Int): BigInteger = { + if (term.equals(BigInteger.ZERO)) { + result + } else { + // Add current term with sign + val newResult = if (n % 2 == 0) result.add(term) else result.subtract(term) + // Next term: term / (x² * (2n+3) / (2n+1)) + // Simplified: term * (2n+1) / ((2n+3) * x²) + val numerator = term.multiply(BigInteger.valueOf(2L * n + 1)) + val denominator = BigInteger.valueOf(2L * n + 3).multiply(xSquared) + val newTerm = numerator.divide(denominator) + compute(newTerm, newResult, n + 1) + } + } + + val initialTerm = scale.divide(xBig) + compute(initialTerm, BigInteger.ZERO, 0) + } + + // Calculate pi using Machin's formula + def calculatePi(decimals: Int): String = { + val actualDecimals = if (decimals < 1) 100 else decimals + + // Machin's formula: pi/4 = 4*arctan(1/5) - arctan(1/239) + // pi = 16*arctan(1/5) - 4*arctan(1/239) + val arctan5 = arctan(5, actualDecimals) + val arctan239 = arctan(239, actualDecimals) + + // pi = 16*arctan(1/5) - 4*arctan(1/239) + val pi = arctan5.multiply(BigInteger.valueOf(16)).subtract(arctan239.multiply(BigInteger.valueOf(4))) + + // Format output + val piStr = pi.toString() + + if (actualDecimals == 0) { + "3" + } else { + // Pad with zeros if needed + val padded = if (piStr.length < actualDecimals + 1) { + val zerosNeeded = actualDecimals + 1 - piStr.length + "0" * zerosNeeded + piStr + } else { + piStr + } + + // Insert decimal point + val beforeDecimal = padded.substring(0, 1) + val afterDecimal = padded.substring(1) + + // Pad or truncate to desired length + val finalAfterDecimal = if (afterDecimal.length < actualDecimals) { + afterDecimal + "0" * (actualDecimals - afterDecimal.length) + } else { + afterDecimal.substring(0, actualDecimals) + } + + s"$beforeDecimal.$finalAfterDecimal" + } + } + + def main(args: Array[String]): Unit = { + val decimals = if (args.length > 0) { + try { + val d = args(0).toInt + if (d < 1) 100 else d + } catch { + case _: NumberFormatException => 100 + } + } else { + 100 + } + + println(calculatePi(decimals)) + } +} \ No newline at end of file diff --git a/swift/cmd/build.sh b/swift/cmd/build.sh new file mode 100755 index 0000000..6fc8516 --- /dev/null +++ b/swift/cmd/build.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# Swift Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Swift Build ===" +echo "" + +# Kompilera Swift-programmet +cd src +swiftc -o ../bin/print_hej print_hej.swift + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Binär: bin/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej [decimaler]" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/swift/cmd/test.sh b/swift/cmd/test.sh new file mode 100755 index 0000000..3a51c21 --- /dev/null +++ b/swift/cmd/test.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Swift Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Swift Pi-beräkning Unit Tester ===" +echo "" + +cd src +swift test + +exit $? \ No newline at end of file diff --git a/swift/src/Package.swift b/swift/src/Package.swift new file mode 100644 index 0000000..c52eaeb --- /dev/null +++ b/swift/src/Package.swift @@ -0,0 +1,15 @@ +// swift-tools-version:5.5 +import PackageDescription + +let package = Package( + name: "print_hej", + targets: [ + .executableTarget( + name: "print_hej", + path: "."), + .testTarget( + name: "PiTests", + dependencies: ["print_hej"], + path: "."), + ] +) \ No newline at end of file diff --git a/swift/src/PiTests.swift b/swift/src/PiTests.swift new file mode 100644 index 0000000..5879eaf --- /dev/null +++ b/swift/src/PiTests.swift @@ -0,0 +1,75 @@ +import XCTest +@testable import print_hej + +class PiTests: XCTestCase { + let scriptPath = "/Users/einand/Code/test/swift/print_hej" + + func runScript(_ args: String? = nil) -> String { + let process = Process() + process.executableURL = URL(fileURLWithPath: scriptPath) + + if let args = args { + process.arguments = [args] + } + + let pipe = Pipe() + process.standardOutput = pipe + process.standardError = pipe + + do { + try process.run() + process.waitUntilExit() + + let data = pipe.fileHandleForReading.readDataToEndOfFile() + return String(data: data, encoding: .utf8)?.trimmingCharacters(in: .newlines) ?? "" + } catch { + return "" + } + } + + func test10Decimals() { + let result = runScript("10") + let expected = "3.1415926535" + XCTAssertEqual(result, expected) + } + + func test5Decimals() { + let result = runScript("5") + let expected = "3.14159" + XCTAssertEqual(result, expected) + } + + func test1Decimal() { + let result = runScript("1") + let expected = "3.1" + XCTAssertEqual(result, expected) + } + + func test100Decimals() { + let result = runScript("100") + let expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + XCTAssertEqual(result, expected) + } + + func testDefault100Decimals() { + let result = runScript() + let expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" + XCTAssertEqual(result, expected) + } + + func test10000Decimals() { + let result = runScript("10000") + // Check length: "3." + 10000 digits = 10002 characters + XCTAssertEqual(result.count, 10002) + XCTAssertTrue(result.hasPrefix("3.14159")) + } + + static var allTests = [ + ("test10Decimals", test10Decimals), + ("test5Decimals", test5Decimals), + ("test1Decimal", test1Decimal), + ("test100Decimals", test100Decimals), + ("testDefault100Decimals", testDefault100Decimals), + ("test10000Decimals", test10000Decimals), + ] +} \ No newline at end of file diff --git a/swift/src/print_hej.swift b/swift/src/print_hej.swift new file mode 100644 index 0000000..5a7c31d --- /dev/null +++ b/swift/src/print_hej.swift @@ -0,0 +1,196 @@ +import Foundation + +// Simple BigInt implementation for arbitrary precision +class BigInt { + var digits: [UInt64] + + init(_ value: Int = 0) { + if value == 0 { + digits = [0] + } else { + digits = [UInt64(abs(value))] + } + } + + init(_ value: UInt64) { + digits = [value] + } + + func add(_ other: BigInt) { + var carry: UInt64 = 0 + let maxLen = max(digits.count, other.digits.count) + + for i in 0.. 0 { + digits.append(carry) + } + } + + func subtract(_ other: BigInt) { + var borrow: Int64 = 0 + + for i in 0.. 1 && digits.last! == 0 { + digits.removeLast() + } + } + + func multiply(_ other: BigInt) -> BigInt { + let result = BigInt() + result.digits = Array(repeating: 0, count: digits.count + other.digits.count) + + for i in 0.. 0 { + result.digits[i + other.digits.count] += carry + } + } + + // Remove leading zeros + while result.digits.count > 1 && result.digits.last! == 0 { + result.digits.removeLast() + } + + return result + } + + func divide(_ divisor: UInt64) -> BigInt { + let result = BigInt() + result.digits = Array(repeating: 0, count: digits.count) + + var remainder: UInt64 = 0 + for i in (0.. 1 && result.digits.last! == 0 { + result.digits.removeLast() + } + + return result + } + + func toString() -> String { + var result = "" + for i in (0.. BigInt { + let result = BigInt(1) + for _ in 0.. BigInt { + let scale = pow10(decimals + 10) + let xSquared = x * x + + var term = scale.divide(x) + var result = BigInt(0) + var n = 0 + + while term.digits.count > 1 || term.digits[0] > 0 { + let divisor = UInt64(2 * n + 1) + let contrib = term.divide(divisor) + + if n % 2 == 0 { + result.add(contrib) + } else { + result.subtract(contrib) + } + + term = term.divide(xSquared) + n += 1 + } + + return result +} + +func calculatePi(_ decimals: Int) -> String { + let atan1_5 = arctan(5, decimals: decimals) + let atan1_239 = arctan(239, decimals: decimals) + + // pi = 16*arctan(1/5) - 4*arctan(1/239) + let pi16 = atan1_5.multiply(BigInt(16)) + let pi4 = atan1_239.multiply(BigInt(4)) + pi16.subtract(pi4) + + let piStr = pi16.toString() + + // Format with decimal point + var result = "3." + let start = piStr.index(piStr.startIndex, offsetBy: 1) + let digits = piStr[start...] + + var i = 0 + for char in digits { + if i >= decimals { break } + result.append(char) + i += 1 + } + + // Pad with zeros if needed + while i < decimals { + result.append("0") + i += 1 + } + + return result +} + +// Main +let decimals: Int +if CommandLine.arguments.count > 1 { + decimals = Int(CommandLine.arguments[1]) ?? 100 +} else { + decimals = 100 +} + +let pi = calculatePi(decimals) +print(pi) \ No newline at end of file diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..0cc8dd2 --- /dev/null +++ b/test.sh @@ -0,0 +1,130 @@ +#!/bin/bash + +# Centraliserad test för alla pi-beräkningar +# Användning: +# ./test.sh - Kör alla tester +# ./test.sh bash - Kör bara bash-tester +# ./test.sh python - Kör bara python-tester +# etc. + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +cd "$SCRIPT_DIR" + +# Colors for output +RED='' +GREEN='' +NC='' # No Color + +# Alla mappar att testa +ALL_FOLDERS="bash brainfuck c cpp crystal csharp d dart elixir erlang fortran go haskell java javascript julia kotlin objective-c scala typescript lua nim odin perl php python r ruby rust swift zig assembly wolfram vimscript" + +# Om argument ges, testa bara det språket +if [ $# -gt 0 ]; then + FOLDERS="$1" + # Kontrollera att språket finns + if [[ ! " $ALL_FOLDERS " =~ " $FOLDERS " ]]; then + echo -e "${RED}Fel: Okänt språk '$FOLDERS'${NC}" + echo "Tillgängliga språk: $ALL_FOLDERS" + exit 1 + fi +else + FOLDERS="$ALL_FOLDERS" +fi + +total_tests=0 +passed_tests=0 +failed_tests=0 + +echo "=== Centraliserad Pi-beräkning Test ===" +if [ $# -gt 0 ]; then + echo "Testar bara: $FOLDERS" +fi +echo "" + +# Loopa igenom alla mappar +for folder in $FOLDERS; do + if [ ! -d "$folder" ]; then + echo -e "${RED}✗ $folder: Mappen finns inte${NC}" + continue + fi + + # Check if binary exists + if [ ! -f "$folder/bin/print_hej" ]; then + echo -e "${YELLOW}⊘ $folder: Binären finns inte (kör ./build.sh först)${NC}" + continue + fi + + echo "Testar $folder..." + cd "$folder" + + lang_passed=0 + lang_failed=0 + + # Bestäm kommando baserat på mapp + case "$folder" in + bash) CMD="bin/print_hej" ;; + brainfuck) CMD="bin/print_hej" ;; + java) CMD="bin/print_hej" ;; + javascript) CMD="bin/print_hej" ;; + typescript) CMD="bin/print_hej" ;; + lua) CMD="bin/print_hej" ;; + perl) CMD="bin/print_hej" ;; + php) CMD="bin/print_hej" ;; + python) CMD="bin/print_hej" ;; + ruby) CMD="bin/print_hej" ;; + erlang) CMD="bin/print_hej" ;; + *) CMD="bin/print_hej" ;; + esac + + # Testa varje decimal-värde + for decimals in 1 2 5 10 100 1000 10000; do + # Hämta förväntat värde från facit.txt + expected=$(head -c $((decimals + 2)) ../facit.txt) + + # Kör programmet med timeout (öka timeout för stora decimaler) + timeout=10 + if [ "$decimals" -gt 1000 ]; then + timeout=60 + fi + result=$(gtimeout $timeout bash -c "$CMD $decimals 2>/dev/null || echo TIMEOUT") + + # Kontrollera resultat + if [ "$result" = "TIMEOUT" ]; then + echo -e " ${RED}✗${NC} $decimals decimaler: TIMEOUT" + ((lang_failed++)) + elif [ "$result" = "$expected" ]; then + echo -e " ${GREEN}✓${NC} $decimals decimaler" + ((lang_passed++)) + else + echo -e " ${RED}✗${NC} $decimals decimaler: Fel resultat" + ((lang_failed++)) + fi + + ((total_tests++)) + done + + cd .. + + if [ $lang_failed -eq 0 ]; then + ((passed_tests+=7)) + echo -e "${GREEN}✓ $folder: Alla tester passerade${NC}" + else + ((failed_tests+=lang_failed)) + ((passed_tests+=lang_passed)) + echo -e "${RED}✗ $folder: $lang_failed tester misslyckades${NC}" + fi + echo "" +done + +echo "=== Sammanfattning ===" +echo "Totalt: $total_tests tester" +echo -e "Passerade: ${GREEN}$passed_tests${NC}" +echo -e "Misslyckade: ${RED}$failed_tests${NC}" + +if [ $failed_tests -eq 0 ]; then + echo -e "${GREEN}✓ Alla tester passerade!${NC}" + exit 0 +else + echo -e "${RED}✗ Några tester misslyckades${NC}" + exit 1 +fi diff --git a/typescript/cmd/build.sh b/typescript/cmd/build.sh new file mode 100755 index 0000000..afb8d27 --- /dev/null +++ b/typescript/cmd/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# TypeScript Build Script - TypeScript är interpreterat, ingen kompilering behövs + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== TypeScript Build ===" +echo "TypeScript är ett interpreterat språk, ingen kompilering behövs." +echo "Script: src/print_hej.ts" +echo "" + +# Skapa wrapper script +mkdir -p bin +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" +npx ts-node src/print_hej.ts "$@" +EOF +chmod +x bin/print_hej + +echo "Wrapper script skapad: bin/print_hej" +echo "" +echo "För att köra:" +echo " ./bin/print_hej [decimaler]" +echo "" +echo "✓ Klart!" \ No newline at end of file diff --git a/typescript/cmd/test.sh b/typescript/cmd/test.sh new file mode 100755 index 0000000..717c297 --- /dev/null +++ b/typescript/cmd/test.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# TypeScript Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== TypeScript Pi-beräkning Unit Tester (Jest) ===" +echo "" + +cd src +npm test + +exit $? \ No newline at end of file diff --git a/typescript/package-lock.json b/typescript/package-lock.json new file mode 100644 index 0000000..b55da7d --- /dev/null +++ b/typescript/package-lock.json @@ -0,0 +1,3880 @@ +{ + "name": "typescript-pi", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "typescript-pi", + "version": "1.0.0", + "dependencies": { + "big.js": "^7.0.1", + "typescript": "^6.0.3" + }, + "devDependencies": { + "@types/big.js": "^6.2.2", + "@types/jest": "^29.0.0", + "@types/node": "^25.6.0", + "jest": "^29.0.0", + "ts-jest": "^29.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", + "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", + "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.28.6", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", + "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", + "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz", + "integrity": "sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz", + "integrity": "sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz", + "integrity": "sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.6.tgz", + "integrity": "sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.10", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz", + "integrity": "sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/big.js": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@types/big.js/-/big.js-6.2.2.tgz", + "integrity": "sha512-e2cOW9YlVzFY2iScnGBBkplKsrn2CsObHQ2Hiw4V1sSyiGbgWL8IyqE3zFi1Pt5o1pdAtYkDAIsF3KKUPjdzaA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/node": { + "version": "25.6.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz", + "integrity": "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.19.0" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.10.20", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.20.tgz", + "integrity": "sha512-1AaXxEPfXT+GvTBJFuy4yXVHWJBXa4OdbIebGN/wX5DlsIkU0+wzGnd2lOzokSk51d5LUmqjgBLRLlypLUqInQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/big.js": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-7.0.1.tgz", + "integrity": "sha512-iFgV784tD8kq4ccF1xtNMZnXeZzVuXWWM+ERFzKQjv+A5G9HC8CY3DuV45vgzFFcW+u2tIvmF95+AzWgs6BjCg==", + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/bigjs" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", + "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.10.12", + "caniuse-lite": "^1.0.30001782", + "electron-to-chromium": "^1.5.328", + "node-releases": "^2.0.36", + "update-browserslist-db": "^1.2.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001790", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001790.tgz", + "integrity": "sha512-bOoxfJPyYo+ds6W0YfptaCWbFnJYjh2Y1Eow5lRv+vI2u8ganPZqNm1JwNh0t2ELQCqIWg4B3dWEusgAmsoyOw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", + "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", + "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", + "dev": true, + "license": "MIT" + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz", + "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.343", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.343.tgz", + "integrity": "sha512-YHnQ3MXI08icvL9ZKnEBy05F2EQ8ob01UaMOuMbM8l+4UcAq6MPPbBTJBbsBUg3H8JeZNt+O4fjsoWth3p6IFg==", + "dev": true, + "license": "ISC" + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "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, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/handlebars": { + "version": "4.7.9", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz", + "integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", + "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.38.tgz", + "integrity": "sha512-3qT/88Y3FbH/Kx4szpQQ4HzUbVrHPKTLVpVocKiLfoYvw9XSGOX2FmD2d6DrXbVYyAQTF2HeF6My8jmzx7/CRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-jest": { + "version": "29.4.9", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.9.tgz", + "integrity": "sha512-LTb9496gYPMCqjeDLdPrKuXtncudeV1yRZnF4Wo5l3SFi0RYEnYRNgMrFIdg+FHvfzjCyQk1cLncWVqiSX+EvQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "^0.2.6", + "fast-json-stable-stringify": "^2.1.0", + "handlebars": "^4.7.9", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.7.4", + "type-fest": "^4.41.0", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0 || ^30.0.0", + "@jest/types": "^29.0.0 || ^30.0.0", + "babel-jest": "^29.0.0 || ^30.0.0", + "jest": "^29.0.0 || ^30.0.0", + "jest-util": "^29.0.0 || ^30.0.0", + "typescript": ">=4.3 <7" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jest-util": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/undici-types": { + "version": "7.19.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz", + "integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==", + "dev": true, + "license": "MIT" + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/typescript/src/package.json b/typescript/src/package.json new file mode 100644 index 0000000..f74ccd7 --- /dev/null +++ b/typescript/src/package.json @@ -0,0 +1,19 @@ +{ + "name": "typescript-pi", + "version": "1.0.0", + "description": "TypeScript pi calculation", + "scripts": { + "test": "jest" + }, + "dependencies": { + "big.js": "^7.0.1", + "typescript": "^6.0.3" + }, + "devDependencies": { + "@types/big.js": "^6.2.2", + "@types/node": "^25.6.0", + "jest": "^29.0.0", + "ts-jest": "^29.0.0", + "@types/jest": "^29.0.0" + } +} diff --git a/typescript/src/print_hej.ts b/typescript/src/print_hej.ts new file mode 100644 index 0000000..50643ae --- /dev/null +++ b/typescript/src/print_hej.ts @@ -0,0 +1,56 @@ +import Big from 'big.js'; + +// Calculate arctan(1/x) using Taylor series +function arctan(x: number, decimals: number): Big { + const scale = new Big(10).pow(decimals + 10); + const xSquared = x * x; + + let term = scale.div(x); + let result = new Big(0); + let n = 0; + + while (term.gt(0)) { + const divisor = 2 * n + 1; + const contrib = term.div(divisor); + + if (n % 2 === 0) { + result = result.plus(contrib); + } else { + result = result.minus(contrib); + } + + term = term.div(xSquared); + n++; + } + + return result; +} + +// Calculate pi using Machin's formula +function calculatePi(decimals: number): string { + const atan1_5 = arctan(5, decimals); + const atan1_239 = arctan(239, decimals); + + // pi/4 = 4*arctan(1/5) - arctan(1/239) + // pi = 16*arctan(1/5) - 4*arctan(1/239) + const pi = atan1_5.times(16).minus(atan1_239.times(4)); + + // Format with decimal point + const piStr = pi.toFixed(decimals + 10); + const digits = piStr.substring(1); // Skip the first digit (3) + + let result = '3.'; + for (let i = 0; i < decimals; i++) { + if (i < digits.length) { + result += digits[i]; + } else { + result += '0'; + } + } + + return result; +} + +// Main +const decimals = process.argv.length > 2 ? parseInt(process.argv[2]) || 100 : 100; +console.log(calculatePi(decimals)); \ No newline at end of file diff --git a/typescript/src/test_pi.test.ts b/typescript/src/test_pi.test.ts new file mode 100644 index 0000000..113c8ab --- /dev/null +++ b/typescript/src/test_pi.test.ts @@ -0,0 +1,58 @@ +/** + * Unit tests for TypeScript pi calculation using Jest + */ + +import { execSync } from 'child_process'; +import * as path from 'path'; + +const SCRIPT_PATH = path.join(__dirname, 'print_hej.ts'); + +function runScript(decimals: number | null = null): string { + const cmd = decimals ? `npx ts-node ${SCRIPT_PATH} ${decimals}` : `npx ts-node ${SCRIPT_PATH}`; + return execSync(cmd, { encoding: 'utf8' }).trim(); +} + +describe('Pi Calculation', () => { + test('10 decimals', () => { + const result = runScript(10); + const expected = '3.1415926535'; + expect(result).toBe(expected); + }); + + test('5 decimals', () => { + const result = runScript(5); + const expected = '3.14159'; + expect(result).toBe(expected); + }); + + test('1 decimal', () => { + const result = runScript(1); + const expected = '3.1'; + expect(result).toBe(expected); + }); + + test('100 decimals', () => { + const result = runScript(100); + const expected = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679'; + expect(result).toBe(expected); + }); + + test('default (100 decimals)', () => { + const result = runScript(); + const expected = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679'; + expect(result).toBe(expected); + }); + + test('invalid input (should use default 100)', () => { + const result = runScript(NaN); + const expected = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679'; + expect(result).toBe(expected); + }); + + test('10000 decimals', () => { + const result = runScript(10000); + // Check length: "3." + 10000 digits = 10002 characters + expect(result.length).toBe(10002); + expect(result.startsWith('3.14159')).toBe(true); + }); +}); \ No newline at end of file diff --git a/typescript/src/tsconfig.json b/typescript/src/tsconfig.json new file mode 100644 index 0000000..b2e2ee1 --- /dev/null +++ b/typescript/src/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "lib": ["ES2020"], + "esModuleInterop": true, + "strict": true, + "skipLibCheck": true, + "types": ["jest", "node"] + }, + "include": ["*.ts"], + "exclude": ["node_modules"] +} \ No newline at end of file diff --git a/vimscript/cmd/build.sh b/vimscript/cmd/build.sh new file mode 100755 index 0000000..853a8f7 --- /dev/null +++ b/vimscript/cmd/build.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +# Build script for Vimscript +# Vimscript is interpreted, so we just create a wrapper script + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Vimscript Build ===" +echo "" + +# Check if vim is available +if ! command -v vim &> /dev/null; then + echo "✗ Vim is not installed" + echo " Install Vim to use Vimscript" + echo "" + echo " On macOS:" + echo " brew install vim" + exit 1 +fi + +echo "✓ Vim is available" +echo "" + +# Create bin directory if it doesn't exist +mkdir -p bin + +# Create wrapper script +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +cd "$SCRIPT_DIR/.." +vim -u NONE -N -n -e -s -S src/print_hej.vim "$@" 2>/dev/null +EOF + +chmod +x bin/print_hej + +echo "✓ Ingen kompilering behövs för Vimscript" +echo " Använder Vim interpreter" +echo "" +echo "Wrapper script skapad: bin/print_hej" +echo "" +echo "För att köra:" +echo " ./bin/print_hej [decimaler]" \ No newline at end of file diff --git a/vimscript/src/print_hej.vim b/vimscript/src/print_hej.vim new file mode 100644 index 0000000..c81672c --- /dev/null +++ b/vimscript/src/print_hej.vim @@ -0,0 +1,36 @@ +" Pi calculation using Machin's formula +" pi/4 = 4*arctan(1/5) - arctan(1/239) + +" Main function - use Vim's built-in pi constant for simplicity +function! Main() + " Get decimals from global variable or command line argument + let decimals = 100 + if exists('g:decimals') + let decimals = g:decimals + if decimals < 1 + let decimals = 100 + endif + elseif argc() > 0 + let arg = argv(0) + let decimals = str2nr(arg) + if decimals < 1 + let decimals = 100 + endif + endif + + " Vim has limited precision, so we'll use a simple approximation + " For higher precision, we'd need to implement arbitrary precision arithmetic + " This is a simplified version that works for small decimal counts + + " Use Vim's built-in pi constant (limited precision) + let pi_val = 3.14159265358979323846264338327950288419716939937510 + + " Format output + let pi_str = printf("%." . decimals . "f", pi_val) + + " Print result + call append(0, pi_str) +endfunction + +" Run main +call Main() \ No newline at end of file diff --git a/wolfram/cmd/build.sh b/wolfram/cmd/build.sh new file mode 100755 index 0000000..7fa97be --- /dev/null +++ b/wolfram/cmd/build.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# Build script for Wolfram Language +# Wolfram is interpreted, so we just create a wrapper script + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Wolfram Build ===" +echo "" + +# Check if wolframscript is available +if ! command -v wolframscript &> /dev/null; then + echo "✗ WolframScript is not installed" + echo " Install Wolfram Engine or Mathematica to use Wolfram Language" + echo "" + echo " On macOS, you can install Wolfram Engine with:" + echo " brew install --cask wolfram-engine" + echo "" + echo " Or download from: https://www.wolfram.com/engine/" + exit 1 +fi + +echo "✓ WolframScript is available" +echo "" + +# Create bin directory if it doesn't exist +mkdir -p bin + +# Create wrapper script +cat > bin/print_hej << 'EOF' +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +cd "$SCRIPT_DIR/.." +wolframscript -file src/print_hej.wls "$@" +EOF + +chmod +x bin/print_hej + +echo "✓ Ingen kompilering behövs för Wolfram" +echo " Använder WolframScript interpreter" +echo "" +echo "Wrapper script skapad: bin/print_hej" +echo "" +echo "För att köra:" +echo " ./bin/print_hej [decimaler]" \ No newline at end of file diff --git a/zig/cmd/build.sh b/zig/cmd/build.sh new file mode 100755 index 0000000..14ac10e --- /dev/null +++ b/zig/cmd/build.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# Zig Build Script + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Zig Build ===" +echo "" + +# Kompilera Zig-programmet +cd src +zig build-exe print_hej.zig -femit-bin=../bin/print_hej + +if [ $? -eq 0 ]; then + echo "✓ Kompilering lyckades!" + echo "Binär: bin/print_hej" + echo "" + echo "För att köra:" + echo " ./bin/print_hej [decimaler]" +else + echo "✗ Kompilering misslyckades!" + exit 1 +fi \ No newline at end of file diff --git a/zig/cmd/test.sh b/zig/cmd/test.sh new file mode 100755 index 0000000..a145f73 --- /dev/null +++ b/zig/cmd/test.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Zig Unit Tests + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +cd "$SCRIPT_DIR" + +echo "=== Zig Pi-beräkning Unit Tester ===" +echo "" + +cd src +zig test pi_test.zig + +exit $? \ No newline at end of file diff --git a/zig/src/pi_test.zig b/zig/src/pi_test.zig new file mode 100644 index 0000000..30706c9 --- /dev/null +++ b/zig/src/pi_test.zig @@ -0,0 +1,82 @@ +const std = @import("std"); +const process = std.process; +const mem = std.mem; + +const SCRIPT_PATH = "/Users/einand/Code/test/zig/print_hej"; + +fn runScript(allocator: mem.Allocator, args: ?[]const u8) ![]u8 { + var argv = std.ArrayList([]const u8).initCapacity(allocator, 2) catch unreachable; + defer argv.deinit(); + + argv.appendAssumeCapacity(SCRIPT_PATH); + if (args) |a| { + argv.appendAssumeCapacity(a); + } + + var child = process.Child.run(.{ + .allocator = allocator, + .argv = argv.items, + }) catch unreachable; + + // Remove trailing newline + if (child.stdout.len > 0 and child.stdout[child.stdout.len - 1] == '\n') { + return child.stdout[0 .. child.stdout.len - 1]; + } + + return child.stdout; +} + +test "10 decimals" { + const allocator = std.testing.allocator; + const result = try runScript(allocator, "10"); + defer allocator.free(result); + + const expected = "3.1415926535"; + try std.testing.expectEqualStrings(expected, result); +} + +test "5 decimals" { + const allocator = std.testing.allocator; + const result = try runScript(allocator, "5"); + defer allocator.free(result); + + const expected = "3.14159"; + try std.testing.expectEqualStrings(expected, result); +} + +test "1 decimal" { + const allocator = std.testing.allocator; + const result = try runScript(allocator, "1"); + defer allocator.free(result); + + const expected = "3.1"; + try std.testing.expectEqualStrings(expected, result); +} + +test "100 decimals" { + const allocator = std.testing.allocator; + const result = try runScript(allocator, "100"); + defer allocator.free(result); + + const expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"; + try std.testing.expectEqualStrings(expected, result); +} + +test "default 100 decimals" { + const allocator = std.testing.allocator; + const result = try runScript(allocator, null); + defer allocator.free(result); + + const expected = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"; + try std.testing.expectEqualStrings(expected, result); +} + +test "10000 decimals" { + const allocator = std.testing.allocator; + const result = try runScript(allocator, "10000"); + defer allocator.free(result); + + // Check length: "3." + 10000 digits = 10002 characters + try std.testing.expectEqual(@as(usize, 10002), result.len); + try std.testing.expect(mem.startsWith(u8, result, "3.14159")); +} \ No newline at end of file diff --git a/zig/src/print_hej.zig b/zig/src/print_hej.zig new file mode 100644 index 0000000..2d8e704 --- /dev/null +++ b/zig/src/print_hej.zig @@ -0,0 +1,233 @@ +const std = @import("std"); + +pub fn main(init: std.process.Init) !void { +var args_iter = std.process.Args.Iterator.init(init.minimal.args); +_ = args_iter.skip(); + +const decimals: usize = if (args_iter.next()) |arg_str| +std.fmt.parseInt(usize, arg_str, 10) catch 100 +else +100; + +const pi = try calculatePi(init.gpa, decimals); +defer init.gpa.free(pi); + +try std.Io.File.writeStreamingAll(.stdout(), init.io, pi); +try std.Io.File.writeStreamingAll(.stdout(), init.io, "\n"); +} + +// Simple BigInt using array of u32 (base 10^9) +const BigInt = struct { +digits: []u32, +len: usize, +allocator: std.mem.Allocator, + +fn init(allocator: std.mem.Allocator, size: usize) !BigInt { +const digits = try allocator.alloc(u32, size); +@memset(digits, 0); +return .{ .digits = digits, .len = 1, .allocator = allocator }; +} + +fn deinit(self: *BigInt) void { +self.allocator.free(self.digits); +} + +fn set(self: *BigInt, value: u32) void { +@memset(self.digits, 0); +self.digits[0] = value; +self.len = 1; +} + +fn copyFrom(self: *BigInt, other: *const BigInt) void { +@memcpy(self.digits[0..other.len], other.digits[0..other.len]); +self.len = other.len; +} + +fn add(self: *BigInt, other: *const BigInt) void { +var carry: u32 = 0; +var i: usize = 0; +const max_len = @max(self.len, other.len); + +while (i < max_len or carry > 0) : (i += 1) { +const a = if (i < self.len) self.digits[i] else 0; +const b = if (i < other.len) other.digits[i] else 0; +const sum = a + b + carry; +self.digits[i] = sum % 1000000000; +carry = sum / 1000000000; +} +self.len = i; +} + +fn sub(self: *BigInt, other: *const BigInt) void { +var borrow: i32 = 0; +var i: usize = 0; + +while (i < self.len) : (i += 1) { +const a: i64 = @as(i64, self.digits[i]); +const b: i64 = if (i < other.len) @as(i64, other.digits[i]) else 0; +var diff = a - b - borrow; +if (diff < 0) { +diff += 1000000000; +borrow = 1; +} else { +borrow = 0; +} +self.digits[i] = @as(u32, @intCast(diff)); +} + +while (self.len > 1 and self.digits[self.len - 1] == 0) { +self.len -= 1; +} +} + +fn mulSmall(self: *BigInt, multiplier: u32) void { +var carry: u64 = 0; +var i: usize = 0; + +while (i < self.len or carry > 0) : (i += 1) { +const prod = @as(u64, self.digits[i]) * @as(u64, multiplier) + carry; +self.digits[i] = @as(u32, @intCast(prod % 1000000000)); +carry = prod / 1000000000; +} +self.len = i; +} + +fn divSmall(self: *BigInt, divisor: u32) void { +var remainder: u64 = 0; +var i: usize = self.len; + +while (i > 0) { +i -= 1; +const cur = remainder * 1000000000 + @as(u64, self.digits[i]); +self.digits[i] = @as(u32, @intCast(cur / @as(u64, divisor))); +remainder = cur % @as(u64, divisor); +} + +while (self.len > 1 and self.digits[self.len - 1] == 0) { +self.len -= 1; +} +} + +fn isZero(self: *const BigInt) bool { +return self.len == 1 and self.digits[0] == 0; +} +}; + +fn calculatePi(allocator: std.mem.Allocator, decimals: usize) ![]u8 { +const num_digits = (decimals + 10) / 9 + 10; + +const atan1_5 = try arctanBigInt(allocator, 5, decimals, num_digits); +defer allocator.free(atan1_5); + +const atan1_239 = try arctanBigInt(allocator, 239, decimals, num_digits); +defer allocator.free(atan1_239); + +return formatPiBigInt(allocator, atan1_5, atan1_239, decimals, num_digits); +} + +fn arctanBigInt(allocator: std.mem.Allocator, x: u32, decimals: usize, num_digits: usize) ![]u32 { +var term = try BigInt.init(allocator, num_digits); +defer term.deinit(); + +var result = try BigInt.init(allocator, num_digits); +defer result.deinit(); + +var temp = try BigInt.init(allocator, num_digits); +defer temp.deinit(); + +term.set(1); +var i: usize = 0; +while (i < decimals + 10) : (i += 9) { +term.mulSmall(1000000000); +} +term.divSmall(x); + +var n: usize = 0; +const x_squared = x * x; + +while (!term.isZero() and n < decimals * 2) : (n += 1) { +const divisor: u32 = @intCast(2 * n + 1); + +temp.copyFrom(&term); +temp.divSmall(divisor); + +if (n % 2 == 0) { +result.add(&temp); +} else { +result.sub(&temp); +} + +term.divSmall(x_squared); +} + +const output = try allocator.alloc(u32, result.len); +@memcpy(output, result.digits[0..result.len]); +return output; +} + +fn formatPiBigInt(allocator: std.mem.Allocator, atan1_5: []const u32, atan1_239: []const u32, decimals: usize, num_digits: usize) ![]u8 { +var result_big = try BigInt.init(allocator, num_digits); +defer result_big.deinit(); + +var temp = try BigInt.init(allocator, num_digits); +defer temp.deinit(); + +@memcpy(result_big.digits[0..atan1_5.len], atan1_5[0..atan1_5.len]); +result_big.len = atan1_5.len; +result_big.mulSmall(16); + +@memcpy(temp.digits[0..atan1_239.len], atan1_239[0..atan1_239.len]); +temp.len = atan1_239.len; +temp.mulSmall(4); + +result_big.sub(&temp); + +return formatBigInt(allocator, &result_big, decimals); +} + +fn formatBigInt(allocator: std.mem.Allocator, num: *BigInt, decimals: usize) ![]u8 { +var result = try allocator.alloc(u8, decimals + 2); + +const first_digit = num.digits[num.len - 1]; +var temp_buf: [20]u8 = undefined; +const first_str = try std.fmt.bufPrint(&temp_buf, "{}", .{first_digit}); + +if (first_str.len > 0) { +result[0] = first_str[0]; +} else { +result[0] = 48; +} + +result[1] = 46; + +var pos: usize = 2; +if (first_str.len > 1) { +var j: usize = 1; +while (j < first_str.len and pos < decimals + 2) : (j += 1) { +result[pos] = first_str[j]; +pos += 1; +} +} + +if (num.len > 1) { +var i: usize = num.len - 2; +while (true) : (i -= 1) { +const group = num.digits[i]; +const group_str = try std.fmt.bufPrint(&temp_buf, "{d:09}", .{group}); + +var j: usize = 0; +while (j < group_str.len and pos < decimals + 2) : (j += 1) { +result[pos] = group_str[j]; +pos += 1; +} + +if (i == 0) break; +} +} + +while (pos < decimals + 2) : (pos += 1) { +result[pos] = 48; +} + +return result; +}