mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-23 22:31:10 +03:00
Compare commits
19
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63c842bdb3 | ||
|
|
748126f207 | ||
|
|
e876d03608 | ||
|
|
81cf6b5483 | ||
|
|
a0bc3468b2 | ||
|
|
5a7b0f9636 | ||
|
|
b59942ad9f | ||
|
|
38d568798c | ||
|
|
9dfd347edf | ||
|
|
33e5294a94 | ||
|
|
2852c30e1f | ||
|
|
124284278f | ||
|
|
a7992340f7 | ||
|
|
2c2fb216e3 | ||
|
|
221ddfa75c | ||
|
|
cb5b462e11 | ||
|
|
9eac9cb2a9 | ||
|
|
23f82d956a | ||
|
|
d3b32cc14e |
No files matched your search
@@ -1,34 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve our tools
|
||||
title: '[BUG] '
|
||||
labels: bug
|
||||
assignees: CorentinTh
|
||||
---
|
||||
|
||||
**Which tool is impacted?**
|
||||
Example: the token generator
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Configuration (please complete the following information):**
|
||||
|
||||
- Device: [e.g. iPhone6, ]
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,48 @@
|
||||
name: 🐞 Bug Report
|
||||
description: File a bug report.
|
||||
labels: ['bug', 'triage']
|
||||
assignees:
|
||||
- CorentinTh
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
|
||||
- type: textarea
|
||||
id: bug-description
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!
|
||||
placeholder: Bug description
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: What happened?
|
||||
description: Also tell us, what did you expect to happen? If you have a screenshot, you can paste it here.
|
||||
placeholder: Tell us what you see!
|
||||
value: 'A bug happened!'
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: version
|
||||
attributes:
|
||||
label: System information
|
||||
description: What is you environment? You can use the `npx envinfo --system --browsers` command to get this information.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: app-type
|
||||
attributes:
|
||||
label: Where did you encounter the bug?
|
||||
options:
|
||||
- Public app (it-tools.tech)
|
||||
- A self hosted
|
||||
- Other (installations, docker, etc.)
|
||||
validations:
|
||||
required: true
|
||||
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
||||
@@ -0,0 +1,56 @@
|
||||
name: 🚀 New feature proposal
|
||||
description: Propose a new feature/enhancement or tool idea for IT-Tools
|
||||
labels: ['enhancement', 'triage']
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for your interest in the project and taking the time to fill out this feature report!
|
||||
|
||||
- type: dropdown
|
||||
id: request-type
|
||||
attributes:
|
||||
label: What type of request is this?
|
||||
options:
|
||||
- New tool idea
|
||||
- New feature for an existing tool
|
||||
- Deployment or CI/CD improvement
|
||||
- Self-hosting improvement
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: feature-description
|
||||
attributes:
|
||||
label: Clear and concise description of the feature you are proposing
|
||||
description: A clear and concise description of what the feature is.
|
||||
placeholder: 'Example: a token generator tool'
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: alternative
|
||||
attributes:
|
||||
label: Is their example of this tool in the wild?
|
||||
description: Provide link to already existing tool (like websites, apps, cli, ...) or npm packages that could be used or provide inspiration for the feature.
|
||||
|
||||
- type: textarea
|
||||
id: additional-context
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Any other context or screenshots about the feature request here.
|
||||
|
||||
- type: checkboxes
|
||||
id: checkboxes
|
||||
attributes:
|
||||
label: Validations
|
||||
description: Before submitting the issue, please make sure you do the following
|
||||
options:
|
||||
- label: Check the feature is not already implemented in the project.
|
||||
required: true
|
||||
- label: Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
|
||||
required: true
|
||||
- label: Check that the feature can be implemented in a client side only app (IT-Tools is client side only, no server).
|
||||
required: true
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
name: New tool request
|
||||
about: Suggest a new tool idea
|
||||
title: '[NEW TOOL]'
|
||||
labels: new tool
|
||||
assignees: CorentinTh
|
||||
---
|
||||
|
||||
**What tool do you want?**
|
||||
Example: a token generator
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Is their example of this tool in the wild?**
|
||||
Provide link to already existing tool or npm packages if any exists
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the feature request here.
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
name: Other request
|
||||
about: Any request that does not concern a tool creation, a new feature request on a tool or a bug
|
||||
title: '[OTHER] '
|
||||
labels:
|
||||
assignees: CorentinTh
|
||||
---
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the feature request here.
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
name: Tool improvement
|
||||
about: Improvement on an existing tool
|
||||
title: '[TOOL IMPROVEMENT]'
|
||||
labels: enhancement
|
||||
assignees: CorentinTh
|
||||
---
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the feature request here.
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 20
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ dev ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ dev ]
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'javascript' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||
# Learn more:
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 20
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 20
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Get Playwright version
|
||||
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 20
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
|
||||
@@ -2,9 +2,51 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
## Version 2024.05.13-a0bc346
|
||||
|
||||
### Features
|
||||
- **i18n**: added German translation (#1038) (2c2fb21)
|
||||
- **new tool**: Outlook Safelink Decoder (#911) (d3b32cc)
|
||||
- **new tool**: ascii art generator (#886) (fe349ad)
|
||||
- **i18n**: get locales on build (#880) (dc04615)
|
||||
- **i18n**: added vi tools translations (#876) (079aa21)
|
||||
- **i18n**: added zh tools translations (#874) (9c6b122)
|
||||
- **i18n**: added missing locale files in tools (#863) (7f5fa00)
|
||||
- **i18n**: added vietnamese language (#859) (1334bff)
|
||||
- **i18n**: added spanish language (#854) (85b50bb)
|
||||
- **i18n**: added portuguese language (#813) (c65ffb6)
|
||||
- **i18n**: added ukrainian language (#827) (693f362)
|
||||
- **new-tool**: yaml formater (#779) (fc06f01)
|
||||
- **new-tool**: added unicode conversion utilities (#858) (c46207f)
|
||||
|
||||
### Bug fixes
|
||||
- **language**: English language cleanup (#1036) (221ddfa)
|
||||
- **url-encoder, validation**: typo in validation of url-encoder.vue #1024 (cb5b462)
|
||||
- **integer base converter**: support bigint (#872) (9eac9cb)
|
||||
- **bcrypt tool**: allow salt rounds up to 100 (#987) (23f82d9)
|
||||
|
||||
### Refactoring
|
||||
- **lint**: removed extra semi (33e5294)
|
||||
- **auto-imports**: regen auto imports (1242842)
|
||||
- **home**: lightened tool cards (#882) (a07806c)
|
||||
- **home**: removed n-grid to prevent layout shift (#881) (10e56b3)
|
||||
- **i18n**: added locales per tool (#861) (95698cb)
|
||||
|
||||
### Chores
|
||||
- **issues**: prevent empty issues (#1078) (a0bc346)
|
||||
- **issues**: removed old issue templates (#1077) (5a7b0f9)
|
||||
- **node**: upgraded node version in CI workflows (b59942a)
|
||||
- **version**: release 2024.05.10-33e5294 (38d5687)
|
||||
- **issues**: improved issues template (2852c30)
|
||||
- **issues**: improved bug issue template (#1046) (a799234)
|
||||
|
||||
### Documentation
|
||||
- **changelog**: update changelog for 2024.05.10-33e5294 (9dfd347)
|
||||
|
||||
## Version 2023.12.21-5ed3693
|
||||
|
||||
### Features
|
||||
|
||||
- **i18n**: improve chinese i18n (#757) (2e56641)
|
||||
- **i18n**: add tooltip and favoriteButton i18n (#756) (a1037cf)
|
||||
- **i18n**: add Chinese translation base (#718) (8f99eb6)
|
||||
@@ -12,6 +54,7 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
- **new tool**: numeronym generator (#729) (e07e2ae)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **jwt-parser**: jwt claim array support (#799) (5ed3693)
|
||||
- **camera-recorder**: stop camera on navigation (#782) (80e46c9)
|
||||
- **doc**: updated create new tool command in readme (#762) (7a70dbb)
|
||||
@@ -20,6 +63,7 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
- **eta**: corrected example (#737) (821cbea)
|
||||
|
||||
### Refactoring
|
||||
|
||||
- **about, i18n**: improved i18n dx with markdown (#753) (bd3edcb)
|
||||
- **token, i18n**: complete fr translation (#752) (de1ee69)
|
||||
- **uuid generator**: uuid version picker (#751) (38586ca)
|
||||
@@ -29,6 +73,7 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
- **bcrypt**: fix input label align (#721) (093ff31)
|
||||
|
||||
### Chores
|
||||
|
||||
- **deps**: switched from oui to oui-data for mac address lookup (#693) (0fe9a20)
|
||||
- **deps**: update unocss monorepo to ^0.57.0 (#638) (2e396d8)
|
||||
- **docker**: added armv7 plateform for docker releases (#722) (fe1de8c)
|
||||
@@ -36,19 +81,23 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
## Version 2023.11.02-7d94e11
|
||||
|
||||
### Features
|
||||
|
||||
- **i18n**: language selector (#710) (e86fd96)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **dockerfile**: revert replacement of nginx image with non-privileged one (#716) (7d94e11)
|
||||
- **encryption**: alert on decryption error (#711) (02b0d0d)
|
||||
|
||||
### Refactoring
|
||||
|
||||
- **math-evaluator**: improved description (e87f4b1)
|
||||
- **math-evaluator**: improved search and UX (#713) (58de897)
|
||||
|
||||
## Version 2023.11.01-e164afb
|
||||
|
||||
### Features
|
||||
|
||||
- **command-palette**: clear prompt on palette close (#708) (d013696)
|
||||
- **command-palette**: added about page in command palette (99b1eb9)
|
||||
- **new tool**: random MAC address generator (#657) (cc3425d)
|
||||
@@ -67,11 +116,13 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
- **new tool**: text diff and comparator (#588) (81bfe57)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **deps**: fix issue on slugify (#593) (#673) (720201a)
|
||||
- **deps**: update dependency monaco-editor to ^0.43.0 (#620) (e371ef7)
|
||||
- **deps**: update dependency sql-formatter to v13 (#606) (c7d4562)
|
||||
|
||||
### Refactoring
|
||||
|
||||
- **ui**: better ui demo preview menu (#664) (015c673)
|
||||
- **color-converter**: improved color-converter UX (#701) (abb8335)
|
||||
- **docker**: improved docker config (#700) (020e9cb)
|
||||
@@ -88,6 +139,7 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
- **bcrypt**: fix typo (#604) (e18bae1)
|
||||
|
||||
### Chores
|
||||
|
||||
- **deps**: clean unused dependencies (#709) (e164afb)
|
||||
- **deps**: update docker/setup-qemu-action action to v3 (#627) (4365226)
|
||||
- **deps**: update docker/setup-buildx-action action to v3 (#626) (57ecda1)
|
||||
@@ -102,19 +154,23 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
- **deps**: update dependency typescript to ~5.2.0 (#587) (f3e14fc)
|
||||
|
||||
### Doc
|
||||
|
||||
- **readme**: added contributors list (#622) (557b304)
|
||||
- **hosting**: added cloudron in the other hosting solutions section (#589) (06c3547)
|
||||
|
||||
## Version 2023.08.21-6f93cba
|
||||
|
||||
### Features
|
||||
|
||||
- **copy**: support legacy copy to clipboard for older browser (#581) (6f93cba)
|
||||
- **new tool**: string obfuscator (#575) (c58d6e3)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **deps**: update dependency sql-formatter to v12 (#520) (2bcb77a)
|
||||
|
||||
### Chores
|
||||
|
||||
- **deps**: switched to fucking typescript v5 (#501) (76b2761)
|
||||
- **deps**: update dependency @antfu/eslint-config to ^0.40.0 (#552) (6ff9a01)
|
||||
- **deps**: update dependency prettier to v3 (#564) (a2b9b15)
|
||||
@@ -124,6 +180,7 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
## Version 2023.08.16-9bd4ad4
|
||||
|
||||
### Features
|
||||
|
||||
- **Case Converter**: Add lowercase and uppercase (#534) (7b6232a)
|
||||
- **new tool**: emoji picker (#551) (93f7cf0)
|
||||
- **ui**: added c-select in the ui lib (#550) (dfa1ba8)
|
||||
@@ -144,6 +201,7 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
- **base64-string-converter**: switch to encode and decode url safe base64 strings (#392) (0b20f1c)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **deps**: update dependency uuid to v9 (#566) (5e12991)
|
||||
- **deps**: update dependency mathjs to v11 (#519) (7924456)
|
||||
- **deps**: update dependency @vueuse/router to v10 (#516) (ea0f27c)
|
||||
@@ -163,6 +221,7 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
- **ipv4-converter**: removed readonly on input (7aed9c5)
|
||||
|
||||
### Refactoring
|
||||
|
||||
- **navbar**: consistent spacing in navbar buttons (#507) (30f88fc)
|
||||
- **ui**: remove n-text (#506) (72c98a3)
|
||||
- **ui**: replaced some n-input to c-input (#505) (05ea545)
|
||||
@@ -175,6 +234,7 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
- **ui**: replaced some n-input with c-input-text (f7fc779)
|
||||
|
||||
### Chores
|
||||
|
||||
- **deps**: update dependency vitest to ^0.34.0 (#562) (9bd4ad4)
|
||||
- **deps**: update dependency node to v18.17.1 (#560) (65a9474)
|
||||
- **deps**: update dependency unocss to ^0.55.0 (#561) (85cc7a8)
|
||||
@@ -215,47 +275,58 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
- **lint**: switched to a better lint config (33c9b66)
|
||||
|
||||
### Refacor
|
||||
|
||||
- **transformers**: use monospace font for JSON and SQL text areas (#476) (ba4876d)
|
||||
|
||||
### Documentation
|
||||
|
||||
- **ide**: updated vscode extensions settings (#472) (847323c)
|
||||
|
||||
### Chors
|
||||
|
||||
- **deps**: updated vueuse dependency version (8515c24)
|
||||
|
||||
## Version 2023.05.14-77f2efc
|
||||
|
||||
### Features
|
||||
|
||||
- **list-converter**: a small converter who deals with column based data and do some stuff with it (#387) (83a7b3b)
|
||||
- **new tool**: phone parser and normalizer (ce3150c)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **phone-parser**: use default country code (a43c546)
|
||||
- **home**: prevent weird blue border on card (3f6c8f0)
|
||||
|
||||
### Refactoring
|
||||
|
||||
- **ui**: replaced some n-input with c-input-text (77f2efc)
|
||||
|
||||
### Chores
|
||||
|
||||
- **issues**: updated new tool request issue template (edae4c6)
|
||||
|
||||
### Ui-lib
|
||||
|
||||
- **new-component**: added text input component in the c-lib (aad8d84)
|
||||
- **button**: size variants (401f13f)
|
||||
|
||||
## Version 2023.04.23-92bd835
|
||||
|
||||
### Features
|
||||
|
||||
- **ui-lib**: demo pages for c-lib components (92bd835)
|
||||
- **new-tool**: diff of two json objects (362f2fa)
|
||||
- **ipv4-range-expander**: expands a given IPv4 start and end address to a valid IPv4 subnet (#366) (df989e2)
|
||||
- **date converter**: auto focus main input (6d22025)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **ts**: cleaned legacy typechecking warning (e88c1d5)
|
||||
- **mac-address-lookup**: added copy handler on button click (c311e38)
|
||||
|
||||
### Refactoring
|
||||
|
||||
- **ui-lib**: prevent c-button to shrink (61ece23)
|
||||
- **ui**: replaced naive ui cards with custom ones (f080933)
|
||||
- **clean**: removed unused lodash import (bb32513)
|
||||
@@ -265,48 +336,60 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
## Version 2023.04.14-dbad773
|
||||
|
||||
### Features
|
||||
|
||||
- **new-tool**: http status codes (8355bd2)
|
||||
|
||||
### Refactoring
|
||||
|
||||
- **uuid-generator**: prevent NaN in quantity (6fb4994)
|
||||
|
||||
### Chores
|
||||
|
||||
- **release**: create a github release on new version (dbad773)
|
||||
- **version**: reset CHANGELOG content to support new format (85cb0ff)
|
||||
|
||||
## Version 2023.04.14-f9b77b7
|
||||
|
||||
### Features
|
||||
|
||||
- **new-tool**: http status codes (8355bd2)
|
||||
|
||||
### Refactoring
|
||||
|
||||
- **uuid-generator**: prevent NaN in quantity (6fb4994)
|
||||
|
||||
### Chores
|
||||
|
||||
- **release**: create a github release on new version (f9b77b7)
|
||||
- **version**: reset CHANGELOG content to support new format (85cb0ff)
|
||||
|
||||
## Version 2023.04.14-2f0d239
|
||||
|
||||
### Features
|
||||
|
||||
- **new-tool**: http status codes (8355bd2)
|
||||
|
||||
### Refactoring
|
||||
|
||||
- **uuid-generator**: prevent NaN in quantity (6fb4994)
|
||||
|
||||
### Chores
|
||||
|
||||
- **release**: create a github release on new version (2f0d239)
|
||||
- **version**: reset CHANGELOG content to support new format (85cb0ff)
|
||||
|
||||
## Version 2023.04.14-474cae4
|
||||
|
||||
### Features
|
||||
|
||||
- **new-tool**: http status codes (8355bd2)
|
||||
|
||||
### Refactoring
|
||||
|
||||
- **uuid-generator**: prevent NaN in quantity (6fb4994)
|
||||
|
||||
### Chores
|
||||
|
||||
- **release**: create a github release on new version (474cae4)
|
||||
- **version**: reset CHANGELOG content to support new format (85cb0ff)
|
||||
|
||||
|
||||
Vendored
+4
-7
@@ -108,6 +108,7 @@ declare module '@vue/runtime-core' {
|
||||
Ipv6UlaGenerator: typeof import('./src/tools/ipv6-ula-generator/ipv6-ula-generator.vue')['default']
|
||||
JsonDiff: typeof import('./src/tools/json-diff/json-diff.vue')['default']
|
||||
JsonMinify: typeof import('./src/tools/json-minify/json-minify.vue')['default']
|
||||
JsonToCsharp: typeof import('./src/tools/json-to-csharp/json-to-csharp.vue')['default']
|
||||
JsonToCsv: typeof import('./src/tools/json-to-csv/json-to-csv.vue')['default']
|
||||
JsonToToml: typeof import('./src/tools/json-to-toml/json-to-toml.vue')['default']
|
||||
JsonToYaml: typeof import('./src/tools/json-to-yaml-converter/json-to-yaml.vue')['default']
|
||||
@@ -127,24 +128,19 @@ declare module '@vue/runtime-core' {
|
||||
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
|
||||
MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default']
|
||||
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
|
||||
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
||||
NCode: typeof import('naive-ui')['NCode']
|
||||
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||
NDivider: typeof import('naive-ui')['NDivider']
|
||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||
NFormItem: typeof import('naive-ui')['NFormItem']
|
||||
NGi: typeof import('naive-ui')['NGi']
|
||||
NGrid: typeof import('naive-ui')['NGrid']
|
||||
NH1: typeof import('naive-ui')['NH1']
|
||||
NH3: typeof import('naive-ui')['NH3']
|
||||
NIcon: typeof import('naive-ui')['NIcon']
|
||||
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
||||
NLabel: typeof import('naive-ui')['NLabel']
|
||||
NLayout: typeof import('naive-ui')['NLayout']
|
||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||
NMenu: typeof import('naive-ui')['NMenu']
|
||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||
NSpin: typeof import('naive-ui')['NSpin']
|
||||
NSpace: typeof import('naive-ui')['NSpace']
|
||||
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
||||
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
||||
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
|
||||
@@ -159,6 +155,7 @@ declare module '@vue/runtime-core' {
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
RsaKeyPairGenerator: typeof import('./src/tools/rsa-key-pair-generator/rsa-key-pair-generator.vue')['default']
|
||||
SafelinkDecoder: typeof import('./src/tools/safelink-decoder/safelink-decoder.vue')['default']
|
||||
SlugifyString: typeof import('./src/tools/slugify-string/slugify-string.vue')['default']
|
||||
SpanCopyable: typeof import('./src/components/SpanCopyable.vue')['default']
|
||||
SqlPrettify: typeof import('./src/tools/sql-prettify/sql-prettify.vue')['default']
|
||||
|
||||
+455
@@ -0,0 +1,455 @@
|
||||
'404':
|
||||
notFound: 404 Nicht gefunden
|
||||
sorry: Entschuldigung, diese Seite scheint nicht zu existieren
|
||||
maybe: >-
|
||||
Vielleicht macht der Cache etwas Seltsames. Mit einem erzwungenen Neuladen
|
||||
versuchen?
|
||||
backHome: Zurück zur Startseite
|
||||
home:
|
||||
categories:
|
||||
newestTools: Neueste Tools
|
||||
favoriteTools: Deine Lieblingstools
|
||||
allTools: Alle Tools
|
||||
subtitle: Praktische Tools für Entwickler
|
||||
toggleMenu: Menü umschalten
|
||||
home: Startseite
|
||||
uiLib: UI-Bibliothek
|
||||
support: Unterstütze die Entwicklung von IT-Tools
|
||||
buyMeACoffee: Kauf mir einen Kaffee
|
||||
follow:
|
||||
title: Magst du IT-Tools?
|
||||
p1: Gib uns einen Stern auf
|
||||
githubRepository: IT-Tools GitHub-Repository
|
||||
p2: oder folge uns auf
|
||||
twitterAccount: IT-Tools Twitter-Konto
|
||||
thankYou: Vielen Dank!
|
||||
nav:
|
||||
github: GitHub-Repository
|
||||
githubRepository: IT-Tools GitHub-Repository
|
||||
twitter: Twitter-Konto
|
||||
twitterAccount: IT-Tools Twitter-Konto
|
||||
about: Über IT-Tools
|
||||
aboutLabel: Über
|
||||
darkMode: Dunkelmodus
|
||||
lightMode: Hellmodus
|
||||
mode: Wechseln zwischen dunklem/hellem Modus
|
||||
about:
|
||||
content: >
|
||||
# Über IT-Tools
|
||||
|
||||
Diese wunderbare Website, erstellt mit ❤ von [Corentin
|
||||
Thomasset](https://github.com/CorentinTh), sammelt nützliche Tools für
|
||||
Entwickler und Menschen, die in der IT arbeiten. Wenn du sie nützlich
|
||||
findest, teile sie gerne mit Personen, von denen du denkst, dass sie sie
|
||||
ebenfalls nützlich finden könnten, und vergiss nicht, sie in deiner
|
||||
Lesezeichenleiste zu speichern!
|
||||
|
||||
IT-Tools ist Open Source (unter der MIT-Lizenz) und kostenlos und wird es
|
||||
immer sein, aber es kostet mich Geld, die Website zu hosten und den
|
||||
Domainnamen zu erneuern. Wenn du meine Arbeit unterstützen möchtest und mich
|
||||
ermutigen möchtest, mehr Tools hinzuzufügen, überlege bitte, mich durch
|
||||
[Sponsoring](https://www.buymeacoffee.com/cthmsst) zu unterstützen.
|
||||
|
||||
## Technologien
|
||||
|
||||
IT-Tools wurde mit Vue.js (Vue 3) und der Naive UI-Komponentenbibliothek
|
||||
erstellt und wird von Vercel gehostet und kontinuierlich bereitgestellt. In
|
||||
einigen Tools werden Drittanbieter-Open-Source-Bibliotheken verwendet. Du
|
||||
findest die vollständige Liste in der
|
||||
[package.json](https://github.com/CorentinTh/it-tools/blob/main/package.json)-Datei
|
||||
des Repositorys.
|
||||
|
||||
## Einen Fehler gefunden? Ein Tool fehlt?
|
||||
|
||||
Wenn du ein Tool benötigst, das hier noch nicht vorhanden ist, und du
|
||||
denkst, dass es nützlich sein könnte, bist du herzlich eingeladen, einen
|
||||
Feature-Request im
|
||||
[Issues-Bereich](https://github.com/CorentinTh/it-tools/issues/new/choose)
|
||||
im GitHub-Repository einzureichen.
|
||||
|
||||
Und wenn du einen Fehler gefunden hast oder etwas nicht wie erwartet
|
||||
funktioniert, melde bitte einen Fehler im
|
||||
[Issues-Bereich](https://github.com/CorentinTh/it-tools/issues/new/choose)
|
||||
im GitHub-Repository.
|
||||
favoriteButton:
|
||||
remove: Aus Favoriten entfernen
|
||||
add: Zu Favoriten hinzufügen
|
||||
toolCard:
|
||||
new: Neu
|
||||
search:
|
||||
label: Suche
|
||||
tools:
|
||||
categories:
|
||||
favorite-tools: Deine Lieblingstools
|
||||
crypto: Krypto
|
||||
converter: Konverter
|
||||
web: Web
|
||||
images and videos: Bilder & Videos
|
||||
development: Entwicklung
|
||||
network: Netzwerk
|
||||
math: Mathematik
|
||||
measurement: Messung
|
||||
text: Text
|
||||
data: Daten
|
||||
password-strength-analyser:
|
||||
title: Passwortstärken-Analysator
|
||||
description: >-
|
||||
Ermittle die Stärke deines Passworts mit diesem Client-seitigen
|
||||
Passwortstärken-Analysator und Tool zur Schätzung der Knackzeit.
|
||||
chronometer:
|
||||
title: Chronometer
|
||||
description: >-
|
||||
Überwache die Dauer einer Sache. Im Grunde ein Chronometer mit einfachen
|
||||
Chronometerfunktionen.
|
||||
token-generator:
|
||||
title: Token-Generator
|
||||
description: >-
|
||||
Generiere eine zufällige Zeichenfolge mit den von dir gewünschten Zeichen,
|
||||
Groß- oder Kleinbuchstaben, Zahlen und/oder Symbolen.
|
||||
uppercase: Großbuchstaben (ABC...)
|
||||
lowercase: Kleinbuchstaben (abc...)
|
||||
numbers: Zahlen (123...)
|
||||
symbols: Symbole (!-;...)
|
||||
length: Länge
|
||||
tokenPlaceholder: Der Token ...
|
||||
copied: Token in die Zwischenablage kopiert
|
||||
button:
|
||||
copy: Kopieren
|
||||
refresh: Aktualisieren
|
||||
percentage-calculator:
|
||||
title: Prozentrechner
|
||||
description: >-
|
||||
Berechne einfach Prozentsätze von einem Wert zu einem anderen Wert oder
|
||||
von einem Prozentsatz zu einem Wert.
|
||||
svg-placeholder-generator:
|
||||
title: SVG-Platzhalter-Generator
|
||||
description: >-
|
||||
Generiere SVG-Bilder, die als Platzhalter in deinen Anwendungen verwendet
|
||||
werden können.
|
||||
json-to-csv:
|
||||
title: JSON zu CSV
|
||||
description: Konvertiere JSON mit automatischer Headererkennung in CSV.
|
||||
camera-recorder:
|
||||
title: Kamera-Rekorder
|
||||
description: Mache ein Foto oder nimm ein Video von deiner Webcam oder Kamera auf.
|
||||
keycode-info:
|
||||
title: Keycode-Info
|
||||
description: >-
|
||||
Finde den JavaScript-Keycode, den Code, den Standort und die Modifikatoren
|
||||
einer beliebigen gedrückten Taste.
|
||||
emoji-picker:
|
||||
title: Emoji-Picker
|
||||
description: >-
|
||||
Einfaches Kopieren und Einfügen von Emojis. Erhalte außerdem den Unicode-
|
||||
und Codepunkt-Wert jedes Emojis.
|
||||
color-converter:
|
||||
title: Farbkonverter
|
||||
description: >-
|
||||
Konvertiere Farben zwischen den verschiedenen Formaten (Hex, RGB, HSL und
|
||||
CSS-Name).
|
||||
bcrypt:
|
||||
title: Bcrypt
|
||||
description: >-
|
||||
Hashen und Vergleichen von Strings mit bcrypt. Bcrypt ist eine auf der
|
||||
Blowfish-Chiffre basierende Hash-Funktion.
|
||||
crontab-generator:
|
||||
title: Crontab-Generator
|
||||
description: >-
|
||||
Überprüfe und generiere Crontab und erhalte die menschenlesbare
|
||||
Beschreibung des Cron-Zeitplans.
|
||||
http-status-codes:
|
||||
title: HTTP-Statuscodes
|
||||
description: Liste aller HTTP-Statuscodes, ihrer Namen und ihrer Bedeutung.
|
||||
sql-prettify:
|
||||
title: SQL verschönern und formatieren
|
||||
description: >-
|
||||
Formatiere und verschönere deine SQL-Abfragen online (unterstützt
|
||||
verschiedene SQL-Dialekte).
|
||||
benchmark-builder:
|
||||
title: Benchmark-Builder
|
||||
description: >-
|
||||
Vergleiche ganz einfach die Ausführungszeit von Aufgaben mit diesem sehr
|
||||
einfachen Online-Benchmark-Builder.
|
||||
git-memo:
|
||||
title: Git-Spickzettel
|
||||
description: >-
|
||||
Git ist eine dezentrale Versionsverwaltungssoftware. Mit diesem
|
||||
Spickzettel hast du schnellen Zugriff auf die gängigsten Git-Befehle.
|
||||
slugify-string:
|
||||
title: Slugify String
|
||||
description: Mache einen String URL-, Dateinamen- und ID-sicher.
|
||||
encryption:
|
||||
title: Text verschlüsseln / entschlüsseln
|
||||
description: >-
|
||||
Verschlüssele und entschlüssele Klartext mithilfe von Kryptoalgorithmen
|
||||
wie AES, TripleDES, Rabbit oder RC4.
|
||||
random-port-generator:
|
||||
title: Zufälliger Port-Generator
|
||||
description: >-
|
||||
Generiere zufällige Portnummern außerhalb des Bereichs der "bekannten"
|
||||
Ports (0-1023).
|
||||
yaml-prettify:
|
||||
title: YAML verschönern und formatieren
|
||||
description: Verschönere deinen YAML-String in ein menschenlesbares Format.
|
||||
eta-calculator:
|
||||
title: ETA-Rechner
|
||||
description: >-
|
||||
Ein ETA (Estimated Time of Arrival)-Rechner, um die ungefähre Endzeit
|
||||
einer Aufgabe zu erfahren, z. B. den Zeitpunkt des Endes eines Downloads.
|
||||
roman-numeral-converter:
|
||||
title: Römische Zahlen Konverter
|
||||
description: >-
|
||||
Konvertiere römische Zahlen in Dezimalzahlen und Dezimalzahlen in römische
|
||||
Zahlen.
|
||||
hmac-generator:
|
||||
title: HMAC-Generator
|
||||
description: >-
|
||||
Berechnet einen hashbasierten Nachrichtenauthentifizierungscode (HMAC)
|
||||
unter Verwendung eines geheimen Schlüssels und deiner bevorzugten
|
||||
Hash-Funktion.
|
||||
bip39-generator:
|
||||
title: BIP39-Passphrasengenerator
|
||||
description: >-
|
||||
Generiere BIP39-Passphrasen aus vorhandener oder zufälliger Mnemonik oder
|
||||
erhalte die Mnemonik aus der Passphrase.
|
||||
base64-file-converter:
|
||||
title: Base64-Dateikonverter
|
||||
description: Konvertiere Strings, Dateien oder Bilder in ihre Base64-Repräsentation.
|
||||
list-converter:
|
||||
title: Listenkonverter
|
||||
description: >-
|
||||
Dieses Tool kann spaltenbasierte Daten verarbeiten und verschiedene
|
||||
Änderungen (transponieren, Präfix und Suffix hinzufügen, Liste umkehren,
|
||||
Liste sortieren, Werte in Kleinbuchstaben umwandeln, Werte abschneiden)
|
||||
auf jede Zeile anwenden.
|
||||
base64-string-converter:
|
||||
title: Base64-String-Encoder/Decoder
|
||||
description: Codiere und decodiere Strings einfach in ihre Base64-Repräsentation.
|
||||
toml-to-yaml:
|
||||
title: TOML zu YAML
|
||||
description: Parse und konvertiere TOML zu YAML.
|
||||
math-evaluator:
|
||||
title: Mathematischer Auswerter
|
||||
description: >-
|
||||
Ein Taschenrechner zum Auswerten mathematischer Ausdrücke. Du kannst
|
||||
Funktionen wie sqrt, cos, sin, abs usw. verwenden.
|
||||
json-to-yaml-converter:
|
||||
title: JSON zu YAML
|
||||
description: Konvertiere JSON einfach in YAML mit diesem Live-Online-Konverter.
|
||||
url-parser:
|
||||
title: URL-Parser
|
||||
description: >-
|
||||
Parse eine URL-Zeichenfolge, um alle verschiedenen Teile (Protokoll,
|
||||
Ursprung, Parameter, Port, Benutzername-Passwort usw.) zu erhalten.
|
||||
iban-validator-and-parser:
|
||||
title: IBAN-Validator und -Parser
|
||||
description: >-
|
||||
Validiere und parse IBAN-Nummern. Überprüfe, ob die IBAN gültig ist, und
|
||||
erhalte das Land, BBAN, ob es sich um eine QR-IBAN handelt und das
|
||||
IBAN-freundliche Format.
|
||||
user-agent-parser:
|
||||
title: User-Agent-Parser
|
||||
description: >-
|
||||
Erkenne und parse Browser, Engine, Betriebssystem, CPU und
|
||||
Gerätetyp/-modell aus einer User-Agent-Zeichenfolge.
|
||||
numeronym-generator:
|
||||
title: Numeronym-Generator
|
||||
description: >-
|
||||
Ein Numeronym ist ein Wort, bei dem eine Zahl verwendet wird, um eine
|
||||
Abkürzung zu bilden. Zum Beispiel ist "i18n" ein Numeronym für
|
||||
"internationalization", wobei 18 für die Anzahl der Buchstaben zwischen
|
||||
dem ersten "i" und dem letzten "n" im Wort steht.
|
||||
case-converter:
|
||||
title: Fall-Konverter
|
||||
description: >-
|
||||
Ändere den Fall eines Strings und wähle zwischen verschiedenen Formaten
|
||||
aus.
|
||||
html-entities:
|
||||
title: HTML-Entity-Escape
|
||||
description: >-
|
||||
Escape oder unescape HTML-Entitäten (ersetze <, >, &, " und ' durch ihre
|
||||
HTML-Version).
|
||||
json-prettify:
|
||||
title: JSON verschönern und formatieren
|
||||
description: Verschönere deinen JSON-String in ein menschenlesbares Format.
|
||||
docker-run-to-docker-compose-converter:
|
||||
title: Docker run zu Docker compose Konverter
|
||||
description: Wandle docker run-Befehle in docker-compose-Dateien um!
|
||||
mac-address-lookup:
|
||||
title: MAC-Adressensuche
|
||||
description: Finde den Anbieter und Hersteller eines Geräts anhand seiner MAC-Adresse.
|
||||
mime-types:
|
||||
title: MIME-Typen
|
||||
description: Konvertiere MIME-Typen in Erweiterungen und umgekehrt.
|
||||
toml-to-json:
|
||||
title: TOML zu JSON
|
||||
description: Parse und konvertiere TOML zu JSON.
|
||||
lorem-ipsum-generator:
|
||||
title: Lorem Ipsum Generator
|
||||
description: >-
|
||||
Lorem Ipsum ist ein Platzhaltertext, der häufig verwendet wird, um die
|
||||
visuelle Form eines Dokuments oder einer Schriftart ohne Verwendung von
|
||||
bedeutendem Inhalt zu demonstrieren.
|
||||
qrcode-generator:
|
||||
title: QR-Code-Generator
|
||||
description: >-
|
||||
Generiere und downloade QR-Codes für eine URL oder einfach einen Text und
|
||||
passe die Hintergrund- und Vordergrundfarben an.
|
||||
wifi-qrcode-generator:
|
||||
title: WLAN-QR-Code-Generator
|
||||
description: >-
|
||||
Generiere und lade QR-Codes für schnelle Verbindungen zu WLAN-Netzwerken
|
||||
herunter.
|
||||
xml-formatter:
|
||||
title: XML-Formatter
|
||||
description: Verschönere deinen XML-String in ein menschenlesbares Format.
|
||||
temperature-converter:
|
||||
title: Temperaturkonverter
|
||||
description: >-
|
||||
Temperaturgradumrechnungen für Kelvin, Celsius, Fahrenheit, Rankine,
|
||||
Delisle, Newton, Réaumur und Rømer.
|
||||
chmod-calculator:
|
||||
title: Chmod-Rechner
|
||||
description: >-
|
||||
Berechne deine Chmod-Berechtigungen und -Befehle mit diesem
|
||||
Online-Chmod-Rechner.
|
||||
rsa-key-pair-generator:
|
||||
title: RSA-Schlüsselpaar-Generator
|
||||
description: Generiere neue zufällige RSA-Private- und Public-Key-PEM-Zertifikate.
|
||||
html-wysiwyg-editor:
|
||||
title: HTML-WYSIWYG-Editor
|
||||
description: >-
|
||||
Online-HTML-Editor mit funktionsreichem WYSIWYG-Editor, erhalte sofort den
|
||||
Quellcode des Inhalts.
|
||||
yaml-to-toml:
|
||||
title: YAML zu TOML
|
||||
description: Parse und konvertiere YAML zu TOML.
|
||||
mac-address-generator:
|
||||
title: MAC-Adressen-Generator
|
||||
description: >-
|
||||
Gebe die Menge und das Präfix ein. MAC-Adressen werden in deiner gewählten
|
||||
Schreibweise (Groß- oder Kleinbuchstaben) generiert.
|
||||
json-diff:
|
||||
title: JSON-Unterschied
|
||||
description: Vergleiche zwei JSON-Objekte und erhalte die Unterschiede zwischen ihnen.
|
||||
jwt-parser:
|
||||
title: JWT-Parser
|
||||
description: >-
|
||||
Parse und decodiere deinen JSON-Web-Token (JWT) und zeige dessen Inhalt
|
||||
an.
|
||||
date-converter:
|
||||
title: Datum-Uhrzeit-Konverter
|
||||
description: Konvertiere Datum und Uhrzeit in verschiedene Formate.
|
||||
phone-parser-and-formatter:
|
||||
title: Telefonnummer-Parser und -Formatter
|
||||
description: >-
|
||||
Parse, validiere und formatiere Telefonnummern. Erhalte Informationen zur
|
||||
Telefonnummer, wie z. B. die Landesvorwahl, den Typ usw.
|
||||
ipv4-subnet-calculator:
|
||||
title: IPv4-Subnetzrechner
|
||||
description: >-
|
||||
Parse deine IPv4-CIDR-Blöcke und erhalte alle Informationen, die du über
|
||||
dein Subnetz benötigst.
|
||||
og-meta-generator:
|
||||
title: Open Graph Meta-Generator
|
||||
description: Generiere Open Graph- und Social-HTML-Metatags für deine Website.
|
||||
ipv6-ula-generator:
|
||||
title: IPv6-ULA-Generator
|
||||
description: >-
|
||||
Generiere deine eigenen lokalen, nicht routbaren IP-Adressen in deinem
|
||||
Netzwerk gemäß RFC4193.
|
||||
hash-text:
|
||||
title: Text hashen
|
||||
description: >-
|
||||
Hashe einen Text-String mit der von dir benötigten Funktion: MD5, SHA1,
|
||||
SHA256, SHA224, SHA512, SHA384, SHA3 oder RIPEMD160
|
||||
json-to-toml:
|
||||
title: JSON zu TOML
|
||||
description: Parse und konvertiere JSON zu TOML.
|
||||
device-information:
|
||||
title: Geräteinformationen
|
||||
description: >-
|
||||
Informationen zu deinem aktuellen Gerät (Bildschirmgröße, Pixelverhältnis,
|
||||
Benutzeragent, ...) erhalten.
|
||||
pdf-signature-checker:
|
||||
title: PDF-Signaturprüfer
|
||||
description: >-
|
||||
Überprüfe die Signaturen einer PDF-Datei. Eine signierte PDF-Datei enthält
|
||||
eine oder mehrere Signaturen, die verwendet werden können, um
|
||||
festzustellen, ob der Inhalt der Datei seit dem Zeitpunkt der Signierung
|
||||
geändert wurde.
|
||||
json-minify:
|
||||
title: JSON minifizieren
|
||||
description: >-
|
||||
Minifiziere und komprimiere dein JSON, indem unnötige Leerzeichen entfernt
|
||||
werden.
|
||||
ulid-generator:
|
||||
title: ULID-Generator
|
||||
description: >-
|
||||
Generiere zufällige Universally Unique Lexicographically Sortable
|
||||
Identifier (ULID).
|
||||
string-obfuscator:
|
||||
title: String-Verschleierer
|
||||
description: >-
|
||||
Verschleiere einen String (wie ein Secret, eine IBAN oder ein Token), um
|
||||
ihn weitergeben zu können und identifizierbar zu machen, ohne seinen
|
||||
Inhalt preiszugeben.
|
||||
base-converter:
|
||||
title: Ganzzahl-Basiskonverter
|
||||
description: >-
|
||||
Konvertiere Zahlen zwischen verschiedenen Basen (Dezimal, Hexadezimal,
|
||||
Binär, Oktal, Base64, ...).
|
||||
yaml-to-json-converter:
|
||||
title: YAML zu JSON
|
||||
description: Konvertiere YAML einfach in JSON mit diesem Live-Online-Konverter.
|
||||
uuid-generator:
|
||||
title: UUID-Generator
|
||||
description: >-
|
||||
Ein Universally Unique Identifier (UUID) ist eine 128-Bit-Nummer, die zur
|
||||
Identifizierung von Informationen in Computersystemen verwendet wird. Die
|
||||
Anzahl der möglichen UUIDs beträgt 16^32, was 2^128 oder etwa 3,4x10^38
|
||||
entspricht (was ziemlich viel ist!).
|
||||
ipv4-address-converter:
|
||||
title: IPv4-Adresskonverter
|
||||
description: >-
|
||||
Konvertiere eine IP-Adresse in Dezimal, Binär, Hexadezimal oder sogar in
|
||||
IPv6.
|
||||
text-statistics:
|
||||
title: Textstatistiken
|
||||
description: >-
|
||||
Informationen zu einem Text erhalten, wie die Anzahl der Zeichen, die
|
||||
Anzahl der Wörter, die Größe usw.
|
||||
text-to-nato-alphabet:
|
||||
title: Text zu NATO-Alphabet
|
||||
description: >-
|
||||
Wandle Text in das NATO-Phonetik-Alphabet für die mündliche Übermittlung
|
||||
um.
|
||||
basic-auth-generator:
|
||||
title: Basic-Auth-Generator
|
||||
description: >-
|
||||
Generiere einen Base64-Basic-Auth-Header aus einem Benutzernamen und einem
|
||||
Passwort.
|
||||
text-to-unicode:
|
||||
title: Text zu Unicode
|
||||
description: Parse und konvertiere Text in Unicode und umgekehrt.
|
||||
ipv4-range-expander:
|
||||
title: IPv4-Bereichserweiterer
|
||||
description: >-
|
||||
Bei Angabe einer Start- und End-IPv4-Adresse berechnet dieses Tool ein
|
||||
gültiges IPv4-Netzwerk mit seiner CIDR-Notation.
|
||||
text-diff:
|
||||
title: Textunterschied
|
||||
description: Vergleiche zwei Texte und sieh die Unterschiede zwischen ihnen.
|
||||
otp-generator:
|
||||
title: OTP-Code-Generator
|
||||
description: >-
|
||||
Generiere und validiere zeitbasierte OTPs (Einmalpasswörter) für
|
||||
Multi-Faktor-Authentifizierung.
|
||||
url-encoder:
|
||||
title: Kodieren/Decodieren von URL-formatierten Zeichenfolgen
|
||||
description: >-
|
||||
Kodiere zum URL-kodierten Format (auch als "prozentkodiert" bekannt) oder
|
||||
decodiere es.
|
||||
text-to-binary:
|
||||
title: Text zu ASCII-Binär
|
||||
description: Konvertiere Text in seine ASCII-Binärrepräsentation und umgekehrt.
|
||||
+45
-45
@@ -7,7 +7,7 @@ home:
|
||||
toggleMenu: 'Toggle menu'
|
||||
home: Home
|
||||
uiLib: 'UI Lib'
|
||||
support: 'Support IT Tools development'
|
||||
support: 'Support IT-Tools development'
|
||||
buyMeACoffee: 'Buy me a coffee'
|
||||
follow:
|
||||
title: 'You like it-tools?'
|
||||
@@ -15,7 +15,7 @@ home:
|
||||
githubRepository: 'IT-Tools GitHub repository'
|
||||
p2: 'or follow us on'
|
||||
twitterAccount: 'IT-Tools Twitter account'
|
||||
thankYou: 'Thank you !'
|
||||
thankYou: 'Thank you!'
|
||||
nav:
|
||||
github: 'GitHub repository'
|
||||
githubRepository: 'IT-Tools GitHub repository'
|
||||
@@ -72,7 +72,7 @@ tools:
|
||||
|
||||
password-strength-analyser:
|
||||
title: Password strength analyser
|
||||
description: Discover the strength of your password with this client side only password strength analyser and crack time estimation tool.
|
||||
description: Discover the strength of your password with this client-side-only password strength analyser and crack time estimation tool.
|
||||
|
||||
chronometer:
|
||||
title: Chronometer
|
||||
@@ -98,7 +98,7 @@ tools:
|
||||
|
||||
svg-placeholder-generator:
|
||||
title: SVG placeholder generator
|
||||
description: Generate svg images to use as placeholder in your applications.
|
||||
description: Generate svg images to use as a placeholder in your applications.
|
||||
|
||||
json-to-csv:
|
||||
title: JSON to CSV
|
||||
@@ -126,11 +126,11 @@ tools:
|
||||
|
||||
crontab-generator:
|
||||
title: Crontab generator
|
||||
description: Validate and generate crontab and get the human readable description of the cron schedule.
|
||||
description: Validate and generate crontab and get the human-readable description of the cron schedule.
|
||||
|
||||
http-status-codes:
|
||||
title: HTTP status codes
|
||||
description: The list of all HTTP status codes their name and their meaning.
|
||||
description: The list of all HTTP status codes, their name, and their meaning.
|
||||
|
||||
sql-prettify:
|
||||
title: SQL prettify and format
|
||||
@@ -142,7 +142,7 @@ tools:
|
||||
|
||||
git-memo:
|
||||
title: Git cheatsheet
|
||||
description: Git is a decentralized version management software. With this cheatsheet you will have a quick access to the most common git commands.
|
||||
description: Git is a decentralized version management software. With this cheatsheet, you will have quick access to the most common git commands.
|
||||
|
||||
slugify-string:
|
||||
title: Slugify string
|
||||
@@ -150,7 +150,7 @@ tools:
|
||||
|
||||
encryption:
|
||||
title: Encrypt / decrypt text
|
||||
description: Encrypt and decrypt text clear text using crypto algorithm like AES, TripleDES, Rabbit or RC4.
|
||||
description: Encrypt clear text and decrypt ciphertext using crypto algorithms like AES, TripleDES, Rabbit or RC4.
|
||||
|
||||
random-port-generator:
|
||||
title: Random port generator
|
||||
@@ -158,11 +158,11 @@ tools:
|
||||
|
||||
yaml-prettify:
|
||||
title: YAML prettify and format
|
||||
description: Prettify your YAML string to a human friendly readable format.
|
||||
description: Prettify your YAML string into a friendly, human-readable format.
|
||||
|
||||
eta-calculator:
|
||||
title: ETA calculator
|
||||
description: An ETA (Estimated Time of Arrival) calculator to know the approximate end time of a task, for example the moment of ending of a download.
|
||||
description: An ETA (Estimated Time of Arrival) calculator to determine the approximate end time of a task, for example, the end time and duration of a file download.
|
||||
|
||||
roman-numeral-converter:
|
||||
title: Roman numeral converter
|
||||
@@ -174,11 +174,11 @@ tools:
|
||||
|
||||
bip39-generator:
|
||||
title: BIP39 passphrase generator
|
||||
description: Generate BIP39 passphrase from existing or random mnemonic, or get the mnemonic from the passphrase.
|
||||
description: Generate a BIP39 passphrase from an existing or random mnemonic, or get the mnemonic from the passphrase.
|
||||
|
||||
base64-file-converter:
|
||||
title: Base64 file converter
|
||||
description: Convert string, files or images into a it\'s base64 representation.
|
||||
description: Convert a string, file, or image into its base64 representation.
|
||||
|
||||
list-converter:
|
||||
title: List converter
|
||||
@@ -186,7 +186,7 @@ tools:
|
||||
|
||||
base64-string-converter:
|
||||
title: Base64 string encoder/decoder
|
||||
description: Simply encode and decode string into a their base64 representation.
|
||||
description: Simply encode and decode strings into their base64 representation.
|
||||
|
||||
toml-to-yaml:
|
||||
title: TOML to YAML
|
||||
@@ -198,15 +198,15 @@ tools:
|
||||
|
||||
json-to-yaml-converter:
|
||||
title: JSON to YAML converter
|
||||
description: Simply convert JSON to YAML with this live online converter.
|
||||
description: Simply convert JSON to YAML with this online live converter.
|
||||
|
||||
url-parser:
|
||||
title: Url parser
|
||||
description: Parse an url string to get all the different parts (protocol, origin, params, port, username-password, ...)
|
||||
title: URL parser
|
||||
description: Parse a URL into its separate constituent parts (protocol, origin, params, port, username-password, ...)
|
||||
|
||||
iban-validator-and-parser:
|
||||
title: IBAN validator and parser
|
||||
description: Validate and parse IBAN numbers. Check if IBAN is valid and get the country, BBAN, if it is a QR-IBAN and the IBAN friendly format.
|
||||
description: Validate and parse IBAN numbers. Check if an IBAN is valid and get the country, BBAN, if it is a QR-IBAN and the IBAN friendly format.
|
||||
|
||||
user-agent-parser:
|
||||
title: User-agent parser
|
||||
@@ -218,27 +218,27 @@ tools:
|
||||
|
||||
case-converter:
|
||||
title: Case converter
|
||||
description: Change the case of a string and chose between different formats
|
||||
description: Transform the case of a string and choose between different formats
|
||||
|
||||
html-entities:
|
||||
title: Escape html entities
|
||||
description: Escape or unescape html entities (replace <,>, &, " and \' to their html version)
|
||||
title: Escape HTML entities
|
||||
description: Escape or unescape HTML entities (replace characters like <,>, &, " and \' with their HTML version)
|
||||
|
||||
json-prettify:
|
||||
title: JSON prettify and format
|
||||
description: Prettify your JSON string to a human friendly readable format.
|
||||
description: Prettify your JSON string into a friendly, human-readable format.
|
||||
|
||||
docker-run-to-docker-compose-converter:
|
||||
title: Docker run to Docker compose converter
|
||||
description: Turns docker run commands into docker-compose files!
|
||||
description: Transforms "docker run" commands into docker-compose files!
|
||||
|
||||
mac-address-lookup:
|
||||
title: MAC address lookup
|
||||
description: Find the vendor and manufacturer of a device by its MAC address.
|
||||
|
||||
mime-types:
|
||||
title: Mime types
|
||||
description: Convert mime types to extensions and vice-versa.
|
||||
title: MIME types
|
||||
description: Convert MIME types to file extensions and vice-versa.
|
||||
|
||||
toml-to-json:
|
||||
title: TOML to JSON
|
||||
@@ -250,19 +250,19 @@ tools:
|
||||
|
||||
qrcode-generator:
|
||||
title: QR Code generator
|
||||
description: Generate and download QR-code for an url or just a text and customize the background and foreground colors.
|
||||
description: Generate and download a QR code for a URL (or just plain text), and customize the background and foreground colors.
|
||||
|
||||
wifi-qrcode-generator:
|
||||
title: WiFi QR Code generator
|
||||
description: Generate and download QR-codes for quick connections to WiFi networks.
|
||||
description: Generate and download QR codes for quick connections to WiFi networks.
|
||||
|
||||
xml-formatter:
|
||||
title: XML formatter
|
||||
description: Prettify your XML string to a human friendly readable format.
|
||||
description: Prettify your XML string into a friendly, human-readable format.
|
||||
|
||||
temperature-converter:
|
||||
title: Temperature converter
|
||||
description: Temperature degrees conversions for Kelvin, Celsius, Fahrenheit, Rankine, Delisle, Newton, Réaumur and Rømer.
|
||||
description: Degrees temperature conversions for Kelvin, Celsius, Fahrenheit, Rankine, Delisle, Newton, Réaumur, and Rømer.
|
||||
|
||||
chmod-calculator:
|
||||
title: Chmod calculator
|
||||
@@ -270,11 +270,11 @@ tools:
|
||||
|
||||
rsa-key-pair-generator:
|
||||
title: RSA key pair generator
|
||||
description: Generate new random RSA private and public key pem certificates.
|
||||
description: Generate a new random RSA private and public pem certificate key pair.
|
||||
|
||||
html-wysiwyg-editor:
|
||||
title: HTML WYSIWYG editor
|
||||
description: Online HTML editor with feature-rich WYSIWYG editor, get the source code of the content immediately.
|
||||
description: Online, feature-rich WYSIWYG HTML editor which generates the source code of the content immediately.
|
||||
|
||||
yaml-to-toml:
|
||||
title: YAML to TOML
|
||||
@@ -302,15 +302,15 @@ tools:
|
||||
|
||||
ipv4-subnet-calculator:
|
||||
title: IPv4 subnet calculator
|
||||
description: Parse your IPv4 CIDR blocks and get all the info you need about your sub network.
|
||||
description: Parse your IPv4 CIDR blocks and get all the info you need about your subnet.
|
||||
|
||||
og-meta-generator:
|
||||
title: Open graph meta generator
|
||||
description: Generate open-graph and socials html meta tags for your website.
|
||||
description: Generate open-graph and socials HTML meta tags for your website.
|
||||
|
||||
ipv6-ula-generator:
|
||||
title: IPv6 ULA generator
|
||||
description: Generate your own local, non-routable IP addresses on your network according to RFC4193.
|
||||
description: Generate your own local, non-routable IP addresses for your network according to RFC4193.
|
||||
|
||||
hash-text:
|
||||
title: Hash text
|
||||
@@ -330,7 +330,7 @@ tools:
|
||||
|
||||
json-minify:
|
||||
title: JSON minify
|
||||
description: Minify and compress your JSON by removing unnecessary white spaces.
|
||||
description: Minify and compress your JSON by removing unnecessary whitespace.
|
||||
|
||||
ulid-generator:
|
||||
title: ULID generator
|
||||
@@ -342,31 +342,31 @@ tools:
|
||||
|
||||
base-converter:
|
||||
title: Integer base converter
|
||||
description: Convert number between different bases (decimal, hexadecimal, binary, octal, base64, ...)
|
||||
description: Convert a number between different bases (decimal, hexadecimal, binary, octal, base64, ...)
|
||||
|
||||
yaml-to-json-converter:
|
||||
title: YAML to JSON converter
|
||||
description: Simply convert YAML to JSON with this live online converter.
|
||||
description: Simply convert YAML to JSON with this online live converter.
|
||||
|
||||
uuid-generator:
|
||||
title: UUIDs generator
|
||||
description: A Universally Unique Identifier (UUID) is a 128-bit number used to identify information in computer systems. The number of possible UUIDs is 16^32, which is 2^128 or about 3.4x10^38 (which is a lot!).
|
||||
|
||||
ipv4-address-converter:
|
||||
title: Ipv4 address converter
|
||||
description: Convert an ip address into decimal, binary, hexadecimal or event in ipv6
|
||||
title: IPv4 address converter
|
||||
description: Convert an IP address into decimal, binary, hexadecimal, or even an IPv6 representation of it.
|
||||
|
||||
text-statistics:
|
||||
title: Text statistics
|
||||
description: Get information about a text, the amount of characters, the amount of words, it\'s size, ...
|
||||
description: Get information about a text, the number of characters, the number of words, its size in bytes, ...
|
||||
|
||||
text-to-nato-alphabet:
|
||||
title: Text to NATO alphabet
|
||||
description: Transform text into NATO phonetic alphabet for oral transmission.
|
||||
description: Transform text into the NATO phonetic alphabet for oral transmission.
|
||||
|
||||
basic-auth-generator:
|
||||
title: Basic auth generator
|
||||
description: Generate a base64 basic auth header from an username and a password.
|
||||
description: Generate a base64 basic auth header from a username and password.
|
||||
|
||||
text-to-unicode:
|
||||
title: Text to Unicode
|
||||
@@ -374,7 +374,7 @@ tools:
|
||||
|
||||
ipv4-range-expander:
|
||||
title: IPv4 range expander
|
||||
description: Given a start and an end IPv4 address this tool calculates a valid IPv4 network with its CIDR notation.
|
||||
description: Given a start and an end IPv4 address, this tool calculates a valid IPv4 subnet along with its CIDR notation.
|
||||
|
||||
text-diff:
|
||||
title: Text diff
|
||||
@@ -385,9 +385,9 @@ tools:
|
||||
description: Generate and validate time-based OTP (one time password) for multi-factor authentication.
|
||||
|
||||
url-encoder:
|
||||
title: Encode/decode url formatted strings
|
||||
description: Encode to url-encoded format (also known as "percent-encoded") or decode from it.
|
||||
title: Encode/decode URL-formatted strings
|
||||
description: Encode text to URL-encoded format (also known as "percent-encoded"), or decode from it.
|
||||
|
||||
text-to-binary:
|
||||
title: Text to ASCII binary
|
||||
description: Convert text to its ASCII binary representation and vice versa.
|
||||
description: Convert text to its ASCII binary representation and vice-versa.
|
||||
+1
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "it-tools",
|
||||
"version": "2023.12.21-5ed3693",
|
||||
"version": "2024.5.13-a0bc346",
|
||||
"description": "Collection of handy online tools for developers, with great UX. ",
|
||||
"keywords": [
|
||||
"productivity",
|
||||
@@ -42,7 +42,6 @@
|
||||
"@tiptap/starter-kit": "2.1.6",
|
||||
"@tiptap/vue-3": "2.0.3",
|
||||
"@types/figlet": "^1.5.8",
|
||||
"@types/emscripten": "^1.39.10",
|
||||
"@vicons/material": "^0.12.0",
|
||||
"@vicons/tabler": "^0.12.0",
|
||||
"@vueuse/core": "^10.3.0",
|
||||
|
||||
@@ -9,7 +9,7 @@ const useWebServer = process.env.NO_WEB_SERVER !== 'true';
|
||||
*/
|
||||
export default defineConfig({
|
||||
testDir: './src',
|
||||
testMatch: /.*\.e2e\.(spec\.)?ts/,
|
||||
testMatch: /\.e2e\.(spec\.)?ts$/,
|
||||
/* Run tests in files in parallel */
|
||||
fullyParallel: true,
|
||||
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
||||
@@ -57,7 +57,7 @@ export default defineConfig({
|
||||
&& {
|
||||
webServer: {
|
||||
command: 'npm run preview',
|
||||
url: 'http://127.0.0.1:5050',
|
||||
url: 'http://localhost:5050',
|
||||
reuseExistingServer: !isCI,
|
||||
},
|
||||
}
|
||||
|
||||
Generated
+166
-28
@@ -37,7 +37,7 @@ dependencies:
|
||||
version: 10.3.0(vue@3.3.4)
|
||||
'@vueuse/head':
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0(vue@3.3.4)
|
||||
version: 1.0.0(typescript@5.2.2)(vue@3.3.4)
|
||||
'@vueuse/router':
|
||||
specifier: ^10.0.0
|
||||
version: 10.0.0(vue-router@4.1.6)(vue@3.3.4)
|
||||
@@ -808,6 +808,11 @@ packages:
|
||||
resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
||||
/@babel/helper-string-parser@7.25.9:
|
||||
resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dev: false
|
||||
|
||||
/@babel/helper-validator-identifier@7.22.20:
|
||||
resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
@@ -816,6 +821,11 @@ packages:
|
||||
resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
||||
/@babel/helper-validator-identifier@7.25.9:
|
||||
resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dev: false
|
||||
|
||||
/@babel/helper-validator-option@7.22.15:
|
||||
resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
@@ -908,6 +918,14 @@ packages:
|
||||
dependencies:
|
||||
'@babel/types': 7.23.0
|
||||
|
||||
/@babel/parser@7.26.9:
|
||||
resolution: {integrity: sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@babel/types': 7.26.9
|
||||
dev: false
|
||||
|
||||
/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.15(@babel/core@7.23.2):
|
||||
resolution: {integrity: sha512-FB9iYlz7rURmRJyXRKEnalYPPdn87H5no108cyuQQyMwlpJ2SJtpIUBI27kdTin956pz+LPypkPVPUTlxOmrsg==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
@@ -1895,6 +1913,14 @@ packages:
|
||||
'@babel/helper-validator-identifier': 7.22.20
|
||||
to-fast-properties: 2.0.0
|
||||
|
||||
/@babel/types@7.26.9:
|
||||
resolution: {integrity: sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dependencies:
|
||||
'@babel/helper-string-parser': 7.25.9
|
||||
'@babel/helper-validator-identifier': 7.25.9
|
||||
dev: false
|
||||
|
||||
/@css-render/plugin-bem@0.15.12(css-render@0.15.12):
|
||||
resolution: {integrity: sha512-Lq2jSOZn+wYQtsyaFj6QRz2EzAnd3iW5fZeHO1WSXQdVYwvwGX0ZiH3X2JQgtgYLT1yeGtrwrqJdNdMEUD2xTw==}
|
||||
peerDependencies:
|
||||
@@ -2333,6 +2359,10 @@ packages:
|
||||
/@jridgewell/sourcemap-codec@1.4.15:
|
||||
resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
|
||||
|
||||
/@jridgewell/sourcemap-codec@1.5.0:
|
||||
resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==}
|
||||
dev: false
|
||||
|
||||
/@jridgewell/trace-mapping@0.3.18:
|
||||
resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==}
|
||||
dependencies:
|
||||
@@ -3344,18 +3374,18 @@ packages:
|
||||
'@unhead/schema': 0.5.1
|
||||
dev: false
|
||||
|
||||
/@unhead/vue@0.5.1(vue@3.3.4):
|
||||
/@unhead/vue@0.5.1(typescript@5.2.2)(vue@3.3.4):
|
||||
resolution: {integrity: sha512-s4y4uj3NMqaUs0K+WQXbWGj/2+Glk/DEJ9yeJOcJIiro/+IhUMByD71jyCM43Xn8YBPy14VY/ZYb9ZFU2WCZgw==}
|
||||
peerDependencies:
|
||||
vue: '>=2.7 || >=3'
|
||||
dependencies:
|
||||
'@unhead/dom': 0.5.1
|
||||
'@unhead/schema': 0.5.1
|
||||
'@vueuse/shared': 10.7.2(vue@3.3.4)
|
||||
'@vueuse/shared': 12.8.2(typescript@5.2.2)
|
||||
unhead: 0.5.1
|
||||
vue: 3.3.4
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
/@unocss/astro@0.57.1(rollup@2.79.1)(vite@4.4.9):
|
||||
@@ -3744,6 +3774,16 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@vue/compiler-core@3.5.13:
|
||||
resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==}
|
||||
dependencies:
|
||||
'@babel/parser': 7.26.9
|
||||
'@vue/shared': 3.5.13
|
||||
entities: 4.5.0
|
||||
estree-walker: 2.0.2
|
||||
source-map-js: 1.2.1
|
||||
dev: false
|
||||
|
||||
/@vue/compiler-dom@3.2.47:
|
||||
resolution: {integrity: sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ==}
|
||||
dependencies:
|
||||
@@ -3765,6 +3805,13 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@vue/compiler-dom@3.5.13:
|
||||
resolution: {integrity: sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==}
|
||||
dependencies:
|
||||
'@vue/compiler-core': 3.5.13
|
||||
'@vue/shared': 3.5.13
|
||||
dev: false
|
||||
|
||||
/@vue/compiler-sfc@3.2.47:
|
||||
resolution: {integrity: sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==}
|
||||
dependencies:
|
||||
@@ -3794,6 +3841,20 @@ packages:
|
||||
postcss: 8.4.28
|
||||
source-map-js: 1.0.2
|
||||
|
||||
/@vue/compiler-sfc@3.5.13:
|
||||
resolution: {integrity: sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==}
|
||||
dependencies:
|
||||
'@babel/parser': 7.26.9
|
||||
'@vue/compiler-core': 3.5.13
|
||||
'@vue/compiler-dom': 3.5.13
|
||||
'@vue/compiler-ssr': 3.5.13
|
||||
'@vue/shared': 3.5.13
|
||||
estree-walker: 2.0.2
|
||||
magic-string: 0.30.17
|
||||
postcss: 8.5.3
|
||||
source-map-js: 1.2.1
|
||||
dev: false
|
||||
|
||||
/@vue/compiler-ssr@3.2.47:
|
||||
resolution: {integrity: sha512-wVXC+gszhulcMD8wpxMsqSOpvDZ6xKXSVWkf50Guf/S+28hTAXPDYRTbLQ3EDkOP5Xz/+SY37YiwDquKbJOgZw==}
|
||||
dependencies:
|
||||
@@ -3816,6 +3877,13 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@vue/compiler-ssr@3.5.13:
|
||||
resolution: {integrity: sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==}
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.5.13
|
||||
'@vue/shared': 3.5.13
|
||||
dev: false
|
||||
|
||||
/@vue/devtools-api@6.5.0:
|
||||
resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==}
|
||||
|
||||
@@ -3862,12 +3930,25 @@ packages:
|
||||
dependencies:
|
||||
'@vue/shared': 3.3.4
|
||||
|
||||
/@vue/reactivity@3.5.13:
|
||||
resolution: {integrity: sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==}
|
||||
dependencies:
|
||||
'@vue/shared': 3.5.13
|
||||
dev: false
|
||||
|
||||
/@vue/runtime-core@3.3.4:
|
||||
resolution: {integrity: sha512-R+bqxMN6pWO7zGI4OMlmvePOdP2c93GsHFM/siJI7O2nxFRzj55pLwkpCedEY+bTMgp5miZ8CxfIZo3S+gFqvA==}
|
||||
dependencies:
|
||||
'@vue/reactivity': 3.3.4
|
||||
'@vue/shared': 3.3.4
|
||||
|
||||
/@vue/runtime-core@3.5.13:
|
||||
resolution: {integrity: sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==}
|
||||
dependencies:
|
||||
'@vue/reactivity': 3.5.13
|
||||
'@vue/shared': 3.5.13
|
||||
dev: false
|
||||
|
||||
/@vue/runtime-dom@3.3.4:
|
||||
resolution: {integrity: sha512-Aj5bTJ3u5sFsUckRghsNjVTtxZQ1OyMWCr5dZRAPijF/0Vy4xEoRCwLyHXcj4D0UFbJ4lbx3gPTgg06K/GnPnQ==}
|
||||
dependencies:
|
||||
@@ -3875,6 +3956,15 @@ packages:
|
||||
'@vue/shared': 3.3.4
|
||||
csstype: 3.1.2
|
||||
|
||||
/@vue/runtime-dom@3.5.13:
|
||||
resolution: {integrity: sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==}
|
||||
dependencies:
|
||||
'@vue/reactivity': 3.5.13
|
||||
'@vue/runtime-core': 3.5.13
|
||||
'@vue/shared': 3.5.13
|
||||
csstype: 3.1.3
|
||||
dev: false
|
||||
|
||||
/@vue/server-renderer@3.3.4(vue@3.3.4):
|
||||
resolution: {integrity: sha512-Q6jDDzR23ViIb67v+vM1Dqntu+HUexQcsWKhhQa4ARVzxOY2HbC7QRW/ggkDBd5BU+uM1sV6XOAP0b216o34JQ==}
|
||||
peerDependencies:
|
||||
@@ -3895,6 +3985,16 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@vue/server-renderer@3.5.13(vue@3.5.13):
|
||||
resolution: {integrity: sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==}
|
||||
peerDependencies:
|
||||
vue: 3.5.13
|
||||
dependencies:
|
||||
'@vue/compiler-ssr': 3.5.13
|
||||
'@vue/shared': 3.5.13
|
||||
vue: 3.5.13(typescript@5.2.2)
|
||||
dev: false
|
||||
|
||||
/@vue/shared@3.2.47:
|
||||
resolution: {integrity: sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==}
|
||||
dev: true
|
||||
@@ -3908,6 +4008,10 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@vue/shared@3.5.13:
|
||||
resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==}
|
||||
dev: false
|
||||
|
||||
/@vue/test-utils@2.3.2(vue@3.3.4):
|
||||
resolution: {integrity: sha512-hJnVaYhbrIm0yBS0+e1Y0Sj85cMyAi+PAbK4JHqMRUZ6S622Goa+G7QzkRSyvCteG8wop7tipuEbHoZo26wsSA==}
|
||||
peerDependencies:
|
||||
@@ -3945,17 +4049,17 @@ packages:
|
||||
- vue
|
||||
dev: false
|
||||
|
||||
/@vueuse/head@1.0.0(vue@3.3.4):
|
||||
/@vueuse/head@1.0.0(typescript@5.2.2)(vue@3.3.4):
|
||||
resolution: {integrity: sha512-wighjD6iLxEitpg6EDeS5dGDB9tcOSMhpblrAOKR6qBP93U3cjG72n0LhlBUD9miu41lNxXFVGHgSc6BVJ9BMg==}
|
||||
peerDependencies:
|
||||
vue: '>=2.7 || >=3'
|
||||
dependencies:
|
||||
'@unhead/schema': 0.5.1
|
||||
'@unhead/ssr': 0.5.1
|
||||
'@unhead/vue': 0.5.1(vue@3.3.4)
|
||||
'@unhead/vue': 0.5.1(typescript@5.2.2)(vue@3.3.4)
|
||||
vue: 3.3.4
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
/@vueuse/metadata@10.3.0:
|
||||
@@ -3993,13 +4097,12 @@ packages:
|
||||
- vue
|
||||
dev: false
|
||||
|
||||
/@vueuse/shared@10.7.2(vue@3.3.4):
|
||||
resolution: {integrity: sha512-qFbXoxS44pi2FkgFjPvF4h7c9oMDutpyBdcJdMYIMg9XyXli2meFMuaKn+UMgsClo//Th6+beeCgqweT/79BVA==}
|
||||
/@vueuse/shared@12.8.2(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-dznP38YzxZoNloI0qpEfpkms8knDtaoQ6Y/sfS0L7Yki4zh40LFHEhur0odJC6xTHG5dxWVPiUWBXn+wCG2s5w==}
|
||||
dependencies:
|
||||
vue-demi: 0.14.6(vue@3.3.4)
|
||||
vue: 3.5.13(typescript@5.2.2)
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
/@zhead/schema@1.0.0-beta.13:
|
||||
@@ -4712,6 +4815,10 @@ packages:
|
||||
/csstype@3.1.2:
|
||||
resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==}
|
||||
|
||||
/csstype@3.1.3:
|
||||
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
|
||||
dev: false
|
||||
|
||||
/dash-get@1.0.2:
|
||||
resolution: {integrity: sha512-4FbVrHDwfOASx7uQVxeiCTo7ggSdYZbqs8lH+WU6ViypPlDbe9y6IP5VVUDQBv9DcnyaiPT5XT0UWHgJ64zLeQ==}
|
||||
dev: false
|
||||
@@ -5001,7 +5108,6 @@ packages:
|
||||
/entities@4.5.0:
|
||||
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
|
||||
engines: {node: '>=0.12'}
|
||||
dev: true
|
||||
|
||||
/errno@0.1.8:
|
||||
resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==}
|
||||
@@ -6765,6 +6871,12 @@ packages:
|
||||
dependencies:
|
||||
'@jridgewell/sourcemap-codec': 1.4.15
|
||||
|
||||
/magic-string@0.30.17:
|
||||
resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==}
|
||||
dependencies:
|
||||
'@jridgewell/sourcemap-codec': 1.5.0
|
||||
dev: false
|
||||
|
||||
/magic-string@0.30.2:
|
||||
resolution: {integrity: sha512-lNZdu7pewtq/ZvWUp9Wpf/x7WzMTsR26TWV03BRZrXFsv+BI6dy8RAiKgm1uM/kyR0rCfUcqvOlXKG66KhIGug==}
|
||||
engines: {node: '>=12'}
|
||||
@@ -6998,6 +7110,12 @@ packages:
|
||||
resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==}
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
|
||||
/nanoid@3.3.9:
|
||||
resolution: {integrity: sha512-SppoicMGpZvbF1l3z4x7No3OlIjP7QJvC9XR7AhZr1kL133KHnKPztkKDc+Ir4aJ/1VhTySrtKhrsycmrMQfvg==}
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
hasBin: true
|
||||
dev: false
|
||||
|
||||
/natural-compare@1.4.0:
|
||||
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
|
||||
dev: true
|
||||
@@ -7373,6 +7491,10 @@ packages:
|
||||
/picocolors@1.0.0:
|
||||
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
|
||||
|
||||
/picocolors@1.1.1:
|
||||
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
|
||||
dev: false
|
||||
|
||||
/picomatch@2.3.1:
|
||||
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
|
||||
engines: {node: '>=8.6'}
|
||||
@@ -7463,6 +7585,15 @@ packages:
|
||||
source-map-js: 1.0.2
|
||||
dev: true
|
||||
|
||||
/postcss@8.5.3:
|
||||
resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==}
|
||||
engines: {node: ^10 || ^12 || >=14}
|
||||
dependencies:
|
||||
nanoid: 3.3.9
|
||||
picocolors: 1.1.1
|
||||
source-map-js: 1.2.1
|
||||
dev: false
|
||||
|
||||
/prelude-ls@1.2.1:
|
||||
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
@@ -8125,6 +8256,11 @@ packages:
|
||||
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
/source-map-js@1.2.1:
|
||||
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: false
|
||||
|
||||
/source-map-support@0.5.21:
|
||||
resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==}
|
||||
dependencies:
|
||||
@@ -9151,21 +9287,6 @@ packages:
|
||||
vue: 3.3.4
|
||||
dev: false
|
||||
|
||||
/vue-demi@0.14.6(vue@3.3.4):
|
||||
resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==}
|
||||
engines: {node: '>=12'}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
peerDependencies:
|
||||
'@vue/composition-api': ^1.0.0-rc.1
|
||||
vue: ^3.0.0-0 || ^2.6.0
|
||||
peerDependenciesMeta:
|
||||
'@vue/composition-api':
|
||||
optional: true
|
||||
dependencies:
|
||||
vue: 3.3.4
|
||||
dev: false
|
||||
|
||||
/vue-eslint-parser@9.3.1(eslint@8.47.0):
|
||||
resolution: {integrity: sha512-Clr85iD2XFZ3lJ52/ppmUDG/spxQu6+MAeHXjjyI4I1NUYZ9xmenQp4N0oaHJhrA8OOxltCVxMRfANGa70vU0g==}
|
||||
engines: {node: ^14.17.0 || >=16.0.0}
|
||||
@@ -9232,6 +9353,22 @@ packages:
|
||||
'@vue/server-renderer': 3.3.4(vue@3.3.4)
|
||||
'@vue/shared': 3.3.4
|
||||
|
||||
/vue@3.5.13(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==}
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.5.13
|
||||
'@vue/compiler-sfc': 3.5.13
|
||||
'@vue/runtime-dom': 3.5.13
|
||||
'@vue/server-renderer': 3.5.13(vue@3.5.13)
|
||||
'@vue/shared': 3.5.13
|
||||
typescript: 5.2.2
|
||||
dev: false
|
||||
|
||||
/vueuc@0.4.51(vue@3.3.4):
|
||||
resolution: {integrity: sha512-pLiMChM4f+W8czlIClGvGBYo656lc2Y0/mXFSCydcSmnCR1izlKPGMgiYBGjbY9FDkFG8a2HEVz7t0DNzBWbDw==}
|
||||
peerDependencies:
|
||||
@@ -9442,6 +9579,7 @@ packages:
|
||||
|
||||
/workbox-google-analytics@7.0.0:
|
||||
resolution: {integrity: sha512-MEYM1JTn/qiC3DbpvP2BVhyIH+dV/5BjHk756u9VbwuAhu0QHyKscTnisQuz21lfRpOwiS9z4XdqeVAKol0bzg==}
|
||||
deprecated: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained
|
||||
dependencies:
|
||||
workbox-background-sync: 7.0.0
|
||||
workbox-core: 7.0.0
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,8 @@
|
||||
import { useRouteQuery } from '@vueuse/router';
|
||||
import { computed } from 'vue';
|
||||
import { useStorage } from '@vueuse/core';
|
||||
|
||||
export { useQueryParam };
|
||||
export { useQueryParam, useQueryParamOrStorage };
|
||||
|
||||
const transformers = {
|
||||
number: {
|
||||
@@ -16,6 +17,12 @@ const transformers = {
|
||||
fromQuery: (value: string) => value.toLowerCase() === 'true',
|
||||
toQuery: (value: boolean) => (value ? 'true' : 'false'),
|
||||
},
|
||||
object: {
|
||||
fromQuery: (value: string) => {
|
||||
return JSON.parse(value);
|
||||
},
|
||||
toQuery: (value: object) => JSON.stringify(value),
|
||||
},
|
||||
};
|
||||
|
||||
function useQueryParam<T>({ name, defaultValue }: { name: string; defaultValue: T }) {
|
||||
@@ -33,3 +40,27 @@ function useQueryParam<T>({ name, defaultValue }: { name: string; defaultValue:
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function useQueryParamOrStorage<T>({ name, storageName, defaultValue }: { name: string; storageName: string; defaultValue: T }) {
|
||||
const type = typeof defaultValue;
|
||||
const transformer = transformers[type as keyof typeof transformers] ?? transformers.string;
|
||||
|
||||
const storageRef = useStorage(storageName, defaultValue);
|
||||
const proxyDefaultValue = transformer.toQuery(defaultValue as never);
|
||||
const proxy = useRouteQuery(name, proxyDefaultValue);
|
||||
|
||||
const r = ref(defaultValue);
|
||||
|
||||
watch(r,
|
||||
(value) => {
|
||||
proxy.value = transformer.toQuery(value as never);
|
||||
storageRef.value = value as never;
|
||||
},
|
||||
{ deep: true });
|
||||
|
||||
r.value = (proxy.value && proxy.value !== proxyDefaultValue
|
||||
? transformer.fromQuery(proxy.value) as unknown as T
|
||||
: storageRef.value as T) as never;
|
||||
|
||||
return r;
|
||||
}
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
const createModule: EmscriptenModuleFactory;
|
||||
export default createModule;
|
||||
@@ -1,127 +0,0 @@
|
||||
|
||||
var Module = (() => {
|
||||
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
|
||||
if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
|
||||
return (
|
||||
function(Module) {
|
||||
Module = Module || {};
|
||||
|
||||
|
||||
var d;d||(d=typeof Module !== 'undefined' ? Module : {});var aa,ba;d.ready=new Promise(function(a,b){aa=a;ba=b});d.noInitialRun=!0;var ca=Object.assign({},d),da=[],ea="./this.program",fa=(a,b)=>{throw b;},ha="object"==typeof window,m="function"==typeof importScripts,ia="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,q="",ja,ka,la,fs,t,ma;
|
||||
if(ia)q=m?require("path").dirname(q)+"/":__dirname+"/",ma=()=>{t||(fs=require("fs"),t=require("path"))},ja=function(a,b){ma();a=t.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")},la=a=>{a=ja(a,!0);a.buffer||(a=new Uint8Array(a));return a},ka=(a,b,c)=>{ma();a=t.normalize(a);fs.readFile(a,function(e,f){e?c(e):b(f.buffer)})},1<process.argv.length&&(ea=process.argv[1].replace(/\\/g,"/")),da=process.argv.slice(2),process.on("uncaughtException",function(a){if(!(a instanceof na))throw a;}),process.on("unhandledRejection",
|
||||
function(a){throw a;}),fa=(a,b)=>{if(noExitRuntime)throw process.exitCode=a,b;b instanceof na||v("exiting due to exception: "+b);process.exit(a)},d.inspect=function(){return"[Emscripten Module object]"};else if(ha||m)m?q=self.location.href:"undefined"!=typeof document&&document.currentScript&&(q=document.currentScript.src),_scriptDir&&(q=_scriptDir),0!==q.indexOf("blob:")?q=q.substr(0,q.replace(/[?#].*/,"").lastIndexOf("/")+1):q="",ja=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},
|
||||
m&&(la=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),ka=(a,b,c)=>{var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=()=>{200==e.status||0==e.status&&e.response?b(e.response):c()};e.onerror=c;e.send(null)};var oa=console.log.bind(console),v=console.warn.bind(console);Object.assign(d,ca);ca=null;var z=0,noExitRuntime=!0;"object"!=typeof WebAssembly&&A("no native wasm support detected");
|
||||
var pa,qa=!1,ra,sa="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;
|
||||
function B(a,b){for(var c=b+NaN,e=b;a[e]&&!(e>=c);)++e;if(16<e-b&&a.buffer&&sa)return sa.decode(a.subarray(b,e));for(c="";b<e;){var f=a[b++];if(f&128){var g=a[b++]&63;if(192==(f&224))c+=String.fromCharCode((f&31)<<6|g);else{var k=a[b++]&63;f=224==(f&240)?(f&15)<<12|g<<6|k:(f&7)<<18|g<<12|k<<6|a[b++]&63;65536>f?c+=String.fromCharCode(f):(f-=65536,c+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else c+=String.fromCharCode(f)}return c}function C(a){return a?B(ta,a):""}
|
||||
function ua(a,b,c,e){if(!(0<e))return 0;var f=c;e=c+e-1;for(var g=0;g<a.length;++g){var k=a.charCodeAt(g);if(55296<=k&&57343>=k){var l=a.charCodeAt(++g);k=65536+((k&1023)<<10)|l&1023}if(127>=k){if(c>=e)break;b[c++]=k}else{if(2047>=k){if(c+1>=e)break;b[c++]=192|k>>6}else{if(65535>=k){if(c+2>=e)break;b[c++]=224|k>>12}else{if(c+3>=e)break;b[c++]=240|k>>18;b[c++]=128|k>>12&63}b[c++]=128|k>>6&63}b[c++]=128|k&63}}b[c]=0;return c-f}
|
||||
function va(a){for(var b=0,c=0;c<a.length;++c){var e=a.charCodeAt(c);55296<=e&&57343>=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++c)&1023);127>=e?++b:b=2047>=e?b+2:65535>=e?b+3:b+4}return b}function wa(a){var b=va(a)+1,c=xa(b);c&&ua(a,D,c,b);return c}function ya(a){var b=va(a)+1,c=za(b);ua(a,D,c,b);return c}var Aa,D,ta,Ba,E,G,Ca;
|
||||
function Da(){var a=pa.buffer;Aa=a;d.HEAP8=D=new Int8Array(a);d.HEAP16=Ba=new Int16Array(a);d.HEAP32=E=new Int32Array(a);d.HEAPU8=ta=new Uint8Array(a);d.HEAPU16=new Uint16Array(a);d.HEAPU32=G=new Uint32Array(a);d.HEAPF32=new Float32Array(a);d.HEAPF64=new Float64Array(a);d.HEAP64=Ca=new BigInt64Array(a);d.HEAPU64=new BigUint64Array(a)}var Ea,Fa=[],Ga=[],Ha=[],Ia=[],H=0,Ja=null,Ka=null;function La(){H--;if(0==H&&(null!==Ja&&(clearInterval(Ja),Ja=null),Ka)){var a=Ka;Ka=null;a()}}
|
||||
function A(a){a="Aborted("+a+")";v(a);qa=!0;ra=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}function Ma(){return K.startsWith("data:application/octet-stream;base64,")}var K;K="qpdf.wasm";if(!Ma()){var Na=K;K=d.locateFile?d.locateFile(Na,q):q+Na}function Oa(){var a=K;try{if(la)return la(a);throw"both async and sync fetching of the wasm failed";}catch(b){A(b)}}
|
||||
function Pa(){if(ha||m){if("function"==typeof fetch&&!K.startsWith("file://"))return fetch(K,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+K+"'";return a.arrayBuffer()}).catch(function(){return Oa()});if(ka)return new Promise(function(a,b){ka(K,function(c){a(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return Oa()})}
|
||||
function Qa(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(d);else{var c=b.ld;"number"==typeof c?void 0===b.vb?L(c)():L(c)(b.vb):c(void 0===b.vb?null:b.vb)}}}function L(a){return Ea.get(a)}var Ra=[],Sa=0,M=0;
|
||||
function N(a){this.eb=a;this.ta=a-24;this.ed=function(b){G[this.ta+4>>2]=b};this.Ia=function(){return G[this.ta+4>>2]};this.Yc=function(b){G[this.ta+8>>2]=b};this.Gc=function(){return G[this.ta+8>>2]};this.cd=function(){E[this.ta>>2]=0};this.Nb=function(b){D[this.ta+12>>0]=b?1:0};this.Tc=function(){return 0!=D[this.ta+12>>0]};this.Ob=function(b){D[this.ta+13>>0]=b?1:0};this.fc=function(){return 0!=D[this.ta+13>>0]};this.Ma=function(b,c){this.Ya(0);this.ed(b);this.Yc(c);this.cd();this.Nb(!1);this.Ob(!1)};
|
||||
this.Oc=function(){E[this.ta>>2]+=1};this.Uc=function(){var b=E[this.ta>>2];E[this.ta>>2]=b-1;return 1===b};this.Ya=function(b){G[this.ta+16>>2]=b};this.Sc=function(){return G[this.ta+16>>2]};this.Wc=function(){if(Ta(this.Ia()))return G[this.eb>>2];var b=this.Sc();return 0!==b?b:this.eb}}function Ua(a){return Va((new N(a)).ta)}
|
||||
var Wa=(a,b)=>{for(var c=0,e=a.length-1;0<=e;e--){var f=a[e];"."===f?a.splice(e,1):".."===f?(a.splice(e,1),c++):c&&(a.splice(e,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},O=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Wa(a.split("/").filter(e=>!!e),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Xa=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},P=a=>{if("/"===
|
||||
a)return"/";a=O(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)};function Ya(){var a=Array.prototype.slice.call(arguments,0);return O(a.join("/"))}var Q=(a,b)=>O(a+"/"+b);function Za(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}if(ia)try{var b=require("crypto");return function(){return b.randomBytes(1)[0]}}catch(c){}return function(){A("randomDevice")}}
|
||||
function R(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:S.cwd();if("string"!=typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=Wa(a.split("/").filter(e=>!!e),!b).join("/");return(b?"/":"")+a||"."}
|
||||
var $a=(a,b)=>{function c(k){for(var l=0;l<k.length&&""===k[l];l++);for(var p=k.length-1;0<=p&&""===k[p];p--);return l>p?[]:k.slice(l,p-l+1)}a=R(a).substr(1);b=R(b).substr(1);a=c(a.split("/"));b=c(b.split("/"));for(var e=Math.min(a.length,b.length),f=e,g=0;g<e;g++)if(a[g]!==b[g]){f=g;break}e=[];for(g=f;g<a.length;g++)e.push("..");e=e.concat(b.slice(f));return e.join("/")},ab=[];function bb(a,b){ab[a]={input:[],output:[],Za:b};S.Mb(a,cb)}
|
||||
var cb={open:function(a){var b=ab[a.node.rdev];if(!b)throw new S.na(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.Za.flush(a.tty)},flush:function(a){a.tty.Za.flush(a.tty)},read:function(a,b,c,e){if(!a.tty||!a.tty.Za.ec)throw new S.na(60);for(var f=0,g=0;g<e;g++){try{var k=a.tty.Za.ec(a.tty)}catch(l){throw new S.na(29);}if(void 0===k&&0===f)throw new S.na(6);if(null===k||void 0===k)break;f++;b[c+g]=k}f&&(a.node.timestamp=Date.now());return f},write:function(a,b,c,e){if(!a.tty||!a.tty.Za.Ib)throw new S.na(60);
|
||||
try{for(var f=0;f<e;f++)a.tty.Za.Ib(a.tty,b[c+f])}catch(g){throw new S.na(29);}e&&(a.node.timestamp=Date.now());return f}},eb={ec:function(a){if(!a.input.length){var b=null;if(ia){var c=Buffer.alloc(256),e=0;try{e=fs.readSync(process.stdin.fd,c,0,256,-1)}catch(f){if(f.toString().includes("EOF"))e=0;else throw f;}0<e?b=c.slice(0,e).toString("utf-8"):b=null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(b=window.prompt("Input: "),null!==b&&(b+="\n")):"function"==typeof readline&&
|
||||
(b=readline(),null!==b&&(b+="\n"));if(!b)return null;a.input=db(b,!0)}return a.input.shift()},Ib:function(a,b){null===b||10===b?(oa(B(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(oa(B(a.output,0)),a.output=[])}},fb={Ib:function(a,b){null===b||10===b?(v(B(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(v(B(a.output,0)),a.output=[])}},T={Fa:null,ra:function(){return T.createNode(null,"/",16895,0)},
|
||||
createNode:function(a,b,c,e){if(S.Hc(c)||S.isFIFO(c))throw new S.na(63);T.Fa||(T.Fa={dir:{node:{za:T.oa.za,wa:T.oa.wa,lookup:T.oa.lookup,Ca:T.oa.Ca,rename:T.oa.rename,unlink:T.oa.unlink,rmdir:T.oa.rmdir,readdir:T.oa.readdir,symlink:T.oa.symlink},stream:{Aa:T.qa.Aa}},file:{node:{za:T.oa.za,wa:T.oa.wa},stream:{Aa:T.qa.Aa,read:T.qa.read,write:T.qa.write,cb:T.qa.cb,Wa:T.qa.Wa,Xa:T.qa.Xa}},link:{node:{za:T.oa.za,wa:T.oa.wa,readlink:T.oa.readlink},stream:{}},Ub:{node:{za:T.oa.za,wa:T.oa.wa},stream:S.tc}});
|
||||
c=S.createNode(a,b,c,e);S.va(c.mode)?(c.oa=T.Fa.dir.node,c.qa=T.Fa.dir.stream,c.pa={}):S.isFile(c.mode)?(c.oa=T.Fa.file.node,c.qa=T.Fa.file.stream,c.ua=0,c.pa=null):S.Va(c.mode)?(c.oa=T.Fa.link.node,c.qa=T.Fa.link.stream):S.jb(c.mode)&&(c.oa=T.Fa.Ub.node,c.qa=T.Fa.Ub.stream);c.timestamp=Date.now();a&&(a.pa[b]=c,a.timestamp=c.timestamp);return c},nd:function(a){return a.pa?a.pa.subarray?a.pa.subarray(0,a.ua):new Uint8Array(a.pa):new Uint8Array(0)},$b:function(a,b){var c=a.pa?a.pa.length:0;c>=b||(b=
|
||||
Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.pa,a.pa=new Uint8Array(b),0<a.ua&&a.pa.set(c.subarray(0,a.ua),0))},Vc:function(a,b){if(a.ua!=b)if(0==b)a.pa=null,a.ua=0;else{var c=a.pa;a.pa=new Uint8Array(b);c&&a.pa.set(c.subarray(0,Math.min(b,a.ua)));a.ua=b}},oa:{za:function(a){var b={};b.dev=S.jb(a.mode)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;b.gid=0;b.rdev=a.rdev;S.va(a.mode)?b.size=4096:S.isFile(a.mode)?b.size=a.ua:S.Va(a.mode)?b.size=a.link.length:b.size=0;b.atime=
|
||||
new Date(a.timestamp);b.mtime=new Date(a.timestamp);b.ctime=new Date(a.timestamp);b.Ja=4096;b.blocks=Math.ceil(b.size/b.Ja);return b},wa:function(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp);void 0!==b.size&&T.Vc(a,b.size)},lookup:function(){throw S.yb[44];},Ca:function(a,b,c,e){return T.createNode(a,b,c,e)},rename:function(a,b,c){if(S.va(a.mode)){try{var e=S.Ha(b,c)}catch(g){}if(e)for(var f in e.pa)throw new S.na(55);}delete a.parent.pa[a.name];a.parent.timestamp=
|
||||
Date.now();a.name=c;b.pa[c]=a;b.timestamp=a.parent.timestamp;a.parent=b},unlink:function(a,b){delete a.pa[b];a.timestamp=Date.now()},rmdir:function(a,b){var c=S.Ha(a,b),e;for(e in c.pa)throw new S.na(55);delete a.pa[b];a.timestamp=Date.now()},readdir:function(a){var b=[".",".."],c;for(c in a.pa)a.pa.hasOwnProperty(c)&&b.push(c);return b},symlink:function(a,b,c){a=T.createNode(a,b,41471,0);a.link=c;return a},readlink:function(a){if(!S.Va(a.mode))throw new S.na(28);return a.link}},qa:{read:function(a,
|
||||
b,c,e,f){var g=a.node.pa;if(f>=a.node.ua)return 0;a=Math.min(a.node.ua-f,e);if(8<a&&g.subarray)b.set(g.subarray(f,f+a),c);else for(e=0;e<a;e++)b[c+e]=g[f+e];return a},write:function(a,b,c,e,f,g){b.buffer===D.buffer&&(g=!1);if(!e)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.pa||a.pa.subarray)){if(g)return a.pa=b.subarray(c,c+e),a.ua=e;if(0===a.ua&&0===f)return a.pa=b.slice(c,c+e),a.ua=e;if(f+e<=a.ua)return a.pa.set(b.subarray(c,c+e),f),e}T.$b(a,f+e);if(a.pa.subarray&&b.subarray)a.pa.set(b.subarray(c,
|
||||
c+e),f);else for(g=0;g<e;g++)a.pa[f+g]=b[c+g];a.ua=Math.max(a.ua,f+e);return e},Aa:function(a,b,c){1===c?b+=a.position:2===c&&S.isFile(a.node.mode)&&(b+=a.node.ua);if(0>b)throw new S.na(28);return b},cb:function(a,b,c){T.$b(a.node,b+c);a.node.ua=Math.max(a.node.ua,b+c)},Wa:function(a,b,c,e,f,g){if(0!==b)throw new S.na(28);if(!S.isFile(a.node.mode))throw new S.na(43);a=a.node.pa;if(g&2||a.buffer!==Aa){if(0<e||e+c<a.length)a.subarray?a=a.subarray(e,e+c):a=Array.prototype.slice.call(a,e,e+c);e=!0;A();
|
||||
c=void 0;if(!c)throw new S.na(48);D.set(a,c)}else e=!1,c=a.byteOffset;return{ta:c,qc:e}},Xa:function(a,b,c,e,f){if(!S.isFile(a.node.mode))throw new S.na(43);if(f&2)return 0;T.qa.write(a,b,0,e,c,!1);return 0}}};function gb(a,b,c){var e="al "+a;ka(a,function(f){f||A('Loading data file "'+a+'" failed (no arrayBuffer).');b(new Uint8Array(f));e&&La()},function(){if(c)c();else throw'Loading data file "'+a+'" failed.';});e&&H++}
|
||||
var hb={},U={lb:!1,Pb:()=>{U.lb=!!process.platform.match(/^win/);var a=process.binding("constants");a.fs&&(a=a.fs);U.ac={1024:a.O_APPEND,64:a.O_CREAT,128:a.O_EXCL,256:a.O_NOCTTY,0:a.O_RDONLY,2:a.O_RDWR,4096:a.O_SYNC,512:a.O_TRUNC,1:a.O_WRONLY,131072:a.O_NOFOLLOW}},xa:a=>hb[a.code],ra:a=>U.createNode(null,"/",U.Ta(a.$a.root),0),createNode:(a,b,c)=>{if(!S.va(c)&&!S.isFile(c)&&!S.Va(c))throw new S.na(28);a=S.createNode(a,b,c);a.oa=U.oa;a.qa=U.qa;return a},Ta:a=>{try{var b=fs.lstatSync(a);U.lb&&(b.mode=
|
||||
b.mode|(b.mode&292)>>2)}catch(c){if(!c.code)throw c;throw new S.na(U.xa(c));}return b.mode},Ba:a=>{for(var b=[];a.parent!==a;)b.push(a.name),a=a.parent;b.push(a.ra.$a.root);b.reverse();return Ya.apply(null,b)},Ec:a=>{a&=-2721793;var b=0,c;for(c in U.ac)a&c&&(b|=U.ac[c],a^=c);if(a)throw new S.na(28);return b},oa:{za:a=>{a=U.Ba(a);try{var b=fs.lstatSync(a)}catch(c){if(!c.code)throw c;throw new S.na(U.xa(c));}U.lb&&!b.Ja&&(b.Ja=4096);U.lb&&!b.blocks&&(b.blocks=(b.size+b.Ja-1)/b.Ja|0);return{dev:b.dev,
|
||||
ino:b.ino,mode:b.mode,nlink:b.nlink,uid:b.uid,gid:b.gid,rdev:b.rdev,size:b.size,atime:b.atime,mtime:b.mtime,ctime:b.ctime,Ja:b.Ja,blocks:b.blocks}},wa:(a,b)=>{var c=U.Ba(a);try{void 0!==b.mode&&(fs.chmodSync(c,b.mode),a.mode=b.mode),void 0!==b.size&&fs.truncateSync(c,b.size)}catch(e){if(!e.code)throw e;throw new S.na(U.xa(e));}},lookup:(a,b)=>{var c=Q(U.Ba(a),b);c=U.Ta(c);return U.createNode(a,b,c)},Ca:(a,b,c,e)=>{a=U.createNode(a,b,c,e);b=U.Ba(a);try{S.va(a.mode)?fs.mkdirSync(b,a.mode):fs.writeFileSync(b,
|
||||
"",{mode:a.mode})}catch(f){if(!f.code)throw f;throw new S.na(U.xa(f));}return a},rename:(a,b,c)=>{var e=U.Ba(a);b=Q(U.Ba(b),c);try{fs.renameSync(e,b)}catch(f){if(!f.code)throw f;throw new S.na(U.xa(f));}a.name=c},unlink:(a,b)=>{a=Q(U.Ba(a),b);try{fs.unlinkSync(a)}catch(c){if(!c.code)throw c;throw new S.na(U.xa(c));}},rmdir:(a,b)=>{a=Q(U.Ba(a),b);try{fs.rmdirSync(a)}catch(c){if(!c.code)throw c;throw new S.na(U.xa(c));}},readdir:a=>{a=U.Ba(a);try{return fs.readdirSync(a)}catch(b){if(!b.code)throw b;
|
||||
throw new S.na(U.xa(b));}},symlink:(a,b,c)=>{a=Q(U.Ba(a),b);try{fs.symlinkSync(c,a)}catch(e){if(!e.code)throw e;throw new S.na(U.xa(e));}},readlink:a=>{var b=U.Ba(a);try{return b=fs.readlinkSync(b),b=t.relative(t.resolve(a.ra.$a.root),b)}catch(c){if(!c.code)throw c;if("UNKNOWN"===c.code)throw new S.na(28);throw new S.na(U.xa(c));}}},qa:{open:a=>{var b=U.Ba(a.node);try{S.isFile(a.node.mode)&&(a.ib=fs.openSync(b,U.Ec(a.flags)))}catch(c){if(!c.code)throw c;throw new S.na(U.xa(c));}},close:a=>{try{S.isFile(a.node.mode)&&
|
||||
a.ib&&fs.closeSync(a.ib)}catch(b){if(!b.code)throw b;throw new S.na(U.xa(b));}},read:(a,b,c,e,f)=>{if(0===e)return 0;try{return fs.readSync(a.ib,Buffer.from(b.buffer),c,e,f)}catch(g){throw new S.na(U.xa(g));}},write:(a,b,c,e,f)=>{try{return fs.writeSync(a.ib,Buffer.from(b.buffer),c,e,f)}catch(g){throw new S.na(U.xa(g));}},Aa:(a,b,c)=>{if(1===c)b+=a.position;else if(2===c&&S.isFile(a.node.mode))try{b+=fs.fstatSync(a.ib).size}catch(e){throw new S.na(U.xa(e));}if(0>b)throw new S.na(28);return b},Wa:(a,
|
||||
b,c,e)=>{if(0!==b)throw new S.na(28);if(!S.isFile(a.node.mode))throw new S.na(43);A();U.qa.read(a,D,void 0,c,e);return{ta:void 0,qc:!0}},Xa:(a,b,c,e,f)=>{if(!S.isFile(a.node.mode))throw new S.na(43);if(f&2)return 0;U.qa.write(a,b,0,e,c,!1);return 0}}},V={sb:16895,bb:33279,Kb:null,ra:function(a){function b(g){g=g.split("/");for(var k=e,l=0;l<g.length-1;l++){var p=g.slice(0,l+1).join("/");f[p]||(f[p]=V.createNode(k,g[l],V.sb,0));k=f[p]}return k}function c(g){g=g.split("/");return g[g.length-1]}m||A();
|
||||
V.Kb||(V.Kb=new FileReaderSync);var e=V.createNode(null,"/",V.sb,0),f={};Array.prototype.forEach.call(a.$a.files||[],function(g){V.createNode(b(g.name),c(g.name),V.bb,0,g,g.lastModifiedDate)});(a.$a.blobs||[]).forEach(function(g){V.createNode(b(g.name),c(g.name),V.bb,0,g.data)});(a.$a.packages||[]).forEach(function(g){g.metadata.files.forEach(function(k){var l=k.filename.substr(1);V.createNode(b(l),c(l),V.bb,0,g.blob.slice(k.start,k.end))})});return e},createNode:function(a,b,c,e,f,g){e=S.createNode(a,
|
||||
b,c);e.mode=c;e.oa=V.oa;e.qa=V.qa;e.timestamp=(g||new Date).getTime();V.bb!==V.sb||A();c===V.bb?(e.size=f.size,e.pa=f):(e.size=4096,e.pa={});a&&(a.pa[b]=e);return e},oa:{za:function(a){return{dev:1,ino:a.id,mode:a.mode,nlink:1,uid:0,gid:0,rdev:void 0,size:a.size,atime:new Date(a.timestamp),mtime:new Date(a.timestamp),ctime:new Date(a.timestamp),Ja:4096,blocks:Math.ceil(a.size/4096)}},wa:function(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp)},lookup:function(){throw new S.na(44);
|
||||
},Ca:function(){throw new S.na(63);},rename:function(){throw new S.na(63);},unlink:function(){throw new S.na(63);},rmdir:function(){throw new S.na(63);},readdir:function(a){var b=[".",".."],c;for(c in a.pa)a.pa.hasOwnProperty(c)&&b.push(c);return b},symlink:function(){throw new S.na(63);},readlink:function(){throw new S.na(63);}},qa:{read:function(a,b,c,e,f){if(f>=a.node.size)return 0;a=a.node.pa.slice(f,f+e);e=V.Kb.readAsArrayBuffer(a);b.set(new Uint8Array(e),c);return a.size},write:function(){throw new S.na(29);
|
||||
},Aa:function(a,b,c){1===c?b+=a.position:2===c&&S.isFile(a.node.mode)&&(b+=a.node.size);if(0>b)throw new S.na(28);return b}}},S={root:null,hb:[],Yb:{},streams:[],Mc:1,Ea:null,Xb:"/",Cb:!1,Bb:!0,na:null,yb:{},Cc:null,pb:0,sa:(a,b={})=>{a=R(S.cwd(),a);if(!a)return{path:"",node:null};b=Object.assign({xb:!0,Lb:0},b);if(8<b.Lb)throw new S.na(32);a=Wa(a.split("/").filter(k=>!!k),!1);for(var c=S.root,e="/",f=0;f<a.length;f++){var g=f===a.length-1;if(g&&b.parent)break;c=S.Ha(c,a[f]);e=O(e+"/"+a[f]);S.Na(c)&&
|
||||
(!g||g&&b.xb)&&(c=c.gb.root);if(!g||b.Da)for(g=0;S.Va(c.mode);)if(c=S.readlink(e),e=R(Xa(e),c),c=S.sa(e,{Lb:b.Lb+1}).node,40<g++)throw new S.na(32);}return{path:e,node:c}},La:a=>{for(var b;;){if(S.kb(a))return a=a.ra.kc,b?"/"!==a[a.length-1]?a+"/"+b:a+b:a;b=b?a.name+"/"+b:a.name;a=a.parent}},Ab:(a,b)=>{for(var c=0,e=0;e<b.length;e++)c=(c<<5)-c+b.charCodeAt(e)|0;return(a+c>>>0)%S.Ea.length},ic:a=>{var b=S.Ab(a.parent.id,a.name);a.Pa=S.Ea[b];S.Ea[b]=a},jc:a=>{var b=S.Ab(a.parent.id,a.name);if(S.Ea[b]===
|
||||
a)S.Ea[b]=a.Pa;else for(b=S.Ea[b];b;){if(b.Pa===a){b.Pa=a.Pa;break}b=b.Pa}},Ha:(a,b)=>{var c=S.Jc(a);if(c)throw new S.na(c,a);for(c=S.Ea[S.Ab(a.id,b)];c;c=c.Pa){var e=c.name;if(c.parent.id===a.id&&e===b)return c}return S.lookup(a,b)},createNode:(a,b,c,e)=>{a=new S.mc(a,b,c,e);S.ic(a);return a},wb:a=>{S.jc(a)},kb:a=>a===a.parent,Na:a=>!!a.gb,isFile:a=>32768===(a&61440),va:a=>16384===(a&61440),Va:a=>40960===(a&61440),jb:a=>8192===(a&61440),Hc:a=>24576===(a&61440),isFIFO:a=>4096===(a&61440),isSocket:a=>
|
||||
49152===(a&49152),Dc:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},Lc:a=>{var b=S.Dc[a];if("undefined"==typeof b)throw Error("Unknown file open mode: "+a);return b},bc:a=>{var b=["r","w","rw"][a&3];a&512&&(b+="w");return b},Qa:(a,b)=>{if(S.Bb)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0},Jc:a=>{var b=S.Qa(a,"x");return b?b:a.oa.lookup?0:2},Hb:(a,b)=>{try{return S.Ha(a,b),20}catch(c){}return S.Qa(a,"wx")},
|
||||
mb:(a,b,c)=>{try{var e=S.Ha(a,b)}catch(f){return f.ya}if(a=S.Qa(a,"wx"))return a;if(c){if(!S.va(e.mode))return 54;if(S.kb(e)||S.La(e)===S.cwd())return 10}else if(S.va(e.mode))return 31;return 0},Kc:(a,b)=>a?S.Va(a.mode)?32:S.va(a.mode)&&("r"!==S.bc(b)||b&512)?31:S.Qa(a,S.bc(b)):44,nc:4096,Nc:(a=0,b=S.nc)=>{for(;a<=b;a++)if(!S.streams[a])return a;throw new S.na(33);},Ua:a=>S.streams[a],Wb:(a,b,c)=>{S.tb||(S.tb=function(){this.ob={}},S.tb.prototype={object:{get:function(){return this.node},set:function(e){this.node=
|
||||
e}},flags:{get:function(){return this.ob.flags},set:function(e){this.ob.flags=e}},position:{get md(){return this.ob.position},set:function(e){this.ob.position=e}}});a=Object.assign(new S.tb,a);b=S.Nc(b,c);a.fd=b;return S.streams[b]=a},uc:a=>{S.streams[a]=null},tc:{open:a=>{a.qa=S.Fc(a.node.rdev).qa;a.qa.open&&a.qa.open(a)},Aa:()=>{throw new S.na(70);}},Gb:a=>a>>8,qd:a=>a&255,Oa:(a,b)=>a<<8|b,Mb:(a,b)=>{S.Yb[a]={qa:b}},Fc:a=>S.Yb[a],dc:a=>{var b=[];for(a=[a];a.length;){var c=a.pop();b.push(c);a.push.apply(a,
|
||||
c.hb)}return b},lc:(a,b)=>{function c(k){S.pb--;return b(k)}function e(k){if(k){if(!e.Bc)return e.Bc=!0,c(k)}else++g>=f.length&&c(null)}"function"==typeof a&&(b=a,a=!1);S.pb++;1<S.pb&&v("warning: "+S.pb+" FS.syncfs operations in flight at once, probably just doing extra work");var f=S.dc(S.root.ra),g=0;f.forEach(k=>{if(!k.type.lc)return e(null);k.type.lc(k,a,e)})},ra:(a,b,c)=>{var e="/"===c,f=!c;if(e&&S.root)throw new S.na(10);if(!e&&!f){var g=S.sa(c,{xb:!1});c=g.path;g=g.node;if(S.Na(g))throw new S.na(10);
|
||||
if(!S.va(g.mode))throw new S.na(54);}b={type:a,$a:b,kc:c,hb:[]};a=a.ra(b);a.ra=b;b.root=a;e?S.root=a:g&&(g.gb=b,g.ra&&g.ra.hb.push(b));return a},wd:a=>{a=S.sa(a,{xb:!1});if(!S.Na(a.node))throw new S.na(28);a=a.node;var b=a.gb,c=S.dc(b);Object.keys(S.Ea).forEach(e=>{for(e=S.Ea[e];e;){var f=e.Pa;c.includes(e.ra)&&S.wb(e);e=f}});a.gb=null;a.ra.hb.splice(a.ra.hb.indexOf(b),1)},lookup:(a,b)=>a.oa.lookup(a,b),Ca:(a,b,c)=>{var e=S.sa(a,{parent:!0}).node;a=P(a);if(!a||"."===a||".."===a)throw new S.na(28);
|
||||
var f=S.Hb(e,a);if(f)throw new S.na(f);if(!e.oa.Ca)throw new S.na(63);return e.oa.Ca(e,a,b,c)},create:(a,b)=>S.Ca(a,(void 0!==b?b:438)&4095|32768,0),mkdir:(a,b)=>S.Ca(a,(void 0!==b?b:511)&1023|16384,0),rd:(a,b)=>{a=a.split("/");for(var c="",e=0;e<a.length;++e)if(a[e]){c+="/"+a[e];try{S.mkdir(c,b)}catch(f){if(20!=f.ya)throw f;}}},nb:(a,b,c)=>{"undefined"==typeof c&&(c=b,b=438);return S.Ca(a,b|8192,c)},symlink:(a,b)=>{if(!R(a))throw new S.na(44);var c=S.sa(b,{parent:!0}).node;if(!c)throw new S.na(44);
|
||||
b=P(b);var e=S.Hb(c,b);if(e)throw new S.na(e);if(!c.oa.symlink)throw new S.na(63);return c.oa.symlink(c,b,a)},rename:(a,b)=>{var c=Xa(a),e=Xa(b),f=P(a),g=P(b);var k=S.sa(a,{parent:!0});var l=k.node;k=S.sa(b,{parent:!0});k=k.node;if(!l||!k)throw new S.na(44);if(l.ra!==k.ra)throw new S.na(75);var p=S.Ha(l,f);a=$a(a,e);if("."!==a.charAt(0))throw new S.na(28);a=$a(b,c);if("."!==a.charAt(0))throw new S.na(55);try{var n=S.Ha(k,g)}catch(r){}if(p!==n){b=S.va(p.mode);if(f=S.mb(l,f,b))throw new S.na(f);if(f=
|
||||
n?S.mb(k,g,b):S.Hb(k,g))throw new S.na(f);if(!l.oa.rename)throw new S.na(63);if(S.Na(p)||n&&S.Na(n))throw new S.na(10);if(k!==l&&(f=S.Qa(l,"w")))throw new S.na(f);S.jc(p);try{l.oa.rename(p,k,g)}catch(r){throw r;}finally{S.ic(p)}}},rmdir:a=>{var b=S.sa(a,{parent:!0}).node;a=P(a);var c=S.Ha(b,a),e=S.mb(b,a,!0);if(e)throw new S.na(e);if(!b.oa.rmdir)throw new S.na(63);if(S.Na(c))throw new S.na(10);b.oa.rmdir(b,a);S.wb(c)},readdir:a=>{a=S.sa(a,{Da:!0}).node;if(!a.oa.readdir)throw new S.na(54);return a.oa.readdir(a)},
|
||||
unlink:a=>{var b=S.sa(a,{parent:!0}).node;if(!b)throw new S.na(44);a=P(a);var c=S.Ha(b,a),e=S.mb(b,a,!1);if(e)throw new S.na(e);if(!b.oa.unlink)throw new S.na(63);if(S.Na(c))throw new S.na(10);b.oa.unlink(b,a);S.wb(c)},readlink:a=>{a=S.sa(a).node;if(!a)throw new S.na(44);if(!a.oa.readlink)throw new S.na(28);return R(S.La(a.parent),a.oa.readlink(a))},stat:(a,b)=>{a=S.sa(a,{Da:!b}).node;if(!a)throw new S.na(44);if(!a.oa.za)throw new S.na(63);return a.oa.za(a)},lstat:a=>S.stat(a,!0),chmod:(a,b,c)=>{a=
|
||||
"string"==typeof a?S.sa(a,{Da:!c}).node:a;if(!a.oa.wa)throw new S.na(63);a.oa.wa(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})},lchmod:(a,b)=>{S.chmod(a,b,!0)},fchmod:(a,b)=>{a=S.Ua(a);if(!a)throw new S.na(8);S.chmod(a.node,b)},chown:(a,b,c,e)=>{a="string"==typeof a?S.sa(a,{Da:!e}).node:a;if(!a.oa.wa)throw new S.na(63);a.oa.wa(a,{timestamp:Date.now()})},lchown:(a,b,c)=>{S.chown(a,b,c,!0)},fchown:(a,b,c)=>{a=S.Ua(a);if(!a)throw new S.na(8);S.chown(a.node,b,c)},truncate:(a,b)=>{if(0>b)throw new S.na(28);
|
||||
a="string"==typeof a?S.sa(a,{Da:!0}).node:a;if(!a.oa.wa)throw new S.na(63);if(S.va(a.mode))throw new S.na(31);if(!S.isFile(a.mode))throw new S.na(28);var c=S.Qa(a,"w");if(c)throw new S.na(c);a.oa.wa(a,{size:b,timestamp:Date.now()})},kd:(a,b)=>{a=S.Ua(a);if(!a)throw new S.na(8);if(0===(a.flags&2097155))throw new S.na(28);S.truncate(a.node,b)},xd:(a,b,c)=>{a=S.sa(a,{Da:!0}).node;a.oa.wa(a,{timestamp:Math.max(b,c)})},open:(a,b,c)=>{if(""===a)throw new S.na(44);b="string"==typeof b?S.Lc(b):b;c=b&64?("undefined"==
|
||||
typeof c?438:c)&4095|32768:0;if("object"==typeof a)var e=a;else{a=O(a);try{e=S.sa(a,{Da:!(b&131072)}).node}catch(g){}}var f=!1;if(b&64)if(e){if(b&128)throw new S.na(20);}else e=S.Ca(a,c,0),f=!0;if(!e)throw new S.na(44);S.jb(e.mode)&&(b&=-513);if(b&65536&&!S.va(e.mode))throw new S.na(54);if(!f&&(c=S.Kc(e,b)))throw new S.na(c);b&512&&!f&&S.truncate(e,0);b&=-131713;e=S.Wb({node:e,path:S.La(e),flags:b,seekable:!0,position:0,qa:e.qa,dd:[],error:!1});e.qa.open&&e.qa.open(e);!d.logReadFiles||b&1||(S.Jb||
|
||||
(S.Jb={}),a in S.Jb||(S.Jb[a]=1));return e},close:a=>{if(S.fb(a))throw new S.na(8);a.zb&&(a.zb=null);try{a.qa.close&&a.qa.close(a)}catch(b){throw b;}finally{S.uc(a.fd)}a.fd=null},fb:a=>null===a.fd,Aa:(a,b,c)=>{if(S.fb(a))throw new S.na(8);if(!a.seekable||!a.qa.Aa)throw new S.na(70);if(0!=c&&1!=c&&2!=c)throw new S.na(28);a.position=a.qa.Aa(a,b,c);a.dd=[];return a.position},read:(a,b,c,e,f)=>{if(0>e||0>f)throw new S.na(28);if(S.fb(a))throw new S.na(8);if(1===(a.flags&2097155))throw new S.na(8);if(S.va(a.node.mode))throw new S.na(31);
|
||||
if(!a.qa.read)throw new S.na(28);var g="undefined"!=typeof f;if(!g)f=a.position;else if(!a.seekable)throw new S.na(70);b=a.qa.read(a,b,c,e,f);g||(a.position+=b);return b},write:(a,b,c,e,f,g)=>{if(0>e||0>f)throw new S.na(28);if(S.fb(a))throw new S.na(8);if(0===(a.flags&2097155))throw new S.na(8);if(S.va(a.node.mode))throw new S.na(31);if(!a.qa.write)throw new S.na(28);a.seekable&&a.flags&1024&&S.Aa(a,0,2);var k="undefined"!=typeof f;if(!k)f=a.position;else if(!a.seekable)throw new S.na(70);b=a.qa.write(a,
|
||||
b,c,e,f,g);k||(a.position+=b);return b},cb:(a,b,c)=>{if(S.fb(a))throw new S.na(8);if(0>b||0>=c)throw new S.na(28);if(0===(a.flags&2097155))throw new S.na(8);if(!S.isFile(a.node.mode)&&!S.va(a.node.mode))throw new S.na(43);if(!a.qa.cb)throw new S.na(138);a.qa.cb(a,b,c)},Wa:(a,b,c,e,f,g)=>{if(0!==(f&2)&&0===(g&2)&&2!==(a.flags&2097155))throw new S.na(2);if(1===(a.flags&2097155))throw new S.na(2);if(!a.qa.Wa)throw new S.na(43);return a.qa.Wa(a,b,c,e,f,g)},Xa:(a,b,c,e,f)=>a&&a.qa.Xa?a.qa.Xa(a,b,c,e,f):
|
||||
0,sd:()=>0,Db:(a,b,c)=>{if(!a.qa.Db)throw new S.na(59);return a.qa.Db(a,b,c)},readFile:(a,b={})=>{b.flags=b.flags||0;b.encoding=b.encoding||"binary";if("utf8"!==b.encoding&&"binary"!==b.encoding)throw Error('Invalid encoding type "'+b.encoding+'"');var c,e=S.open(a,b.flags);a=S.stat(a).size;var f=new Uint8Array(a);S.read(e,f,0,a,0);"utf8"===b.encoding?c=B(f,0):"binary"===b.encoding&&(c=f);S.close(e);return c},writeFile:(a,b,c={})=>{c.flags=c.flags||577;a=S.open(a,c.flags,c.mode);if("string"==typeof b){var e=
|
||||
new Uint8Array(va(b)+1);b=ua(b,e,0,e.length);S.write(a,e,0,b,void 0,c.sc)}else if(ArrayBuffer.isView(b))S.write(a,b,0,b.byteLength,void 0,c.sc);else throw Error("Unsupported data type");S.close(a)},cwd:()=>S.Xb,chdir:a=>{a=S.sa(a,{Da:!0});if(null===a.node)throw new S.na(44);if(!S.va(a.node.mode))throw new S.na(54);var b=S.Qa(a.node,"x");if(b)throw new S.na(b);S.Xb=a.path},wc:()=>{S.mkdir("/tmp");S.mkdir("/home");S.mkdir("/home/web_user")},vc:()=>{S.mkdir("/dev");S.Mb(S.Oa(1,3),{read:()=>0,write:(b,
|
||||
c,e,f)=>f});S.nb("/dev/null",S.Oa(1,3));bb(S.Oa(5,0),eb);bb(S.Oa(6,0),fb);S.nb("/dev/tty",S.Oa(5,0));S.nb("/dev/tty1",S.Oa(6,0));var a=Za();S.Ka("/dev","random",a);S.Ka("/dev","urandom",a);S.mkdir("/dev/shm");S.mkdir("/dev/shm/tmp")},zc:()=>{S.mkdir("/proc");var a=S.mkdir("/proc/self");S.mkdir("/proc/self/fd");S.ra({ra:()=>{var b=S.createNode(a,"fd",16895,73);b.oa={lookup:(c,e)=>{var f=S.Ua(+e);if(!f)throw new S.na(8);c={parent:null,ra:{kc:"fake"},oa:{readlink:()=>f.path}};return c.parent=c}};return b}},
|
||||
{},"/proc/self/fd")},Ac:()=>{d.stdin?S.Ka("/dev","stdin",d.stdin):S.symlink("/dev/tty","/dev/stdin");d.stdout?S.Ka("/dev","stdout",null,d.stdout):S.symlink("/dev/tty","/dev/stdout");d.stderr?S.Ka("/dev","stderr",null,d.stderr):S.symlink("/dev/tty1","/dev/stderr");S.open("/dev/stdin",0);S.open("/dev/stdout",1);S.open("/dev/stderr",1)},Zb:()=>{S.na||(S.na=function(a,b){this.node=b;this.Xc=function(c){this.ya=c};this.Xc(a);this.message="FS error"},S.na.prototype=Error(),S.na.prototype.constructor=S.na,
|
||||
[44].forEach(a=>{S.yb[a]=new S.na(a);S.yb[a].stack="<generic error, no stack>"}))},Pb:()=>{S.Zb();S.Ea=Array(4096);S.ra(T,{},"/");S.wc();S.vc();S.zc();S.Cc={MEMFS:T,NODEFS:U,WORKERFS:V}},Ma:(a,b,c)=>{S.Ma.Cb=!0;S.Zb();d.stdin=a||d.stdin;d.stdout=b||d.stdout;d.stderr=c||d.stderr;S.Ac()},td:()=>{S.Ma.Cb=!1;for(var a=0;a<S.streams.length;a++){var b=S.streams[a];b&&S.close(b)}},Ta:(a,b)=>{var c=0;a&&(c|=365);b&&(c|=146);return c},jd:(a,b)=>{a=S.ub(a,b);return a.exists?a.object:null},ub:(a,b)=>{try{var c=
|
||||
S.sa(a,{Da:!b});a=c.path}catch(f){}var e={kb:!1,exists:!1,error:0,name:null,path:null,object:null,Pc:!1,Rc:null,Qc:null};try{c=S.sa(a,{parent:!0}),e.Pc=!0,e.Rc=c.path,e.Qc=c.node,e.name=P(a),c=S.sa(a,{Da:!b}),e.exists=!0,e.path=c.path,e.object=c.node,e.name=c.node.name,e.kb="/"===c.path}catch(f){e.error=f.ya}return e},gd:(a,b)=>{a="string"==typeof a?a:S.La(a);for(b=b.split("/").reverse();b.length;){var c=b.pop();if(c){var e=O(a+"/"+c);try{S.mkdir(e)}catch(f){}a=e}}return e},xc:(a,b,c,e,f)=>{a=Q("string"==
|
||||
typeof a?a:S.La(a),b);e=S.Ta(e,f);return S.create(a,e)},Vb:(a,b,c,e,f,g)=>{var k=b;a&&(a="string"==typeof a?a:S.La(a),k=b?O(a+"/"+b):a);a=S.Ta(e,f);k=S.create(k,a);if(c){if("string"==typeof c){b=Array(c.length);e=0;for(f=c.length;e<f;++e)b[e]=c.charCodeAt(e);c=b}S.chmod(k,a|146);b=S.open(k,577);S.write(b,c,0,c.length,0,g);S.close(b);S.chmod(k,a)}return k},Ka:(a,b,c,e)=>{a=Q("string"==typeof a?a:S.La(a),b);b=S.Ta(!!c,!!e);S.Ka.Gb||(S.Ka.Gb=64);var f=S.Oa(S.Ka.Gb++,0);S.Mb(f,{open:g=>{g.seekable=!1},
|
||||
close:()=>{e&&e.buffer&&e.buffer.length&&e(10)},read:(g,k,l,p)=>{for(var n=0,r=0;r<p;r++){try{var w=c()}catch(y){throw new S.na(29);}if(void 0===w&&0===n)throw new S.na(6);if(null===w||void 0===w)break;n++;k[l+r]=w}n&&(g.node.timestamp=Date.now());return n},write:(g,k,l,p)=>{for(var n=0;n<p;n++)try{e(k[l+n])}catch(r){throw new S.na(29);}p&&(g.node.timestamp=Date.now());return n}});return S.nb(a,b,f)},cc:a=>{if(a.Eb||a.Ic||a.link||a.pa)return!0;if("undefined"!=typeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");
|
||||
if(ja)try{a.pa=db(ja(a.url),!0),a.ua=a.pa.length}catch(b){throw new S.na(29);}else throw Error("Cannot load without read() or XMLHttpRequest.");},yc:(a,b,c,e,f)=>{function g(){this.Fb=!1;this.Ia=[]}g.prototype.get=function(n){if(!(n>this.length-1||0>n)){var r=n%this.chunkSize;return this.hc(n/this.chunkSize|0)[r]}};g.prototype.Ya=function(n){this.hc=n};g.prototype.Tb=function(){var n=new XMLHttpRequest;n.open("HEAD",c,!1);n.send(null);if(!(200<=n.status&&300>n.status||304===n.status))throw Error("Couldn't load "+
|
||||
c+". Status: "+n.status);var r=Number(n.getResponseHeader("Content-length")),w,y=(w=n.getResponseHeader("Accept-Ranges"))&&"bytes"===w;n=(w=n.getResponseHeader("Content-Encoding"))&&"gzip"===w;var h=1048576;y||(h=r);var u=this;u.Ya(x=>{var F=x*h,I=(x+1)*h-1;I=Math.min(I,r-1);if("undefined"==typeof u.Ia[x]){var Ab=u.Ia;if(F>I)throw Error("invalid range ("+F+", "+I+") or no bytes requested!");if(I>r-1)throw Error("only "+r+" bytes available! programmer error!");var J=new XMLHttpRequest;J.open("GET",
|
||||
c,!1);r!==h&&J.setRequestHeader("Range","bytes="+F+"-"+I);J.responseType="arraybuffer";J.overrideMimeType&&J.overrideMimeType("text/plain; charset=x-user-defined");J.send(null);if(!(200<=J.status&&300>J.status||304===J.status))throw Error("Couldn't load "+c+". Status: "+J.status);F=void 0!==J.response?new Uint8Array(J.response||[]):db(J.responseText||"",!0);Ab[x]=F}if("undefined"==typeof u.Ia[x])throw Error("doXHR failed!");return u.Ia[x]});if(n||!r)h=r=1,h=r=this.hc(0).length,oa("LazyFiles on gzip forces download of the whole file when length is accessed");
|
||||
this.pc=r;this.oc=h;this.Fb=!0};if("undefined"!=typeof XMLHttpRequest){if(!m)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var k=new g;Object.defineProperties(k,{length:{get:function(){this.Fb||this.Tb();return this.pc}},chunkSize:{get:function(){this.Fb||this.Tb();return this.oc}}});k={Eb:!1,pa:k}}else k={Eb:!1,url:c};var l=S.xc(a,b,k,e,f);k.pa?l.pa=k.pa:k.url&&(l.pa=null,l.url=k.url);Object.defineProperties(l,{ua:{get:function(){return this.pa.length}}});
|
||||
var p={};Object.keys(l.qa).forEach(n=>{var r=l.qa[n];p[n]=function(){S.cc(l);return r.apply(null,arguments)}});p.read=(n,r,w,y,h)=>{S.cc(l);n=n.node.pa;if(h>=n.length)return 0;y=Math.min(n.length-h,y);if(n.slice)for(var u=0;u<y;u++)r[w+u]=n[h+u];else for(u=0;u<y;u++)r[w+u]=n.get(h+u);return y};l.qa=p;return l},hd:(a,b,c,e,f,g,k,l,p,n)=>{function r(y){function h(u){n&&n();l||S.Vb(a,b,u,e,f,p);g&&g();La()}ib.od(y,w,h,()=>{k&&k();La()})||h(y)}var w=b?R(O(a+"/"+b)):a;H++;"string"==typeof c?gb(c,y=>r(y),
|
||||
k):r(c)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,Rb:()=>"EM_FS_"+window.location.pathname,Sb:20,ab:"FILE_DATA",ud:(a,b,c)=>{b=b||(()=>{});c=c||(()=>{});var e=S.indexedDB();try{var f=e.open(S.Rb(),S.Sb)}catch(g){return c(g)}f.onupgradeneeded=()=>{oa("creating db");f.result.createObjectStore(S.ab)};f.onsuccess=()=>{var g=f.result.transaction([S.ab],"readwrite"),k=g.objectStore(S.ab),l=0,p=0,n=a.length;a.forEach(r=>{r=k.put(S.ub(r).object.pa,r);
|
||||
r.onsuccess=()=>{l++;l+p==n&&(0==p?b():c())};r.onerror=()=>{p++;l+p==n&&(0==p?b():c())}});g.onerror=c};f.onerror=c},pd:(a,b,c)=>{b=b||(()=>{});c=c||(()=>{});var e=S.indexedDB();try{var f=e.open(S.Rb(),S.Sb)}catch(g){return c(g)}f.onupgradeneeded=c;f.onsuccess=()=>{var g=f.result;try{var k=g.transaction([S.ab],"readonly")}catch(w){c(w);return}var l=k.objectStore(S.ab),p=0,n=0,r=a.length;a.forEach(w=>{var y=l.get(w);y.onsuccess=()=>{S.ub(w).exists&&S.unlink(w);S.Vb(Xa(w),P(w),y.result,!0,!0,!0);p++;
|
||||
p+n==r&&(0==n?b():c())};y.onerror=()=>{n++;p+n==r&&(0==n?b():c())}});k.onerror=c};f.onerror=c}};function jb(a,b){if("/"===b.charAt(0))return b;if(-100===a)a=S.cwd();else{a=S.Ua(a);if(!a)throw new S.na(8);a=a.path}if(0==b.length)throw new S.na(44);return O(a+"/"+b)}var kb=void 0;function W(){kb+=4;return E[kb-4>>2]}function lb(a){a=S.Ua(a);if(!a)throw new S.na(8);return a}
|
||||
function mb(a,b,c){function e(p){return(p=p.toTimeString().match(/\(([A-Za-z ]+)\)$/))?p[1]:"GMT"}var f=(new Date).getFullYear(),g=new Date(f,0,1),k=new Date(f,6,1);f=g.getTimezoneOffset();var l=k.getTimezoneOffset();E[a>>2]=60*Math.max(f,l);E[b>>2]=Number(f!=l);a=e(g);b=e(k);a=wa(a);b=wa(b);l<f?(E[c>>2]=a,E[c+4>>2]=b):(E[c>>2]=b,E[c+4>>2]=a)}function nb(a,b,c){nb.rc||(nb.rc=!0,mb(a,b,c))}var ob={};
|
||||
function pb(){if(!qb){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ea||"./this.program"},b;for(b in ob)void 0===ob[b]?delete a[b]:a[b]=ob[b];var c=[];for(b in a)c.push(b+"="+a[b]);qb=c}return qb}var qb;function rb(a){return 0===a%4&&(0!==a%100||0===a%400)}var sb=[31,29,31,30,31,30,31,31,30,31,30,31],tb=[31,28,31,30,31,30,31,31,30,31,30,31];
|
||||
function ub(a,b,c,e){function f(h,u,x){for(h="number"==typeof h?h.toString():h||"";h.length<u;)h=x[0]+h;return h}function g(h,u){return f(h,u,"0")}function k(h,u){function x(I){return 0>I?-1:0<I?1:0}var F;0===(F=x(h.getFullYear()-u.getFullYear()))&&0===(F=x(h.getMonth()-u.getMonth()))&&(F=x(h.getDate()-u.getDate()));return F}function l(h){switch(h.getDay()){case 0:return new Date(h.getFullYear()-1,11,29);case 1:return h;case 2:return new Date(h.getFullYear(),0,3);case 3:return new Date(h.getFullYear(),
|
||||
0,2);case 4:return new Date(h.getFullYear(),0,1);case 5:return new Date(h.getFullYear()-1,11,31);case 6:return new Date(h.getFullYear()-1,11,30)}}function p(h){var u=h.Ra;for(h=new Date((new Date(h.Sa+1900,0,1)).getTime());0<u;){var x=h.getMonth(),F=(rb(h.getFullYear())?sb:tb)[x];if(u>F-h.getDate())u-=F-h.getDate()+1,h.setDate(1),11>x?h.setMonth(x+1):(h.setMonth(0),h.setFullYear(h.getFullYear()+1));else{h.setDate(h.getDate()+u);break}}x=new Date(h.getFullYear()+1,0,4);u=l(new Date(h.getFullYear(),
|
||||
0,4));x=l(x);return 0>=k(u,h)?0>=k(x,h)?h.getFullYear()+1:h.getFullYear():h.getFullYear()-1}var n=E[e+40>>2];e={ad:E[e>>2],$c:E[e+4>>2],qb:E[e+8>>2],Qb:E[e+12>>2],rb:E[e+16>>2],Sa:E[e+20>>2],Ga:E[e+24>>2],Ra:E[e+28>>2],vd:E[e+32>>2],Zc:E[e+36>>2],bd:n?C(n):""};c=C(c);n={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d",
|
||||
"%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var r in n)c=c.replace(new RegExp(r,"g"),n[r]);var w="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),y="January February March April May June July August September October November December".split(" ");n={"%a":function(h){return w[h.Ga].substring(0,3)},"%A":function(h){return w[h.Ga]},"%b":function(h){return y[h.rb].substring(0,3)},"%B":function(h){return y[h.rb]},
|
||||
"%C":function(h){return g((h.Sa+1900)/100|0,2)},"%d":function(h){return g(h.Qb,2)},"%e":function(h){return f(h.Qb,2," ")},"%g":function(h){return p(h).toString().substring(2)},"%G":function(h){return p(h)},"%H":function(h){return g(h.qb,2)},"%I":function(h){h=h.qb;0==h?h=12:12<h&&(h-=12);return g(h,2)},"%j":function(h){for(var u=0,x=0;x<=h.rb-1;u+=(rb(h.Sa+1900)?sb:tb)[x++]);return g(h.Qb+u,3)},"%m":function(h){return g(h.rb+1,2)},"%M":function(h){return g(h.$c,2)},"%n":function(){return"\n"},"%p":function(h){return 0<=
|
||||
h.qb&&12>h.qb?"AM":"PM"},"%S":function(h){return g(h.ad,2)},"%t":function(){return"\t"},"%u":function(h){return h.Ga||7},"%U":function(h){return g(Math.floor((h.Ra+7-h.Ga)/7),2)},"%V":function(h){var u=Math.floor((h.Ra+7-(h.Ga+6)%7)/7);2>=(h.Ga+371-h.Ra-2)%7&&u++;if(u)53==u&&(x=(h.Ga+371-h.Ra)%7,4==x||3==x&&rb(h.Sa)||(u=1));else{u=52;var x=(h.Ga+7-h.Ra-1)%7;(4==x||5==x&&rb(h.Sa%400-1))&&u++}return g(u,2)},"%w":function(h){return h.Ga},"%W":function(h){return g(Math.floor((h.Ra+7-(h.Ga+6)%7)/7),2)},
|
||||
"%y":function(h){return(h.Sa+1900).toString().substring(2)},"%Y":function(h){return h.Sa+1900},"%z":function(h){h=h.Zc;var u=0<=h;h=Math.abs(h)/60;return(u?"+":"-")+String("0000"+(h/60*100+h%60)).slice(-4)},"%Z":function(h){return h.bd},"%%":function(){return"%"}};c=c.replace(/%%/g,"\x00\x00");for(r in n)c.includes(r)&&(c=c.replace(new RegExp(r,"g"),n[r](e)));c=c.replace(/\0\0/g,"%");r=db(c,!1);if(r.length>b)return 0;D.set(r,a);return r.length-1}
|
||||
function vb(a,b,c,e){a||(a=this);this.parent=a;this.ra=a.ra;this.gb=null;this.id=S.Mc++;this.name=b;this.mode=c;this.oa={};this.qa={};this.rdev=e}Object.defineProperties(vb.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},Ic:{get:function(){return S.va(this.mode)}},Eb:{get:function(){return S.jb(this.mode)}}});S.mc=vb;S.Pb();var ib;
|
||||
ia&&(ma(),U.Pb());
|
||||
hb={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,
|
||||
ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,
|
||||
EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};function db(a,b){var c=Array(va(a)+1);a=ua(a,c,0,c.length);b&&(c.length=a);return c}
|
||||
var Tb={n:function(a,b,c,e){A("Assertion failed: "+C(a)+", at: "+[b?C(b):"unknown filename",c,e?C(e):"unknown function"])},a:function(a){return xa(a+24)+24},o:function(a){a=new N(a);a.Tc()||(a.Nb(!0),Sa--);a.Ob(!1);Ra.push(a);a.Oc();return a.Wc()},q:function(){X(0);var a=Ra.pop();if(a.Uc()&&!a.fc()){var b=a.Gc();b&&L(b)(a.eb);Ua(a.eb)}M=0},d:function(){var a=M;if(!a)return z=0;var b=new N(a);b.Ya(a);var c=b.Ia();if(!c)return z=0,a;for(var e=Array.prototype.slice.call(arguments),f=0;f<e.length;f++){var g=
|
||||
e[f];if(0===g||g===c)break;if(wb(g,c,b.ta+16))return z=g,a}z=c;return a},j:function(){var a=M;if(!a)return z=0;var b=new N(a);b.Ya(a);var c=b.Ia();if(!c)return z=0,a;for(var e=Array.prototype.slice.call(arguments),f=0;f<e.length;f++){var g=e[f];if(0===g||g===c)break;if(wb(g,c,b.ta+16))return z=g,a}z=c;return a},O:function(){var a=M;if(!a)return z=0;var b=new N(a);b.Ya(a);var c=b.Ia();if(!c)return z=0,a;for(var e=Array.prototype.slice.call(arguments),f=0;f<e.length;f++){var g=e[f];if(0===g||g===c)break;
|
||||
if(wb(g,c,b.ta+16))return z=g,a}z=c;return a},y:Ua,D:function(){var a=Ra.pop();a||A("no exception to throw");var b=a.eb;a.fc()||(Ra.push(a),a.Ob(!0),a.Nb(!1),Sa++);M=b;throw b;},b:function(a,b,c){(new N(a)).Ma(b,c);M=a;Sa++;throw a;},R:function(){return Sa},g:function(a){M||(M=a);throw a;},F:function(a,b,c){kb=c;try{var e=lb(a);switch(b){case 0:var f=W();return 0>f?-28:S.Wb(e,f).fd;case 1:case 2:return 0;case 3:return e.flags;case 4:return f=W(),e.flags|=f,0;case 5:return f=W(),Ba[f+0>>1]=2,0;case 6:case 7:return 0;
|
||||
case 16:case 8:return-28;case 9:return E[xb()>>2]=28,-1;default:return-28}}catch(g){if("undefined"==typeof S||!(g instanceof S.na))throw g;return-g.ya}},_:function(a,b,c){kb=c;try{var e=lb(a);switch(b){case 21509:case 21505:return e.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return e.tty?0:-59;case 21519:if(!e.tty)return-59;var f=W();return E[f>>2]=0;case 21520:return e.tty?-28:-59;case 21531:return f=W(),S.Db(e,b,f);case 21523:return e.tty?0:-59;case 21524:return e.tty?
|
||||
0:-59;default:A("bad ioctl syscall "+b)}}catch(g){if("undefined"==typeof S||!(g instanceof S.na))throw g;return-g.ya}},$:function(a,b,c,e){kb=e;try{b=C(b);b=jb(a,b);var f=e?W():0;return S.open(b,c,f).fd}catch(g){if("undefined"==typeof S||!(g instanceof S.na))throw g;return-g.ya}},U:function(a,b,c,e){try{return b=C(b),e=C(e),b=jb(a,b),e=jb(c,e),S.rename(b,e),0}catch(f){if("undefined"==typeof S||!(f instanceof S.na))throw f;return-f.ya}},T:function(a,b){try{a=C(a);a:{var c=S.stat;try{var e=c(a)}catch(g){if(g&&
|
||||
g.node&&O(a)!==O(S.La(g.node))){var f=-54;break a}throw g;}E[b>>2]=e.dev;E[b+4>>2]=0;E[b+8>>2]=e.ino;E[b+12>>2]=e.mode;E[b+16>>2]=e.nlink;E[b+20>>2]=e.uid;E[b+24>>2]=e.gid;E[b+28>>2]=e.rdev;E[b+32>>2]=0;Ca[b+40>>3]=BigInt(e.size);E[b+48>>2]=4096;E[b+52>>2]=e.blocks;E[b+56>>2]=e.atime.getTime()/1E3|0;E[b+60>>2]=0;E[b+64>>2]=e.mtime.getTime()/1E3|0;E[b+68>>2]=0;E[b+72>>2]=e.ctime.getTime()/1E3|0;E[b+76>>2]=0;Ca[b+80>>3]=BigInt(e.ino);f=0}return f}catch(g){if("undefined"==typeof S||!(g instanceof S.na))throw g;
|
||||
return-g.ya}},S:function(a,b,c){try{return b=C(b),b=jb(a,b),0===c?S.unlink(b):512===c?S.rmdir(b):A("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof S||!(e instanceof S.na))throw e;return-e.ya}},G:function(){return Date.now()},P:function(){throw Infinity;},H:function(a,b){a=new Date(1E3*E[a>>2]);E[b>>2]=a.getSeconds();E[b+4>>2]=a.getMinutes();E[b+8>>2]=a.getHours();E[b+12>>2]=a.getDate();E[b+16>>2]=a.getMonth();E[b+20>>2]=a.getFullYear()-1900;E[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),
|
||||
0,1);E[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;E[b+36>>2]=-(60*a.getTimezoneOffset());var e=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();c=c.getTimezoneOffset();E[b+32>>2]=(e!=c&&a.getTimezoneOffset()==Math.min(c,e))|0},I:nb,z:function(){A("")},A:function(a){var b=ta.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var e=b*(1+.2/c);e=Math.min(e,a+100663296);var f=Math;e=Math.max(a,e);f=f.min.call(f,2147483648,e+(65536-e%65536)%65536);a:{try{pa.grow(f-Aa.byteLength+65535>>>16);
|
||||
Da();var g=1;break a}catch(k){}g=void 0}if(g)return!0}return!1},W:function(a,b){var c=0;pb().forEach(function(e,f){var g=b+c;f=E[a+4*f>>2]=g;for(g=0;g<e.length;++g)D[f++>>0]=e.charCodeAt(g);D[f>>0]=0;c+=e.length+1});return 0},X:function(a,b){var c=pb();E[a>>2]=c.length;var e=0;c.forEach(function(f){e+=f.length+1});E[b>>2]=e;return 0},v:function(a){ra=a;yb(a)},E:function(a){try{var b=lb(a);S.close(b);return 0}catch(c){if("undefined"==typeof S||!(c instanceof S.na))throw c;return c.ya}},Z:function(a,
|
||||
b,c,e){try{a:{var f=lb(a);a=b;for(var g=b=0;g<c;g++){var k=G[a>>2],l=G[a+4>>2];a+=8;var p=S.read(f,D,k,l,void 0);if(0>p){var n=-1;break a}b+=p;if(p<l)break}n=b}E[e>>2]=n;return 0}catch(r){if("undefined"==typeof S||!(r instanceof S.na))throw r;return r.ya}},V:function(a,b,c,e){try{var f=Number(b&BigInt(4294967295))|0,g=Number(b>>BigInt(32))|0,k=lb(a);a=4294967296*g+(f>>>0);if(-9007199254740992>=a||9007199254740992<=a)return 61;S.Aa(k,a,c);Ca[e>>3]=BigInt(k.position);k.zb&&0===a&&0===c&&(k.zb=null);
|
||||
return 0}catch(l){if("undefined"==typeof S||!(l instanceof S.na))throw l;return l.ya}},Y:function(a,b,c,e){try{a:{var f=lb(a);a=b;for(var g=b=0;g<c;g++){var k=G[a>>2],l=G[a+4>>2];a+=8;var p=S.write(f,D,k,l,void 0);if(0>p){var n=-1;break a}b+=p}n=b}E[e>>2]=n;return 0}catch(r){if("undefined"==typeof S||!(r instanceof S.na))throw r;return r.ya}},c:function(){return z},J:zb,e:Bb,f:Cb,p:Db,L:Eb,N:Fb,s:Gb,B:Hb,x:Ib,M:Jb,K:Kb,k:Lb,i:Mb,h:Nb,r:Ob,m:Pb,t:Qb,u:Rb,w:Sb,C:function(a){return a},l:function(a){z=
|
||||
a},Q:function(a,b,c,e){return ub(a,b,c,e)}};
|
||||
(function(){function a(f){d.asm=f.exports;pa=d.asm.aa;Da();Ea=d.asm.ga;Ga.unshift(d.asm.ba);La()}function b(f){a(f.instance)}function c(f){return Pa().then(function(g){return WebAssembly.instantiate(g,e)}).then(function(g){return g}).then(f,function(g){v("failed to asynchronously prepare wasm: "+g);A(g)})}var e={a:Tb};H++;if(d.instantiateWasm)try{return d.instantiateWasm(e,a)}catch(f){return v("Module.instantiateWasm callback failed with error: "+f),!1}(function(){return"function"!=typeof WebAssembly.instantiateStreaming||
|
||||
Ma()||K.startsWith("file://")||"function"!=typeof fetch?c(b):fetch(K,{credentials:"same-origin"}).then(function(f){return WebAssembly.instantiateStreaming(f,e).then(b,function(g){v("wasm streaming compile failed: "+g);v("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ba);return{}})();d.___wasm_call_ctors=function(){return(d.___wasm_call_ctors=d.asm.ba).apply(null,arguments)};
|
||||
var xb=d.___errno_location=function(){return(xb=d.___errno_location=d.asm.ca).apply(null,arguments)},xa=d._malloc=function(){return(xa=d._malloc=d.asm.da).apply(null,arguments)};d._main=function(){return(d._main=d.asm.ea).apply(null,arguments)};
|
||||
var Va=d._free=function(){return(Va=d._free=d.asm.fa).apply(null,arguments)},X=d._setThrew=function(){return(X=d._setThrew=d.asm.ha).apply(null,arguments)},Y=d.stackSave=function(){return(Y=d.stackSave=d.asm.ia).apply(null,arguments)},Z=d.stackRestore=function(){return(Z=d.stackRestore=d.asm.ja).apply(null,arguments)},za=d.stackAlloc=function(){return(za=d.stackAlloc=d.asm.ka).apply(null,arguments)},wb=d.___cxa_can_catch=function(){return(wb=d.___cxa_can_catch=d.asm.la).apply(null,arguments)},Ta=
|
||||
d.___cxa_is_pointer_type=function(){return(Ta=d.___cxa_is_pointer_type=d.asm.ma).apply(null,arguments)};function Mb(a,b){var c=Y();try{L(a)(b)}catch(e){Z(c);if(e!==e+0)throw e;X(1,0)}}function Bb(a,b){var c=Y();try{return L(a)(b)}catch(e){Z(c);if(e!==e+0)throw e;X(1,0)}}function Cb(a,b,c){var e=Y();try{return L(a)(b,c)}catch(f){Z(e);if(f!==f+0)throw f;X(1,0)}}function Ob(a,b,c,e){var f=Y();try{L(a)(b,c,e)}catch(g){Z(f);if(g!==g+0)throw g;X(1,0)}}
|
||||
function Nb(a,b,c){var e=Y();try{L(a)(b,c)}catch(f){Z(e);if(f!==f+0)throw f;X(1,0)}}function Lb(a){var b=Y();try{L(a)()}catch(c){Z(b);if(c!==c+0)throw c;X(1,0)}}function Gb(a,b,c,e,f,g,k){var l=Y();try{return L(a)(b,c,e,f,g,k)}catch(p){Z(l);if(p!==p+0)throw p;X(1,0)}}function Db(a,b,c,e){var f=Y();try{return L(a)(b,c,e)}catch(g){Z(f);if(g!==g+0)throw g;X(1,0)}}function Fb(a,b,c,e,f,g){var k=Y();try{return L(a)(b,c,e,f,g)}catch(l){Z(k);if(l!==l+0)throw l;X(1,0)}}
|
||||
function Jb(a,b,c,e,f,g){var k=Y();try{return L(a)(b,c,e,f,g)}catch(l){Z(k);if(l!==l+0)throw l;X(1,0)}}function Eb(a,b,c,e,f,g){var k=Y();try{return L(a)(b,c,e,f,g)}catch(l){Z(k);if(l!==l+0)throw l;X(1,0)}}function Kb(a,b,c,e){var f=Y();try{return L(a)(b,c,e)}catch(g){Z(f);if(g!==g+0)throw g;X(1,0)}}function Hb(a,b,c,e,f,g,k,l){var p=Y();try{return L(a)(b,c,e,f,g,k,l)}catch(n){Z(p);if(n!==n+0)throw n;X(1,0)}}
|
||||
function Pb(a,b,c,e,f){var g=Y();try{L(a)(b,c,e,f)}catch(k){Z(g);if(k!==k+0)throw k;X(1,0)}}function Qb(a,b,c,e,f,g,k,l){var p=Y();try{L(a)(b,c,e,f,g,k,l)}catch(n){Z(p);if(n!==n+0)throw n;X(1,0)}}function Ib(a,b,c,e,f,g,k,l,p,n,r,w){var y=Y();try{return L(a)(b,c,e,f,g,k,l,p,n,r,w)}catch(h){Z(y);if(h!==h+0)throw h;X(1,0)}}function Rb(a,b,c,e,f,g,k,l,p,n,r){var w=Y();try{L(a)(b,c,e,f,g,k,l,p,n,r)}catch(y){Z(w);if(y!==y+0)throw y;X(1,0)}}
|
||||
function Sb(a,b,c,e,f,g,k,l,p,n,r,w,y,h,u,x){var F=Y();try{L(a)(b,c,e,f,g,k,l,p,n,r,w,y,h,u,x)}catch(I){Z(F);if(I!==I+0)throw I;X(1,0)}}function zb(a){var b=Y();try{return L(a)()}catch(c){Z(b);if(c!==c+0)throw c;X(1,0)}}d.callMain=Ub;d.ENV=ob;d.FS=S;d.NODEFS=U;d.WORKERFS=V;var Vb;function na(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}Ka=function Wb(){Vb||Xb();Vb||(Ka=Wb)};
|
||||
function Ub(a){var b=d._main;a=a||[];var c=a.length+1,e=za(4*(c+1));E[e>>2]=ya(ea);for(var f=1;f<c;f++)E[(e>>2)+f]=ya(a[f-1]);E[(e>>2)+c]=0;try{var g=b(c,e);ra=g;yb(g);return g}catch(l){if(l instanceof na||"unwind"==l)var k=ra;else fa(1,l),k=void 0;return k}finally{}}
|
||||
function Xb(a){a=a||da;if(!(0<H)){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;){var b=d.preRun.shift();Fa.unshift(b)}Qa(Fa);0<H||Vb||(Vb=!0,d.calledRun=!0,qa||(d.noFSInit||S.Ma.Cb||S.Ma(),S.Bb=!1,Qa(Ga),Qa(Ha),aa(d),Yb&&Ub(a),Qa(Ia)))}}d.run=Xb;function yb(a){ra=a;noExitRuntime||(qa=!0);fa(a,new na(a))}var Yb=!0;d.noInitialRun&&(Yb=!1);Xb();
|
||||
Object.assign(S,{init:S.Ma,mkdir:S.mkdir,mount:S.ra,chdir:S.chdir,writeFile:S.writeFile,readFile:S.readFile,createLazyFile:S.yc,setIgnorePermissions:function(a){S.Bb=a}});
|
||||
|
||||
|
||||
return Module.ready
|
||||
}
|
||||
);
|
||||
})();
|
||||
export default Module;
|
||||
@@ -3,6 +3,7 @@ const { availableLocales, locale } = useI18n();
|
||||
|
||||
const localesLong: Record<string, string> = {
|
||||
en: 'English',
|
||||
de: 'Deutsch',
|
||||
es: 'Español',
|
||||
fr: 'Français',
|
||||
pt: 'Português',
|
||||
|
||||
@@ -28,7 +28,7 @@ const compareMatch = computed(() => compareSync(compareString.value, compareHash
|
||||
mb-2
|
||||
/>
|
||||
<n-form-item label="Salt count: " label-placement="left" label-width="120">
|
||||
<n-input-number v-model:value="saltCount" placeholder="Salt rounds..." :max="10" :min="0" w-full />
|
||||
<n-input-number v-model:value="saltCount" placeholder="Salt rounds..." :max="100" :min="0" w-full />
|
||||
</n-form-item>
|
||||
|
||||
<c-input-text :value="hashed" readonly text-center />
|
||||
|
||||
+4
-1
@@ -1,11 +1,12 @@
|
||||
import { tool as base64FileConverter } from './base64-file-converter';
|
||||
import { tool as base64StringConverter } from './base64-string-converter';
|
||||
import { tool as basicAuthGenerator } from './basic-auth-generator';
|
||||
import { tool as jsonToCsharp } from './json-to-csharp';
|
||||
|
||||
import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
||||
|
||||
import { tool as textToUnicode } from './text-to-unicode';
|
||||
|
||||
import { tool as safelinkDecoder } from './safelink-decoder';
|
||||
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
|
||||
import { tool as numeronymGenerator } from './numeronym-generator';
|
||||
import { tool as macAddressGenerator } from './mac-address-generator';
|
||||
@@ -107,6 +108,7 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
listConverter,
|
||||
tomlToJson,
|
||||
tomlToYaml,
|
||||
jsonToCsharp,
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -127,6 +129,7 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
userAgentParser,
|
||||
httpStatusCodes,
|
||||
jsonDiff,
|
||||
safelinkDecoder,
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -11,6 +11,9 @@ describe('integer-base-converter', () => {
|
||||
expect(convertBase({ value: '10100101', fromBase: 2, toBase: 16 })).toEqual('a5');
|
||||
expect(convertBase({ value: '192654', fromBase: 10, toBase: 8 })).toEqual('570216');
|
||||
expect(convertBase({ value: 'zz', fromBase: 64, toBase: 10 })).toEqual('2275');
|
||||
expect(convertBase({ value: '42540766411283223938465490632011909384', fromBase: 10, toBase: 10 })).toEqual('42540766411283223938465490632011909384');
|
||||
expect(convertBase({ value: '42540766411283223938465490632011909384', fromBase: 10, toBase: 16 })).toEqual('20010db8000085a300000000ac1f8908');
|
||||
expect(convertBase({ value: '20010db8000085a300000000ac1f8908', fromBase: 16, toBase: 10 })).toEqual('42540766411283223938465490632011909384');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -5,16 +5,16 @@ export function convertBase({ value, fromBase, toBase }: { value: string; fromBa
|
||||
let decValue = value
|
||||
.split('')
|
||||
.reverse()
|
||||
.reduce((carry: number, digit: string, index: number) => {
|
||||
.reduce((carry: bigint, digit: string, index: number) => {
|
||||
if (!fromRange.includes(digit)) {
|
||||
throw new Error(`Invalid digit "${digit}" for base ${fromBase}.`);
|
||||
}
|
||||
return (carry += fromRange.indexOf(digit) * fromBase ** index);
|
||||
}, 0);
|
||||
return (carry += BigInt(fromRange.indexOf(digit)) * BigInt(fromBase) ** BigInt(index));
|
||||
}, 0n);
|
||||
let newValue = '';
|
||||
while (decValue > 0) {
|
||||
newValue = toRange[decValue % toBase] + newValue;
|
||||
decValue = (decValue - (decValue % toBase)) / toBase;
|
||||
newValue = toRange[Number(decValue % BigInt(toBase))] + newValue;
|
||||
decValue = (decValue - (decValue % BigInt(toBase))) / BigInt(toBase);
|
||||
}
|
||||
return newValue || '0';
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { CSharp } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'JSON to C#',
|
||||
path: '/json-to-csharp',
|
||||
description: 'Convert JSON data to C# type definition',
|
||||
keywords: ['json', 'c#', 'csharp'],
|
||||
component: () => import('./json-to-csharp.vue'),
|
||||
icon: CSharp,
|
||||
createdAt: new Date('2024-05-11'),
|
||||
});
|
||||
@@ -0,0 +1,102 @@
|
||||
<script setup lang="ts">
|
||||
import JSON5 from 'json5';
|
||||
import json2csharp from './json2csharp';
|
||||
import type { UseValidationRule } from '@/composable/validation';
|
||||
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||
import { withDefaultOnError } from '@/utils/defaults';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const defaultValue = `{
|
||||
a:"n",
|
||||
arr: [1, 2],
|
||||
nested: {
|
||||
a:1,
|
||||
b:"2"
|
||||
}
|
||||
}`;
|
||||
const jsonInput = ref(defaultValue);
|
||||
const pascalCase = useQueryParamOrStorage({ name: 'pascalcase', storageName: 'json-c#:pc', defaultValue: true });
|
||||
const useFields = useQueryParamOrStorage({ name: 'fields', storageName: 'json-c#:fi', defaultValue: false });
|
||||
const useNullable = useQueryParamOrStorage({ name: 'nullable', storageName: 'json-c#:null', defaultValue: false });
|
||||
const addJsonProperty = useQueryParamOrStorage({ name: 'pascal', storageName: 'json-c#:jsp', defaultValue: false });
|
||||
const nullValueHandlingIgnore = useQueryParamOrStorage({ name: 'pascal', storageName: 'json-c#:ign', defaultValue: true });
|
||||
const addJsonPropertyName = useQueryParamOrStorage({ name: 'pascal', storageName: 'json-c#:jspp', defaultValue: true });
|
||||
const generateImmutableClasses = useQueryParamOrStorage({ name: 'pascal', storageName: 'json-c#:imm', defaultValue: false });
|
||||
const useRecordTypes = useQueryParamOrStorage({ name: 'pascal', storageName: 'json-c#:rec', defaultValue: true });
|
||||
const useReadonlyLists = useQueryParamOrStorage({ name: 'pascal', storageName: 'json-c#:rdl', defaultValue: false });
|
||||
const rootTypeName = useQueryParamOrStorage({ name: 'root', storageName: 'json-c#:rt', defaultValue: 'Root' });
|
||||
|
||||
const csharpOutput = computed(() => withDefaultOnError(
|
||||
() => json2csharp({
|
||||
src: JSON5.parse(jsonInput.value),
|
||||
rootTypeName: rootTypeName.value,
|
||||
pascalCase: pascalCase.value,
|
||||
useFields: useFields.value,
|
||||
useNullable: useNullable.value,
|
||||
addJsonProperty: addJsonProperty.value,
|
||||
nullValueHandlingIgnore: nullValueHandlingIgnore.value,
|
||||
addJsonPropertyName: addJsonPropertyName.value,
|
||||
generateImmutableClasses: generateImmutableClasses.value,
|
||||
useRecordTypes: useRecordTypes.value,
|
||||
useReadonlyLists: useReadonlyLists.value,
|
||||
}), ''));
|
||||
const rules: UseValidationRule<string>[] = [
|
||||
{
|
||||
validator: (v: string) => v === '' || JSON5.parse(v),
|
||||
message: 'Provided JSON is not valid.',
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-card title="JSON to C#">
|
||||
<c-input-text
|
||||
v-model:value="jsonInput"
|
||||
multiline
|
||||
placeholder="Put your json string here..."
|
||||
rows="10"
|
||||
label="JSON to C#"
|
||||
:validation-rules="rules"
|
||||
raw-text
|
||||
mb-5
|
||||
/>
|
||||
<n-space justify="center">
|
||||
<n-checkbox v-model:checked="pascalCase">
|
||||
Use Pascal case
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="useRecordTypes">
|
||||
Use Record types
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="generateImmutableClasses">
|
||||
Generate Immutable classes
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="useFields">
|
||||
Use fields
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="addJsonProperty">
|
||||
Add JsonProperty attributes
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="nullValueHandlingIgnore" :disabled="!addJsonProperty">
|
||||
Use NullValueHandling.Ignore
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="addJsonPropertyName">
|
||||
Add JsonPropertyName attributes
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="useNullable">
|
||||
Use nullable types
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="useReadonlyLists">
|
||||
Use Readonly lists
|
||||
</n-checkbox>
|
||||
</n-space>
|
||||
<c-input-text v-model:value="rootTypeName" label="Root type name" placeholder="Your root type name..." clearable raw-text mb-5 />
|
||||
</c-card>
|
||||
<c-card title="Your C# code" mt-2>
|
||||
<TextareaCopyable
|
||||
:value="csharpOutput"
|
||||
language="csharp"
|
||||
/>
|
||||
</c-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,617 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { getPrimitiveProp, isDate, json2classes, json2csharp } from './json2csharp';
|
||||
|
||||
// Test isDate function
|
||||
describe('isDate', () => {
|
||||
it('should return true for valid date strings', () => {
|
||||
expect(isDate('2024-03-08')).toBe(true);
|
||||
expect(isDate('2024-03-08T12:34:56Z')).toBe(true);
|
||||
});
|
||||
|
||||
it('should return false for invalid date strings', () => {
|
||||
expect(isDate('hello')).toBe(false);
|
||||
expect(isDate('2024-13-08')).toBe(false); // Invalid month
|
||||
expect(isDate('9999-99-99')).toBe(false); // Invalid format
|
||||
});
|
||||
});
|
||||
|
||||
// Test getPrimitiveProp function
|
||||
describe('getPrimitiveProp', () => {
|
||||
it('should return \'string\' type for non-date strings', () => {
|
||||
expect(getPrimitiveProp('hello', 'testKey')).toEqual({
|
||||
type: 'string',
|
||||
name: 'testKey',
|
||||
canBeNullable: false,
|
||||
});
|
||||
});
|
||||
|
||||
it('should return \'DateTime\' type for date strings', () => {
|
||||
expect(getPrimitiveProp('2024-03-08', 'dateKey')).toEqual({
|
||||
type: 'DateTime',
|
||||
name: 'dateKey',
|
||||
canBeNullable: true,
|
||||
});
|
||||
});
|
||||
|
||||
it('should return \'int\' for integers', () => {
|
||||
expect(getPrimitiveProp(42, 'numberKey')).toEqual({
|
||||
type: 'int',
|
||||
name: 'numberKey',
|
||||
canBeNullable: true,
|
||||
});
|
||||
});
|
||||
|
||||
it('should return \'double\' for floating point numbers', () => {
|
||||
expect(getPrimitiveProp(3.14, 'floatKey')).toEqual({
|
||||
type: 'double',
|
||||
name: 'floatKey',
|
||||
canBeNullable: true,
|
||||
});
|
||||
});
|
||||
|
||||
it('should return \'bool\' for boolean values', () => {
|
||||
expect(getPrimitiveProp(true, 'boolKey')).toEqual({
|
||||
type: 'bool',
|
||||
name: 'boolKey',
|
||||
canBeNullable: true,
|
||||
});
|
||||
});
|
||||
|
||||
it('should throw an error for unsupported types', () => {
|
||||
expect(() => getPrimitiveProp({}, 'objKey')).toThrow('Unexpected key \'objKey\' of type object');
|
||||
});
|
||||
});
|
||||
|
||||
// Test json2classes function
|
||||
describe('json2classes', () => {
|
||||
it('should convert JSON to class definitions with custom root', () => {
|
||||
const json = { name: 'John', age: 30 };
|
||||
const result = json2classes(json, 'Main');
|
||||
expect(result).to.deep.eq([
|
||||
{
|
||||
key: 'Main',
|
||||
props: [
|
||||
{ type: 'string', name: 'name', canBeNullable: false },
|
||||
{ type: 'int', name: 'age', canBeNullable: true },
|
||||
],
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it('should handle nested objects', () => {
|
||||
const json = { user: { name: 'John' } };
|
||||
const result = json2classes(json);
|
||||
expect(result).to.deep.eq([
|
||||
{ key: 'Root', props: [{ type: 'User', name: 'user' }] },
|
||||
{ key: 'User', props: [{ type: 'string', name: 'name', canBeNullable: false }] },
|
||||
]);
|
||||
});
|
||||
|
||||
it('should handle arrays of primitives', () => {
|
||||
const json = { numbers: [1, 2, 3] };
|
||||
const result = json2classes(json);
|
||||
expect(result).to.deep.eq([
|
||||
{ key: 'Root', props: [{ type: 'int', name: 'numbers', isArray: true, canBeNullable: true }] },
|
||||
]);
|
||||
});
|
||||
|
||||
it('should handle arrays of objects', () => {
|
||||
const json = { users: [{ name: 'John' }, { name: 'Jane' }] };
|
||||
const result = json2classes(json);
|
||||
expect(result).to.deep.eq([
|
||||
{ key: 'Root', props: [{ type: 'UsersItem', name: 'users', isArray: true }] },
|
||||
{ key: 'UsersItem', props: [{ type: 'string', name: 'name', canBeNullable: false }] },
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
// Test json2csharp function
|
||||
describe('json2csharp', () => {
|
||||
const cleanTabs = (s: string) => s.replace(/\t/g, ' ');
|
||||
|
||||
it('should convert JSON to C# class with default options', () => {
|
||||
const json = JSON.stringify({ name: 'John', age: 30 });
|
||||
const result = cleanTabs(json2csharp({ src: json }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonPropertyName(\"name\")]
|
||||
public string Name { get; set; }
|
||||
[JsonPropertyName(\"age\")]
|
||||
public int Age { get; set; }
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should not change case if pascalCase option is false', () => {
|
||||
const json = JSON.stringify({ test: { user_name: 'John' } });
|
||||
const result = cleanTabs(json2csharp({ src: json, pascalCase: false }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonPropertyName(\"test\")]
|
||||
public Test test { get; set; }
|
||||
}
|
||||
|
||||
public class Test
|
||||
{
|
||||
[JsonPropertyName(\"user_name\")]
|
||||
public string user_name { get; set; }
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should handle when root is an array', () => {
|
||||
const json = JSON.stringify([{ age: 30 }]);
|
||||
const result = cleanTabs(json2csharp({ src: json, useNullable: true }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public class RootItem
|
||||
{
|
||||
[JsonPropertyName(\"age\")]
|
||||
public int? Age { get; set; }
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should use nullable types if useNullable option is true', () => {
|
||||
const json = JSON.stringify({ age: 30 });
|
||||
const result = cleanTabs(json2csharp({ src: json, useNullable: true }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonPropertyName(\"age\")]
|
||||
public int? Age { get; set; }
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should add JsonProperty attributes if addJsonProperty is true', () => {
|
||||
const json = JSON.stringify({ name: 'John' });
|
||||
const result = cleanTabs(json2csharp({ src: json, addJsonProperty: true }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using Newtonsoft.Json;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonProperty(\"name\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonPropertyName(\"name\")]
|
||||
public string Name { get; set; }
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should add JsonPropertyName attributes if addJsonPropertyName is true', () => {
|
||||
const json = JSON.stringify({ name: 'John' });
|
||||
const result = cleanTabs(json2csharp({ src: json, addJsonPropertyName: true }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonPropertyName(\"name\")]
|
||||
public string Name { get; set; }
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should generate immutable classes if generateImmutableClasses is true', () => {
|
||||
const json = JSON.stringify({ name: 'John' });
|
||||
const result = cleanTabs(json2csharp({ src: json, generateImmutableClasses: true }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
public Root(
|
||||
string name
|
||||
){
|
||||
this.Name = name;
|
||||
}
|
||||
|
||||
[JsonPropertyName(\"name\")]
|
||||
public string Name { get; }
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should convert JSON with arrays into C# classes', () => {
|
||||
const json = {
|
||||
users: [{ name: 'John', age: 30 }, { name: 'Jane', age: 25 }],
|
||||
};
|
||||
|
||||
expect(cleanTabs(json2csharp({ src: json }))).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonPropertyName(\"users\")]
|
||||
public UsersItem[] Users { get; set; }
|
||||
}
|
||||
|
||||
public class UsersItem
|
||||
{
|
||||
[JsonPropertyName(\"name\")]
|
||||
public string Name { get; set; }
|
||||
[JsonPropertyName(\"age\")]
|
||||
public int Age { get; set; }
|
||||
}`);
|
||||
expect(cleanTabs(json2csharp({ src: json, useRecordTypes: true }))).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public record Root(
|
||||
[property: JsonPropertyName(\"users\")]
|
||||
UsersItem[] Users
|
||||
);
|
||||
|
||||
public record UsersItem(
|
||||
[property: JsonPropertyName(\"name\")]
|
||||
string Name,
|
||||
[property: JsonPropertyName(\"age\")]
|
||||
int Age
|
||||
);`);
|
||||
expect(cleanTabs(json2csharp({ src: json, useRecordTypes: true, pascalCase: false, useReadonlyLists: true }))).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public record Root(
|
||||
[property: JsonPropertyName(\"users\")]
|
||||
IReadonlyList<UsersItem> users
|
||||
);
|
||||
|
||||
public record UsersItem(
|
||||
[property: JsonPropertyName(\"name\")]
|
||||
string name,
|
||||
[property: JsonPropertyName(\"age\")]
|
||||
int age
|
||||
);`);
|
||||
});
|
||||
|
||||
it('should generate C# record types when useRecordTypes is true', () => {
|
||||
const json = JSON.stringify({ name: 'John', age: 30 });
|
||||
const result = cleanTabs(json2csharp({ src: json, useRecordTypes: true }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public record Root(
|
||||
[property: JsonPropertyName(\"name\")]
|
||||
string Name,
|
||||
[property: JsonPropertyName(\"age\")]
|
||||
int Age
|
||||
);`);
|
||||
});
|
||||
|
||||
it('should generate C# record types with attributes when useRecordTypes/addJsonProperty/addJsonPropertyName are true', () => {
|
||||
const json = JSON.stringify({ name: 'John', age: 30 });
|
||||
const result = cleanTabs(json2csharp({
|
||||
src: json,
|
||||
useRecordTypes: true,
|
||||
addJsonProperty: true,
|
||||
addJsonPropertyName: true,
|
||||
}));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using Newtonsoft.Json;
|
||||
using System.Text.Json;
|
||||
|
||||
public record Root(
|
||||
[property: JsonProperty(\"name\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[property: JsonPropertyName(\"name\")]
|
||||
string Name,
|
||||
[property: JsonProperty(\"age\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[property: JsonPropertyName(\"age\")]
|
||||
int Age
|
||||
);`);
|
||||
});
|
||||
|
||||
it('should handle arrays of primitives', () => {
|
||||
const json = JSON.stringify({ numbers: [1, 2, 3] });
|
||||
const result = cleanTabs(json2csharp({ src: json }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonPropertyName(\"numbers\")]
|
||||
public int[] Numbers { get; set; }
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should handle arrays of objects with PascalCase enabled', () => {
|
||||
const json = JSON.stringify({
|
||||
items: [{ item_name: 'A', price: 10.5 }],
|
||||
});
|
||||
const result = cleanTabs(json2csharp({
|
||||
src: json,
|
||||
pascalCase: true,
|
||||
addJsonProperty: true,
|
||||
addJsonPropertyName: true,
|
||||
}));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using Newtonsoft.Json;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonProperty(\"items\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonPropertyName(\"items\")]
|
||||
public ItemsItem[] Items { get; set; }
|
||||
}
|
||||
|
||||
public class ItemsItem
|
||||
{
|
||||
[JsonProperty(\"item_name\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonPropertyName(\"item_name\")]
|
||||
public string ItemName { get; set; }
|
||||
[JsonProperty(\"price\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonPropertyName(\"price\")]
|
||||
public double Price { get; set; }
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should use nullable types for optional fields when useNullable is true', () => {
|
||||
const json = JSON.stringify({ age: null, price: 10.5 });
|
||||
const result = cleanTabs(json2csharp({ src: json, useNullable: true }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonPropertyName(\"age\")]
|
||||
public Age Age { get; set; }
|
||||
[JsonPropertyName(\"price\")]
|
||||
public double? Price { get; set; }
|
||||
}
|
||||
|
||||
public class Age
|
||||
{
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should use fields when useFields is true', () => {
|
||||
const json = JSON.stringify({ age: 1, price: 10.5 });
|
||||
const result = cleanTabs(json2csharp({ src: json, useFields: true }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonPropertyName(\"age\")]
|
||||
public int Age;
|
||||
[JsonPropertyName(\"price\")]
|
||||
public double Price;
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should add JsonProperty attributes when addJsonProperty is true', () => {
|
||||
const json = JSON.stringify({ firstName: 'John', lastName: 'Doe' });
|
||||
const result = cleanTabs(json2csharp({ src: json, addJsonProperty: true, nullValueHandlingIgnore: false }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using Newtonsoft.Json;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonProperty(\"firstName\")]
|
||||
[JsonPropertyName(\"firstName\")]
|
||||
public string FirstName { get; set; }
|
||||
[JsonProperty(\"lastName\")]
|
||||
[JsonPropertyName(\"lastName\")]
|
||||
public string LastName { get; set; }
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should add JsonProperty attributes when addJsonProperty and nullValueHandlingIgnore are true', () => {
|
||||
const json = JSON.stringify({ firstName: 'John', lastName: 'Doe' });
|
||||
const result = cleanTabs(json2csharp({ src: json, addJsonProperty: true, nullValueHandlingIgnore: true }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using Newtonsoft.Json;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonProperty(\"firstName\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonPropertyName(\"firstName\")]
|
||||
public string FirstName { get; set; }
|
||||
[JsonProperty(\"lastName\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonPropertyName(\"lastName\")]
|
||||
public string LastName { get; set; }
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should handle all types', () => {
|
||||
const json = JSON.stringify({
|
||||
id: 1, date: '2025-06-09', amount: 1.4, group: null, active: true, email: 'test@example.com',
|
||||
});
|
||||
const result = cleanTabs(json2csharp({ src: json }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonPropertyName(\"id\")]
|
||||
public int Id { get; set; }
|
||||
[JsonPropertyName(\"date\")]
|
||||
public DateTime Date { get; set; }
|
||||
[JsonPropertyName(\"amount\")]
|
||||
public double Amount { get; set; }
|
||||
[JsonPropertyName(\"group\")]
|
||||
public Group Group { get; set; }
|
||||
[JsonPropertyName(\"active\")]
|
||||
public bool Active { get; set; }
|
||||
[JsonPropertyName(\"email\")]
|
||||
public string Email { get; set; }
|
||||
}
|
||||
|
||||
public class Group
|
||||
{
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should use readonly lists when useReadonlyLists is true', () => {
|
||||
const json = JSON.stringify({
|
||||
items: [{ name: 'Item1' }, { name: 'Item2' }],
|
||||
});
|
||||
const result = cleanTabs(json2csharp({ src: json, useReadonlyLists: true }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonPropertyName(\"items\")]
|
||||
public List<ItemsItem> Items { get; } = new List<ItemsItem>;
|
||||
}
|
||||
|
||||
public class ItemsItem
|
||||
{
|
||||
[JsonPropertyName(\"name\")]
|
||||
public string Name { get; set; }
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should use immutable class properties when generateImmutableClasses is true', () => {
|
||||
const json = JSON.stringify({ title: 'Book', pages: 300 });
|
||||
const result = cleanTabs(json2csharp({ src: json, generateImmutableClasses: true }));
|
||||
|
||||
expect(result).toBe(`using System;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
public Root(
|
||||
string title,
|
||||
int pages
|
||||
){
|
||||
this.Title = title;
|
||||
this.Pages = pages;
|
||||
}
|
||||
|
||||
[JsonPropertyName(\"title\")]
|
||||
public string Title { get; }
|
||||
[JsonPropertyName(\"pages\")]
|
||||
public int Pages { get; }
|
||||
}`);
|
||||
});
|
||||
|
||||
it('should generate a combination of options correctly', () => {
|
||||
const json = JSON.stringify({
|
||||
people: [
|
||||
{ first_name: 'John', age: 30 },
|
||||
{ first_name: 'Jane', age: 25 },
|
||||
],
|
||||
});
|
||||
|
||||
expect(cleanTabs(json2csharp({
|
||||
src: json,
|
||||
pascalCase: true,
|
||||
useNullable: true,
|
||||
addJsonProperty: true,
|
||||
generateImmutableClasses: true,
|
||||
useRecordTypes: false,
|
||||
useReadonlyLists: true,
|
||||
}))).toBe(`using System;
|
||||
using Newtonsoft.Json;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
public Root(
|
||||
List<PeopleItem> people
|
||||
){
|
||||
this.People = people;
|
||||
}
|
||||
|
||||
[JsonProperty(\"people\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonPropertyName(\"people\")]
|
||||
public List<PeopleItem> People { get; } = new List<PeopleItem>;
|
||||
}
|
||||
|
||||
public class PeopleItem
|
||||
{
|
||||
public PeopleItem(
|
||||
string firstName,
|
||||
int? age
|
||||
){
|
||||
this.FirstName = firstName;
|
||||
this.Age = age;
|
||||
}
|
||||
|
||||
[JsonProperty(\"first_name\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonPropertyName(\"first_name\")]
|
||||
public string FirstName { get; }
|
||||
[JsonProperty(\"age\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonPropertyName(\"age\")]
|
||||
public int? Age { get; }
|
||||
}`);
|
||||
expect(cleanTabs(json2csharp({
|
||||
src: json,
|
||||
pascalCase: true,
|
||||
useNullable: true,
|
||||
addJsonProperty: true,
|
||||
addJsonPropertyName: true,
|
||||
generateImmutableClasses: false,
|
||||
useRecordTypes: false,
|
||||
useReadonlyLists: true,
|
||||
}))).toBe(`using System;
|
||||
using Newtonsoft.Json;
|
||||
using System.Text.Json;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonProperty(\"people\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonPropertyName(\"people\")]
|
||||
public List<PeopleItem> People { get; } = new List<PeopleItem>;
|
||||
}
|
||||
|
||||
public class PeopleItem
|
||||
{
|
||||
[JsonProperty(\"first_name\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonPropertyName(\"first_name\")]
|
||||
public string FirstName { get; set; }
|
||||
[JsonProperty(\"age\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonPropertyName(\"age\")]
|
||||
public int? Age { get; set; }
|
||||
}`);
|
||||
expect(cleanTabs(json2csharp({
|
||||
src: json,
|
||||
pascalCase: true,
|
||||
useNullable: true,
|
||||
addJsonProperty: true,
|
||||
useRecordTypes: true,
|
||||
useReadonlyLists: true,
|
||||
}))).toBe(`using System;
|
||||
using Newtonsoft.Json;
|
||||
using System.Text.Json;
|
||||
|
||||
public record Root(
|
||||
[property: JsonProperty(\"people\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[property: JsonPropertyName(\"people\")]
|
||||
IReadonlyList<PeopleItem> People
|
||||
);
|
||||
|
||||
public record PeopleItem(
|
||||
[property: JsonProperty(\"first_name\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[property: JsonPropertyName(\"first_name\")]
|
||||
string FirstName,
|
||||
[property: JsonProperty(\"age\", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[property: JsonPropertyName(\"age\")]
|
||||
int? Age
|
||||
);`);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,215 @@
|
||||
import { camelCase as convertToCamelCase, pascalCase as convertToPascalCase } from 'change-case';
|
||||
import JSON5 from 'json5';
|
||||
|
||||
function normalize(src: string, firstUpper = true) {
|
||||
// return /^\d$/.test(src.charAt(0))
|
||||
// ? `N${pascalCase(src)}`
|
||||
// : pascalCase(src);
|
||||
return /^\d$/.test(src.charAt(0))
|
||||
? `N${src}`
|
||||
: (firstUpper ? src.charAt(0).toUpperCase() + src.slice(1) : src);
|
||||
}
|
||||
|
||||
export function isDate(src: string) {
|
||||
return /^(\d{4})(-(0[1-9]|1[0-2])(-([12]\d|0[1-9]|3[01]))([T\s]((([01]\d|2[0-3])((:)[0-5]\d))([\:]\d+)?)?(:[0-5]\d([\.]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)$/.test(
|
||||
src,
|
||||
);
|
||||
}
|
||||
|
||||
interface Prop { type: string; name: string; isArray?: boolean; canBeNullable?: boolean }
|
||||
|
||||
export function getPrimitiveProp(obj: any, key: string): Prop {
|
||||
const type = typeof obj;
|
||||
switch (type) {
|
||||
case 'string':
|
||||
// eslint-disable-next-line no-case-declarations
|
||||
const isObjDate = isDate(obj);
|
||||
return { type: isObjDate ? 'DateTime' : 'string', name: key, canBeNullable: isObjDate };
|
||||
case 'number':
|
||||
return { type: Number.isInteger(obj) ? 'int' : 'double', name: key, canBeNullable: true };
|
||||
case 'boolean':
|
||||
return { type: 'bool', name: key, canBeNullable: true };
|
||||
default:
|
||||
throw new Error(`Unexpected key '${key}' of type ${type}`);
|
||||
}
|
||||
}
|
||||
|
||||
interface ClassType { key: string; props: Array<Prop> }
|
||||
|
||||
function handleObject(
|
||||
classes: Array<ClassType>,
|
||||
obj: any,
|
||||
key: string,
|
||||
skip: boolean = false) {
|
||||
const normalizedKey = normalize(key);
|
||||
let target: ClassType = classes.find(x => x.key === normalizedKey) as never;
|
||||
if (!target) {
|
||||
target = { key: normalizedKey, props: [] };
|
||||
if (!skip) {
|
||||
classes.push(target);
|
||||
}
|
||||
}
|
||||
|
||||
if (obj != null) {
|
||||
Object.keys(obj).forEach((k) => {
|
||||
const keyName = Number.isNaN(Number(k)) ? k : `${normalizedKey}Item`;
|
||||
let prop: Prop | null = null;
|
||||
if (typeof obj[k] == 'object') {
|
||||
if (Array.isArray(obj[k])) {
|
||||
if (Array.from(obj[k]).length > 0) {
|
||||
if (typeof obj[k][0] == 'object') {
|
||||
handleObject(classes, obj[k], keyName, true);
|
||||
prop = {
|
||||
type: normalize(`${keyName}Item`),
|
||||
name: keyName,
|
||||
isArray: true,
|
||||
};
|
||||
}
|
||||
else {
|
||||
prop = getPrimitiveProp(obj[k][0], keyName);
|
||||
prop.isArray = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
handleObject(classes, obj[k], keyName);
|
||||
prop = { type: normalize(keyName), name: keyName };
|
||||
}
|
||||
}
|
||||
else {
|
||||
prop = getPrimitiveProp(obj[k], keyName);
|
||||
}
|
||||
|
||||
if (prop && !target.props.some(x => x.name === prop?.name)) {
|
||||
target.props.push(prop);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export function json2classes(src: object, rootTypeName: string = 'Root') {
|
||||
const classes: Array<ClassType> = [];
|
||||
handleObject(classes, src, rootTypeName);
|
||||
return classes;
|
||||
}
|
||||
|
||||
export function json2csharp(
|
||||
{
|
||||
src,
|
||||
rootTypeName = 'Root',
|
||||
pascalCase = true,
|
||||
nullValueHandlingIgnore = true,
|
||||
addJsonPropertyName = true,
|
||||
useReadonlyLists,
|
||||
useRecordTypes,
|
||||
addJsonProperty,
|
||||
generateImmutableClasses,
|
||||
useFields,
|
||||
useNullable,
|
||||
}: {
|
||||
src: any
|
||||
rootTypeName?: string
|
||||
pascalCase?: boolean
|
||||
useFields?: boolean
|
||||
useNullable?: boolean
|
||||
addJsonProperty?: boolean
|
||||
nullValueHandlingIgnore?: boolean
|
||||
addJsonPropertyName?: boolean
|
||||
generateImmutableClasses?: boolean
|
||||
useRecordTypes?: boolean
|
||||
useReadonlyLists?: boolean
|
||||
}) {
|
||||
const normalizeCase = (s: string) => {
|
||||
const normalized = normalize(s, pascalCase);
|
||||
return pascalCase ? convertToPascalCase(normalized) : normalized;
|
||||
};
|
||||
|
||||
const getPropType = (p: Prop) => {
|
||||
let type = p.type;
|
||||
if (p.isArray) {
|
||||
if (useReadonlyLists) {
|
||||
type = useRecordTypes ? `IReadonlyList<${type}>` : `List<${type}>`;
|
||||
}
|
||||
else {
|
||||
type = `${type}[]`;
|
||||
}
|
||||
}
|
||||
const nullable = useNullable && p.canBeNullable ? '?' : '';
|
||||
return { type, nullable };
|
||||
};
|
||||
|
||||
const srcObj = typeof src === 'string' ? JSON5.parse(src) : src;
|
||||
const classes = json2classes(
|
||||
Array.isArray(srcObj) ? srcObj[0] : srcObj,
|
||||
Array.isArray(srcObj) ? `${rootTypeName}Item` : rootTypeName);
|
||||
let result = '';
|
||||
result += 'using System;\n';
|
||||
result += addJsonProperty ? 'using Newtonsoft.Json;\n' : '';
|
||||
result += addJsonPropertyName ? 'using System.Text.Json;\n' : '';
|
||||
result += '\n';
|
||||
classes.forEach((c) => {
|
||||
if (useRecordTypes) {
|
||||
result += `public record ${normalizeCase(c.key)}(\n`;
|
||||
}
|
||||
else {
|
||||
result += `public class ${normalizeCase(c.key)}\n`;
|
||||
result += '{\n';
|
||||
}
|
||||
if (!useRecordTypes && generateImmutableClasses) {
|
||||
result += `\tpublic ${normalizeCase(c.key)}(\n`;
|
||||
c.props.forEach((p) => {
|
||||
const propType = getPropType(p);
|
||||
result += `\t\t${propType.type}${propType.nullable} ${convertToCamelCase(p.name)},\n`;
|
||||
});
|
||||
result = result.replace(/,\n$/, '\n');
|
||||
result += '\t){\n';
|
||||
c.props.forEach((p) => {
|
||||
result += `\t\tthis.${normalizeCase(p.name)} = ${convertToCamelCase(p.name)};\n`;
|
||||
});
|
||||
result += '\t}\n\n';
|
||||
}
|
||||
c.props.forEach((p) => {
|
||||
const scope = useRecordTypes ? 'property: ' : '';
|
||||
if (addJsonProperty) {
|
||||
if (nullValueHandlingIgnore) {
|
||||
result += `\t[${scope}JsonProperty("${p.name}", NullValueHandling = NullValueHandling.Ignore)]\n`;
|
||||
}
|
||||
else {
|
||||
result += `\t[${scope}JsonProperty("${p.name}")]\n`;
|
||||
}
|
||||
}
|
||||
if (addJsonPropertyName) {
|
||||
result += `\t[${scope}JsonPropertyName("${p.name}")]\n`;
|
||||
}
|
||||
|
||||
const propType = getPropType(p);
|
||||
if (useRecordTypes) {
|
||||
result += `\t${propType.type}${propType.nullable} ${normalizeCase(p.name)},\n`;
|
||||
}
|
||||
else {
|
||||
const newList = useReadonlyLists && p.isArray ? ` = new ${propType.type};` : '';
|
||||
if (useFields) {
|
||||
result += `\tpublic ${propType.type}${propType.nullable} ${normalizeCase(p.name)}${(newList || ';')}`;
|
||||
}
|
||||
else if (generateImmutableClasses || (p.isArray && useReadonlyLists)) {
|
||||
result += `\tpublic ${propType.type}${propType.nullable} ${normalizeCase(p.name)} { get; }${newList}`;
|
||||
}
|
||||
else {
|
||||
result += `\tpublic ${propType.type}${propType.nullable} ${normalizeCase(p.name)} { get; set; }${newList}`;
|
||||
}
|
||||
result += '\n';
|
||||
}
|
||||
});
|
||||
if (useRecordTypes) {
|
||||
result = result.replace(/,\n$/, '\n');
|
||||
result += ');\n\n';
|
||||
}
|
||||
else {
|
||||
result += '}\n\n';
|
||||
}
|
||||
});
|
||||
|
||||
return result.trim();
|
||||
}
|
||||
|
||||
export default json2csharp;
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Mailbox } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Outlook Safelink decoder',
|
||||
path: '/safelink-decoder',
|
||||
description: 'Decode Outlook SafeLink links',
|
||||
keywords: ['outlook', 'safelink', 'decoder'],
|
||||
component: () => import('./safelink-decoder.vue'),
|
||||
icon: Mailbox,
|
||||
createdAt: new Date('2024-03-11'),
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { decodeSafeLinksURL } from './safelink-decoder.service';
|
||||
|
||||
describe('safelink-decoder', () => {
|
||||
describe('decodeSafeLinksURL', () => {
|
||||
describe('decode outlook safelink urls', () => {
|
||||
it('should decode basic safelink urls', () => {
|
||||
expect(decodeSafeLinksURL('https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3Dsafelink%26rlz%3D1&data=05%7C02%7C%7C1ed07253975b46da1d1508dc3443752a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638442711583216725%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=%2BQY0HBnnxfI7pzZoxzlhZdDvYu80LwQB0zUUjrffVnk%3D&reserved=0'))
|
||||
.toBe('https://www.google.com/search?q=safelink&rlz=1');
|
||||
});
|
||||
it('should decode encoded safelink urls', () => {
|
||||
expect(decodeSafeLinksURL('https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3Dsafelink%26rlz%3D1&data=05%7C02%7C%7C1ed07253975b46da1d1508dc3443752a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638442711583216725%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=%2BQY0HBnnxfI7pzZoxzlhZdDvYu80LwQB0zUUjrffVnk%3D&reserved=0'))
|
||||
.toBe('https://www.google.com/search?q=safelink&rlz=1');
|
||||
});
|
||||
it('throw on not outlook safelink urls', () => {
|
||||
expect(() => decodeSafeLinksURL('https://google.com'))
|
||||
.toThrow('Invalid SafeLinks URL provided');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
export function decodeSafeLinksURL(safeLinksUrl: string) {
|
||||
if (!safeLinksUrl.match(/\.safelinks\.protection\.outlook\.com/)) {
|
||||
throw new Error('Invalid SafeLinks URL provided');
|
||||
}
|
||||
|
||||
return new URL(safeLinksUrl).searchParams.get('url');
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<script setup lang="ts">
|
||||
import { decodeSafeLinksURL } from './safelink-decoder.service';
|
||||
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||
|
||||
const inputSafeLinkUrl = ref('');
|
||||
const outputDecodedUrl = computed(() => {
|
||||
try {
|
||||
return decodeSafeLinksURL(inputSafeLinkUrl.value);
|
||||
}
|
||||
catch (e: any) {
|
||||
return e.toString();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-input-text
|
||||
v-model:value="inputSafeLinkUrl"
|
||||
raw-text
|
||||
placeholder="Your input Outlook SafeLink Url..."
|
||||
autofocus
|
||||
label="Your input Outlook SafeLink Url:"
|
||||
/>
|
||||
|
||||
<n-divider />
|
||||
|
||||
<n-form-item label="Output decoded URL:">
|
||||
<TextareaCopyable :value="outputDecodedUrl" :word-wrap="true" />
|
||||
</n-form-item>
|
||||
</div>
|
||||
</template>
|
||||
@@ -20,7 +20,7 @@ export function createToken({
|
||||
withLowercase ? 'abcdefghijklmopqrstuvwxyz' : '',
|
||||
withNumbers ? '0123456789' : '',
|
||||
withSymbols ? '.,;:!?./-"\'#{([-|\\@)]=}*+' : '',
|
||||
].join(''); ;
|
||||
].join('');
|
||||
|
||||
return shuffleString(allAlphabet.repeat(length)).substring(0, length);
|
||||
}
|
||||
@@ -23,7 +23,7 @@ const decodeInput = ref('Hello%20world%20%3A)');
|
||||
const decodeOutput = computed(() => withDefaultOnError(() => decodeURIComponent(decodeInput.value), ''));
|
||||
|
||||
const decodeValidation = useValidation({
|
||||
source: encodeInput,
|
||||
source: decodeInput,
|
||||
rules: [
|
||||
{
|
||||
validator: value => isNotThrowing(() => decodeURIComponent(value)),
|
||||
|
||||
Reference in new issue
Block a user